feat(extractor): configure INSERT quoting and portable temporal output
Closes #10559
This commit is contained in:
1 parent
a95762a536
commit
d4b4cf8279
13 files changed
+725
-20
No files matched your search
@@ -95,6 +95,8 @@ pub struct DataGridSqlExtractorOptions {
|
||||
pub insert_mode: DataGridCopyInsertMode,
|
||||
pub exclude_primary_keys_from_insert: bool,
|
||||
pub include_database_name: bool,
|
||||
pub quote_identifiers: bool,
|
||||
pub temporal_format: DataGridTemporalFormat,
|
||||
}
|
||||
|
||||
impl Default for DataGridSqlExtractorOptions {
|
||||
@@ -105,10 +107,21 @@ impl Default for DataGridSqlExtractorOptions {
|
||||
insert_mode: DataGridCopyInsertMode::Merged,
|
||||
exclude_primary_keys_from_insert: false,
|
||||
include_database_name: true,
|
||||
quote_identifiers: true,
|
||||
temporal_format: DataGridTemporalFormat::Native,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub enum DataGridTemporalFormat {
|
||||
#[default]
|
||||
Native,
|
||||
String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
|
||||
#[serde(rename_all = "camelCase", default, deny_unknown_fields)]
|
||||
|
||||
Reference in new issue
Block a user