Skip to content

Commit 52e10d7

Browse files
Fix sort order for SQLite tables (#334)
1 parent 3f79e77 commit 52e10d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sqlite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class SQLiteDatabaseClient {
2929
]);
3030
}
3131
async describeTables({schema} = {}) {
32-
return this.query(`SELECT NULLIF(schema, 'main') AS schema, name FROM pragma_table_list() WHERE type = 'table'${schema == null ? "" : ` AND schema = ?`} AND name NOT LIKE 'sqlite_%'`, schema == null ? [] : [schema]);
32+
return this.query(`SELECT NULLIF(schema, 'main') AS schema, name FROM pragma_table_list() WHERE type = 'table'${schema == null ? "" : ` AND schema = ?`} AND name NOT LIKE 'sqlite_%' ORDER BY schema, name`, schema == null ? [] : [schema]);
3333
}
3434
async describeColumns({schema, table} = {}) {
3535
if (table == null) throw new Error(`missing table`);

0 commit comments

Comments
 (0)