File tree Expand file tree Collapse file tree
crates/postgres-subsystem/postgres-graphql-builder/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -512,6 +512,7 @@ mod tests {
512512 default_value : None ,
513513 update_sync : false ,
514514 readonly : false ,
515+ relation_path : None ,
515516 doc_comments : None ,
516517 computed : None ,
517518 span : default_span ( ) ,
Original file line number Diff line number Diff line change @@ -188,16 +188,18 @@ impl ColumnDefault {
188188
189189 fn handle_decimal_default ( default_value : & str ) -> Result < ColumnDefault , DatabaseError > {
190190 #[ cfg( feature = "bigdecimal" ) ]
191- use pg_bigdecimal:: BigDecimal ;
192- use std:: str:: FromStr ;
191+ {
192+ use pg_bigdecimal:: BigDecimal ;
193+ use std:: str:: FromStr ;
193194
194- # [ cfg ( feature = "bigdecimal" ) ]
195- match BigDecimal :: from_str ( default_value) {
196- Ok ( _) => Ok ( ColumnDefault :: Decimal ( default_value. to_string ( ) ) ) ,
197- Err ( _ ) => Ok ( ColumnDefault :: Function ( default_value . to_string ( ) ) ) ,
195+ match BigDecimal :: from_str ( default_value ) {
196+ Ok ( _ ) => Ok ( ColumnDefault :: Decimal ( default_value. to_string ( ) ) ) ,
197+ Err ( _) => Ok ( ColumnDefault :: Function ( default_value. to_string ( ) ) ) ,
198+ }
198199 }
199200 #[ cfg( not( feature = "bigdecimal" ) ) ]
200201 {
202+ let _ = default_value;
201203 Err ( DatabaseError :: Generic ( format ! (
202204 "BigDecimal is not supported in this build. Please enable the `bigdecimal` feature."
203205 ) ) )
Original file line number Diff line number Diff line change 99
1010use crate :: { Connect , database_error:: DatabaseError } ;
1111
12- use super :: {
13- creation :: { DatabaseCreation , TransactionMode } ,
14- database_client :: DatabaseClient ,
15- } ;
12+ use super :: { creation :: DatabaseCreation , database_client :: DatabaseClient } ;
13+
14+ # [ cfg ( feature = "postgres-url" ) ]
15+ use super :: creation :: TransactionMode ;
1616
1717#[ cfg( feature = "pool" ) ]
1818use super :: database_pool:: DatabasePool ;
You can’t perform that action at this time.
0 commit comments