@malloy-publisher/server 0.0.174 → 0.0.175
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/server.js +2 -1
- package/package.json +1 -1
- package/src/service/db_utils.ts +4 -2
package/dist/server.js
CHANGED
|
@@ -221831,11 +221831,12 @@ async function getSchemasForConnection(connection, malloyConnection) {
|
|
|
221831
221831
|
const rows = standardizeRunSQLResult2(result);
|
|
221832
221832
|
return rows.map((row) => {
|
|
221833
221833
|
const typedRow = row;
|
|
221834
|
+
const databaseName = String(typedRow.database_name ?? typedRow.DATABASE_NAME ?? "");
|
|
221834
221835
|
const name = String(typedRow.name ?? typedRow.NAME ?? "");
|
|
221835
221836
|
const owner = String(typedRow.owner ?? typedRow.OWNER ?? "");
|
|
221836
221837
|
const isDefaultVal = typedRow.is_default ?? typedRow.isDefault ?? typedRow.IS_DEFAULT;
|
|
221837
221838
|
return {
|
|
221838
|
-
name
|
|
221839
|
+
name: `${databaseName}.${name}`,
|
|
221839
221840
|
isHidden: ["SNOWFLAKE", ""].includes(owner),
|
|
221840
221841
|
isDefault: isDefaultVal === "Y"
|
|
221841
221842
|
};
|
package/package.json
CHANGED
package/src/service/db_utils.ts
CHANGED
|
@@ -199,16 +199,18 @@ export async function getSchemasForConnection(
|
|
|
199
199
|
try {
|
|
200
200
|
// Use the connection's runSQL method to query schemas
|
|
201
201
|
const result = await malloyConnection.runSQL("SHOW SCHEMAS");
|
|
202
|
-
|
|
203
202
|
const rows = standardizeRunSQLResult(result);
|
|
204
203
|
return rows.map((row: unknown) => {
|
|
205
204
|
const typedRow = row as Record<string, unknown>;
|
|
205
|
+
const databaseName = String(
|
|
206
|
+
typedRow.database_name ?? typedRow.DATABASE_NAME ?? "",
|
|
207
|
+
);
|
|
206
208
|
const name = String(typedRow.name ?? typedRow.NAME ?? "");
|
|
207
209
|
const owner = String(typedRow.owner ?? typedRow.OWNER ?? "");
|
|
208
210
|
const isDefaultVal =
|
|
209
211
|
typedRow.is_default ?? typedRow.isDefault ?? typedRow.IS_DEFAULT;
|
|
210
212
|
return {
|
|
211
|
-
name
|
|
213
|
+
name: `${databaseName}.${name}`,
|
|
212
214
|
isHidden: ["SNOWFLAKE", ""].includes(owner),
|
|
213
215
|
isDefault: isDefaultVal === "Y",
|
|
214
216
|
};
|