2929using Npgsql . TypeHandlers ;
3030using Npgsql . TypeHandlers . DateTimeHandlers ;
3131using Npgsql . TypeHandlers . NumericHandlers ;
32+ using NpgsqlTypes ;
3233
3334namespace Npgsql
3435{
@@ -46,29 +47,29 @@ class PostgresMinimalDatabaseInfo : PostgresDatabaseInfo
4647 {
4748 static readonly PostgresType [ ] Types = new [ ]
4849 {
49- new PostgresBaseType ( "pg_catalog" , "int4" , Int32Handler . TypeOID ) ,
50- new PostgresBaseType ( "pg_catalog" , "int2" , Int16Handler . TypeOID ) ,
51- new PostgresBaseType ( "pg_catalog" , "int8" , Int64Handler . TypeOID ) ,
52- new PostgresBaseType ( "pg_catalog" , "float4" , SingleHandler . TypeOID ) ,
53- new PostgresBaseType ( "pg_catalog" , "float8" , DoubleHandler . TypeOID ) ,
54- new PostgresBaseType ( "pg_catalog" , "numeric" , NumericHandler . TypeOID ) ,
55- new PostgresBaseType ( "pg_catalog" , "money" , MoneyHandler . TypeOID ) ,
50+ new PostgresBaseType ( "pg_catalog" , "int4" , ( uint ) NpgsqlDbType . Integer ) ,
51+ new PostgresBaseType ( "pg_catalog" , "int2" , ( uint ) NpgsqlDbType . Smallint ) ,
52+ new PostgresBaseType ( "pg_catalog" , "int8" , ( uint ) NpgsqlDbType . Bigint ) ,
53+ new PostgresBaseType ( "pg_catalog" , "float4" , ( uint ) NpgsqlDbType . Real ) ,
54+ new PostgresBaseType ( "pg_catalog" , "float8" , ( uint ) NpgsqlDbType . Double ) ,
55+ new PostgresBaseType ( "pg_catalog" , "numeric" , ( uint ) NpgsqlDbType . Numeric ) ,
56+ new PostgresBaseType ( "pg_catalog" , "money" , ( uint ) NpgsqlDbType . Money ) ,
5657
57- new PostgresBaseType ( "pg_catalog" , "text" , TextHandler . TextTypeOID ) ,
58- new PostgresBaseType ( "pg_catalog" , "varchar" , TextHandler . VarcharTypeOID ) ,
59- new PostgresBaseType ( "pg_catalog" , "char" , TextHandler . CharTypeOID ) ,
60- new PostgresBaseType ( "pg_catalog" , "unknown" , TextHandler . UnknownTypeOID ) ,
58+ new PostgresBaseType ( "pg_catalog" , "text" , ( uint ) NpgsqlDbType . Text ) ,
59+ new PostgresBaseType ( "pg_catalog" , "varchar" , ( uint ) NpgsqlDbType . Varchar ) ,
60+ new PostgresBaseType ( "pg_catalog" , "char" , ( uint ) NpgsqlDbType . Char ) ,
61+ new PostgresBaseType ( "pg_catalog" , "unknown" , ( uint ) NpgsqlDbType . Unknown ) ,
6162
62- new PostgresBaseType ( "pg_catalog" , "timestamp" , TimestampHandler . TypeOID ) ,
63- new PostgresBaseType ( "pg_catalog" , "timestamptz" , TimestampTzHandler . TypeOID ) ,
64- new PostgresBaseType ( "pg_catalog" , "date" , DateHandler . TypeOID ) ,
65- new PostgresBaseType ( "pg_catalog" , "time" , TimeHandler . TypeOID ) ,
66- new PostgresBaseType ( "pg_catalog" , "timetz" , TimeTzHandler . TypeOID ) ,
67- new PostgresBaseType ( "pg_catalog" , "interval" , IntervalHandler . TypeOID ) ,
63+ new PostgresBaseType ( "pg_catalog" , "timestamp" , ( uint ) NpgsqlDbType . Timestamp ) ,
64+ new PostgresBaseType ( "pg_catalog" , "timestamptz" , ( uint ) NpgsqlDbType . TimestampTz ) ,
65+ new PostgresBaseType ( "pg_catalog" , "date" , ( uint ) NpgsqlDbType . Date ) ,
66+ new PostgresBaseType ( "pg_catalog" , "time" , ( uint ) NpgsqlDbType . Time ) ,
67+ new PostgresBaseType ( "pg_catalog" , "timetz" , ( uint ) NpgsqlDbType . TimeTz ) ,
68+ new PostgresBaseType ( "pg_catalog" , "interval" , ( uint ) NpgsqlDbType . Interval ) ,
6869
69- new PostgresBaseType ( "pg_catalog" , "bool" , BoolHandler . TypeOID ) ,
70- new PostgresBaseType ( "pg_catalog" , "bytea" , ByteaHandler . TypeOID ) ,
71- new PostgresBaseType ( "pg_catalog" , "uuid" , UuidHandler . TypeOID )
70+ new PostgresBaseType ( "pg_catalog" , "bool" , ( uint ) NpgsqlDbType . Boolean ) ,
71+ new PostgresBaseType ( "pg_catalog" , "bytea" , ( uint ) NpgsqlDbType . Bytea ) ,
72+ new PostgresBaseType ( "pg_catalog" , "uuid" , ( uint ) NpgsqlDbType . Uuid )
7273 } ;
7374
7475 protected override IEnumerable < PostgresType > GetTypes ( ) => Types ;
0 commit comments