Skip to content

Commit ee73e9e

Browse files
committed
fix linting and test errors
1 parent 711c381 commit ee73e9e

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

crates/postgres-subsystem/postgres-graphql-builder/src/query_builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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(),

libs/exo-sql/src/schema/column_spec.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff 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
)))

libs/exo-sql/src/sql/connect/database_client_manager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
use 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")]
1818
use super::database_pool::DatabasePool;

0 commit comments

Comments
 (0)