Пример #1
0
        private static TypeMappingAttribute _geTypeMappingAttributeFromNpgsqlDbType(NpgsqlDbType npgsqlDbType)
        {
            TypeMappingAttribute tma;

            if (HandlerTypesByNpsgqlDbType.TryGetValue(npgsqlDbType, out tma))
            {
                return(tma);
            }
            return(null);
        }
Пример #2
0
        static PgSqlTypeManager()
        {
            PostgresNameDictionary["jsonb"].ClrTypes = new[] { typeof(Dictionary <string, object>) };

            AddPostgresNameDictionary("ltree", "text", NpgsqlDbType.Unknown, typeof(PgSqlLTree));
            AddPostgresNameDictionary("secstring", null, NpgsqlDbType.Enum, typeof(PgSqlSecureString));


            var tma = new TypeMappingAttribute();

            tma.NpgsqlDbType = NpgsqlDbType.Enum;
            tma.ClrTypes     = new[] { typeof(Enum) };
            tma.PgName       = "jsonb";
            HandlerTypesByNpsgqlDbType.Add(NpgsqlDbType.Enum, tma);
        }