fix(tdengine): support table row editing
This commit is contained in:
10 files changed
+732
-17
No files matched your search
@@ -248,6 +248,9 @@ pub(super) fn build_select_columns(
|
||||
include_tdengine_tbname: bool,
|
||||
) -> String {
|
||||
if columns.is_empty() {
|
||||
if database_type == Some(DatabaseType::Tdengine) && include_tdengine_tbname {
|
||||
return format!("{DBX_TDENGINE_TBNAME_COLUMN}, *");
|
||||
}
|
||||
return "*".to_string();
|
||||
}
|
||||
if database_type == Some(DatabaseType::Tdengine) {
|
||||
|
||||
@@ -565,6 +565,24 @@ fn builds_iris_table_data_sql_with_literal_top_and_quoted_object() {
|
||||
|
||||
#[test]
|
||||
fn builds_table_data_special_column_queries() {
|
||||
assert_eq!(
|
||||
build_table_data_select_sql(TableDataSelectSqlOptions {
|
||||
database_type: Some(DatabaseType::Tdengine),
|
||||
schema: Some("test_db".to_string()),
|
||||
table_name: "meters".to_string(),
|
||||
table_type: Some("STABLE".to_string()),
|
||||
primary_keys: Vec::new(),
|
||||
columns: Vec::new(),
|
||||
fallback_order_columns: Vec::new(),
|
||||
order_by: None,
|
||||
limit: Some(100),
|
||||
offset: None,
|
||||
where_input: None,
|
||||
include_row_id: false,
|
||||
..Default::default()
|
||||
}),
|
||||
"SELECT tbname, * FROM `test_db`.`meters` LIMIT 100;"
|
||||
);
|
||||
assert_eq!(
|
||||
build_table_data_select_sql(TableDataSelectSqlOptions {
|
||||
database_type: Some(DatabaseType::Tdengine),
|
||||
|
||||
Reference in new issue
Block a user