@@ -91,8 +91,14 @@ pub enum EthereumSqlTypeWrapper {
9191
9292 // Strings and Bytes
9393 String ( String ) ,
94+ StringVarchar ( String ) ,
95+ StringChar ( String ) ,
9496 StringNullable ( String ) ,
97+ StringVarcharNullable ( String ) ,
98+ StringCharNullable ( String ) ,
9599 VecString ( Vec < String > ) ,
100+ VecStringVarchar ( Vec < String > ) ,
101+ VecStringChar ( Vec < String > ) ,
96102 Bytes ( Bytes ) ,
97103 BytesNullable ( Bytes ) ,
98104 VecBytes ( Vec < Bytes > ) ,
@@ -177,8 +183,14 @@ impl EthereumSqlTypeWrapper {
177183
178184 // Strings and Bytes
179185 EthereumSqlTypeWrapper :: String ( _) => "String" ,
186+ EthereumSqlTypeWrapper :: StringVarchar ( _) => "StringVarchar" ,
187+ EthereumSqlTypeWrapper :: StringChar ( _) => "StringChar" ,
180188 EthereumSqlTypeWrapper :: StringNullable ( _) => "StringNullable" ,
189+ EthereumSqlTypeWrapper :: StringVarcharNullable ( _) => "StringVarcharNullable" ,
190+ EthereumSqlTypeWrapper :: StringCharNullable ( _) => "StringCharNullable" ,
181191 EthereumSqlTypeWrapper :: VecString ( _) => "VecString" ,
192+ EthereumSqlTypeWrapper :: VecStringVarchar ( _) => "VecStringVarchar" ,
193+ EthereumSqlTypeWrapper :: VecStringChar ( _) => "VecStringChar" ,
182194 EthereumSqlTypeWrapper :: Bytes ( _) => "Bytes" ,
183195 EthereumSqlTypeWrapper :: BytesNullable ( _) => "BytesNullable" ,
184196 EthereumSqlTypeWrapper :: VecBytes ( _) => "VecBytes" ,
@@ -272,7 +284,13 @@ impl EthereumSqlTypeWrapper {
272284 EthereumSqlTypeWrapper :: String ( _) | EthereumSqlTypeWrapper :: StringNullable ( _) => {
273285 PgType :: TEXT
274286 }
287+ EthereumSqlTypeWrapper :: StringVarchar ( _) |
288+ EthereumSqlTypeWrapper :: StringVarcharNullable ( _) => PgType :: VARCHAR ,
289+ EthereumSqlTypeWrapper :: StringChar ( _) |
290+ EthereumSqlTypeWrapper :: StringCharNullable ( _) => PgType :: CHAR ,
275291 EthereumSqlTypeWrapper :: VecString ( _) => PgType :: TEXT_ARRAY ,
292+ EthereumSqlTypeWrapper :: VecStringVarchar ( _) => PgType :: VARCHAR_ARRAY ,
293+ EthereumSqlTypeWrapper :: VecStringChar ( _) => PgType :: CHAR_ARRAY ,
276294 EthereumSqlTypeWrapper :: Bytes ( _) | EthereumSqlTypeWrapper :: BytesNullable ( _) => {
277295 PgType :: BYTEA
278296 }
@@ -580,15 +598,21 @@ impl ToSql for EthereumSqlTypeWrapper {
580598 out. extend_from_slice ( & buf) ;
581599 Ok ( IsNull :: No )
582600 }
583- EthereumSqlTypeWrapper :: String ( value) => String :: to_sql ( value, ty, out) ,
584- EthereumSqlTypeWrapper :: StringNullable ( value) => {
601+ EthereumSqlTypeWrapper :: String ( value) |
602+ EthereumSqlTypeWrapper :: StringVarchar ( value) |
603+ EthereumSqlTypeWrapper :: StringChar ( value) => String :: to_sql ( value, ty, out) ,
604+ EthereumSqlTypeWrapper :: StringNullable ( value) |
605+ EthereumSqlTypeWrapper :: StringVarcharNullable ( value) |
606+ EthereumSqlTypeWrapper :: StringCharNullable ( value) => {
585607 if value. is_empty ( ) {
586608 return Ok ( IsNull :: Yes ) ;
587609 }
588610
589611 String :: to_sql ( value, ty, out)
590612 }
591- EthereumSqlTypeWrapper :: VecString ( values) => {
613+ EthereumSqlTypeWrapper :: VecString ( values) |
614+ EthereumSqlTypeWrapper :: VecStringVarchar ( values) |
615+ EthereumSqlTypeWrapper :: VecStringChar ( values) => {
592616 if values. is_empty ( ) {
593617 Ok ( IsNull :: Yes )
594618 } else {
@@ -1355,8 +1379,14 @@ pub fn map_ethereum_wrapper_to_json(
13551379 EthereumSqlTypeWrapper :: I8 ( i) => json ! ( i) ,
13561380 EthereumSqlTypeWrapper :: VecI8 ( i8s) => json ! ( i8s) ,
13571381 EthereumSqlTypeWrapper :: String ( s) |
1358- EthereumSqlTypeWrapper :: StringNullable ( s) => json ! ( s) ,
1359- EthereumSqlTypeWrapper :: VecString ( strings) => json ! ( strings) ,
1382+ EthereumSqlTypeWrapper :: StringNullable ( s) |
1383+ EthereumSqlTypeWrapper :: StringVarchar ( s) |
1384+ EthereumSqlTypeWrapper :: StringVarcharNullable ( s) |
1385+ EthereumSqlTypeWrapper :: StringChar ( s) |
1386+ EthereumSqlTypeWrapper :: StringCharNullable ( s) => json ! ( s) ,
1387+ EthereumSqlTypeWrapper :: VecString ( strings) |
1388+ EthereumSqlTypeWrapper :: VecStringVarchar ( strings) |
1389+ EthereumSqlTypeWrapper :: VecStringChar ( strings) => json ! ( strings) ,
13601390 EthereumSqlTypeWrapper :: Bytes ( bytes) |
13611391 EthereumSqlTypeWrapper :: BytesNullable ( bytes) => json ! ( hex:: encode( bytes) ) ,
13621392 EthereumSqlTypeWrapper :: VecBytes ( bytes) => {
0 commit comments