Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions my-postgres-core/src/sql_value/sql_value_metadata.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[derive(Debug)]
pub struct SqlValueMetadata {
pub sql_type: Option<&'static str>,
pub operator: Option<&'static str>,
Expand Down
4 changes: 2 additions & 2 deletions my-postgres-core/src/table_schema/sql_type_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl SqlTypeProvider for bool {

impl SqlTypeProvider for DateTimeAsMicroseconds {
fn get_sql_type(metadata: Option<SqlValueMetadata>) -> TableColumnType {
if let Some(metadata) = metadata {
if let Some(metadata) = &metadata {
if let Some(sql_type) = metadata.sql_type {
if sql_type == "timestamp" {
return TableColumnType::Timestamp;
Expand All @@ -144,6 +144,6 @@ impl SqlTypeProvider for DateTimeAsMicroseconds {
}
}

panic!("Sql type is not set")
panic!("Sql type is not set: {:?}", metadata)
}
}
Loading