fix(duckdb): return rows for shorthand result queries
This commit is contained in:
1 parent
0660194465
commit
6e82fe1e3f
4 files changed
+70
-4
No files matched your search
@@ -1044,6 +1044,25 @@ pub fn starts_with_executable_sql_keyword_for_database(sql: &str, keywords: &[&s
|
||||
starts_with_executable_sql_keyword_with_options(sql, keywords, SqlParsingOptions::for_database_type(db_type))
|
||||
}
|
||||
|
||||
pub fn starts_with_duckdb_result_sql_keyword(sql: &str) -> bool {
|
||||
starts_with_executable_sql_keyword(
|
||||
sql,
|
||||
&[
|
||||
"SELECT",
|
||||
"SHOW",
|
||||
"DESCRIBE",
|
||||
"EXPLAIN",
|
||||
"WITH",
|
||||
"PRAGMA",
|
||||
"FROM",
|
||||
"SUMMARIZE",
|
||||
"SUMMARISE",
|
||||
"PIVOT",
|
||||
"UNPIVOT",
|
||||
],
|
||||
)
|
||||
}
|
||||
|
||||
pub fn starts_with_executable_sql_keyword_with_options(
|
||||
sql: &str,
|
||||
keywords: &[&str],
|
||||
|
||||
Reference in new issue
Block a user