Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1937,4 +1937,4 @@
"showdown": "^2.1.0",
"sql-formatter": "^14.0.0"
}
}
}
4 changes: 2 additions & 2 deletions src/database/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class Table {
* @returns {Promise<TableColumn[]>}
*/
static async getItems(schema: string, table?: string): Promise<TableColumn[]> {
const params = table ? [schema, table] : [schema];
const params = table ? [schema, table, table] : [schema];
const sql = [
`SELECT `,
` column.TABLE_SCHEMA,`,
Expand All @@ -36,7 +36,7 @@ export default class Table {
` column.column_name = key.column_name`,
`WHERE column.TABLE_SCHEMA = ?`,
...[
table ? `AND column.TABLE_NAME = ?` : ``,
table ? `AND (column.TABLE_NAME = ? OR column.SYSTEM_TABLE_NAME = ?)` : ``,
],
`ORDER BY column.ORDINAL_POSITION`,
].join(` `);
Expand Down
Loading