@quillsql/node 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/db/BigQuery.js +1 -1
- package/package.json +1 -1
- package/src/db/BigQuery.ts +1 -1
package/dist/db/BigQuery.js
CHANGED
|
@@ -82,7 +82,7 @@ exports.getSchemaBigQuery = getSchemaBigQuery;
|
|
|
82
82
|
function getTablesBySchemaBigQuery(bigQuery, schemaNames) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
84
|
const allColumns = yield Promise.all(schemaNames.map((schema) => __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
const sql = `SELECT table_name FROM ${schema}.INFORMATION_SCHEMA.TABLES WHERE table_type = 'BASE TABLE'`;
|
|
85
|
+
const sql = `SELECT table_name FROM ${schema}.INFORMATION_SCHEMA.TABLES WHERE table_type = 'BASE TABLE' OR table_type = 'VIEW' OR table_type = 'MATERIALIZED VIEW'`;
|
|
86
86
|
const rows = yield bigQuery.query(sql);
|
|
87
87
|
return rows[0].map((row) => {
|
|
88
88
|
return { tableName: row.table_name, schemaName: schema };
|
package/package.json
CHANGED
package/src/db/BigQuery.ts
CHANGED
|
@@ -84,7 +84,7 @@ export async function getTablesBySchemaBigQuery(
|
|
|
84
84
|
): Promise<{ tableName: string; schemaName: string }[]> {
|
|
85
85
|
const allColumns = await Promise.all(
|
|
86
86
|
schemaNames.map(async (schema) => {
|
|
87
|
-
const sql = `SELECT table_name FROM ${schema}.INFORMATION_SCHEMA.TABLES WHERE table_type = 'BASE TABLE'`;
|
|
87
|
+
const sql = `SELECT table_name FROM ${schema}.INFORMATION_SCHEMA.TABLES WHERE table_type = 'BASE TABLE' OR table_type = 'VIEW' OR table_type = 'MATERIALIZED VIEW'`;
|
|
88
88
|
const rows = await bigQuery.query(sql);
|
|
89
89
|
return rows[0].map((row) => {
|
|
90
90
|
return { tableName: row.table_name, schemaName: schema };
|