mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-28 16:09:17 +00:00
fix(grid): qualify jdbc table sort columns
This commit is contained in:
@@ -90,6 +90,21 @@ test("builds Access table data queries with backtick identifiers", () => {
|
||||
assert.equal(sql, "SELECT * FROM `Order Details` ORDER BY `Order ID` ASC LIMIT 100 OFFSET 200;");
|
||||
});
|
||||
|
||||
test("qualifies JDBC table data default order columns with a table alias", () => {
|
||||
const sql = buildTableSelectSql({
|
||||
databaseType: "jdbc",
|
||||
schema: "SJT_THEME",
|
||||
tableName: "BATCH_QUERY",
|
||||
primaryKeys: ["TABLE_NAME"],
|
||||
limit: 100,
|
||||
});
|
||||
|
||||
assert.equal(
|
||||
sql,
|
||||
'SELECT * FROM "SJT_THEME"."BATCH_QUERY" dbx_t ORDER BY dbx_t."TABLE_NAME" ASC LIMIT 100;',
|
||||
);
|
||||
});
|
||||
|
||||
test("expands Hive table data queries into aliased table columns", () => {
|
||||
const sql = buildTableSelectSql({
|
||||
databaseType: "hive",
|
||||
|
||||
Reference in New Issue
Block a user