fix(jdbc): avoid default max rows rewrite
This commit is contained in:
1 parent
46cefabe57
commit
ffe535e40e
6 files changed
+43
-9
No files matched your search
@@ -121,8 +121,8 @@ pub fn build_table_data_select_sql(options: TableDataSelectSqlOptions) -> String
|
||||
|
||||
let offset =
|
||||
options.offset.filter(|offset| *offset > 0).map(|offset| format!(" OFFSET {offset}")).unwrap_or_default();
|
||||
// JDBC connections rely on Statement.setMaxRows() for row limiting instead of
|
||||
// SQL-level LIMIT, which is not universally supported across all JDBC drivers.
|
||||
// JDBC connections avoid SQL-level LIMIT because it is not universally
|
||||
// supported across all JDBC drivers; the agent truncates rows while reading.
|
||||
if database_type == Some(DatabaseType::Jdbc) {
|
||||
return format!("SELECT {select_columns} FROM {table_alias}{where_clause}{order};");
|
||||
}
|
||||
@@ -173,7 +173,7 @@ pub fn build_table_select_sql(options: TableSelectSqlOptions<'_>) -> String {
|
||||
return format!("SELECT TOP ({limit}) {select_columns} FROM {table}{order_by}");
|
||||
}
|
||||
|
||||
// JDBC connections rely on Statement.setMaxRows() for row limiting.
|
||||
// JDBC connections avoid SQL-level LIMIT; the agent truncates rows while reading.
|
||||
if database_type == Some(DatabaseType::Jdbc) {
|
||||
return format!("SELECT {select_columns} FROM {table}{order_by};");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user