@@ -59,31 +59,40 @@ public NpgsqlDriver(Options options, Dictionary<string, Table> tables) : base(op
59
59
new ( "DateTime" ,
60
60
new Dictionary < string , string ? >
61
61
{
62
- { "date" , "NpgsqlDbType.Date" } , { "timestamp" , "NpgsqlDbType.Timestamp" } ,
62
+ { "date" , "NpgsqlDbType.Date" } ,
63
+ { "timestamp" , "NpgsqlDbType.Timestamp" }
63
64
} , ordinal => $ "reader.GetDateTime({ ordinal } )") ,
64
65
new ( "object" ,
65
- new Dictionary < string , string ? > { { "json" , null } } , ordinal => $ "reader.GetString({ ordinal } )") ,
66
+ new Dictionary < string , string ? >
67
+ {
68
+ { "json" , null }
69
+ } , ordinal => $ "reader.GetString({ ordinal } )") ,
70
+ new ( "short" ,
71
+ new Dictionary < string , string ? >
72
+ {
73
+ { "int2" , "NpgsqlDbType.Smallint" }
74
+ } , ordinal => $ "reader.GetInt16({ ordinal } )",
75
+ ordinal => $ "reader.GetFieldValue<short[]>({ ordinal } )") ,
66
76
new ( "int" ,
67
77
new Dictionary < string , string ? >
68
78
{
69
79
{ "integer" , "NpgsqlDbType.Integer" } ,
70
80
{ "int" , "NpgsqlDbType.Integer" } ,
71
- { "int2" , "NpgsqlDbType.Smallint" } ,
72
81
{ "int4" , "NpgsqlDbType.Integer" } ,
73
82
{ "serial" , "NpgsqlDbType.Integer" }
74
83
} , ordinal => $ "reader.GetInt32({ ordinal } )",
75
84
ordinal => $ "reader.GetFieldValue<int[]>({ ordinal } )") ,
76
85
new ( "float" ,
77
86
new Dictionary < string , string ? >
78
87
{
79
- { "numeric" , "NpgsqlDbType.Numeric" } ,
80
- { "float4" , "NpgsqlDbType.Real" } ,
81
- { "float8" , "NpgsqlDbType.Real" }
88
+ { "float4" , "NpgsqlDbType.Real" }
82
89
} , ordinal => $ "reader.GetFloat({ ordinal } )") ,
83
90
new ( "decimal" ,
84
91
new Dictionary < string , string ? >
85
92
{
86
- { "decimal" , "NpgsqlDbType.Real" }
93
+ { "numeric" , "NpgsqlDbType.Numeric" } ,
94
+ { "float8" , "NpgsqlDbType.Real" } ,
95
+ { "decimal" , "NpgsqlDbType.Decimal" }
87
96
} , ordinal => $ "reader.GetDecimal({ ordinal } )") ,
88
97
new ( "bool" ,
89
98
new Dictionary < string , string ? >
0 commit comments