dbcat 0.0.3 → 0.0.4
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/package.json +1 -1
- package/src/index.ts +6 -3
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -53,11 +53,14 @@ export function getAllTables(sql: InstanceType<typeof Bun.SQL>) {
|
|
|
53
53
|
switch (adapter) {
|
|
54
54
|
case "postgres":
|
|
55
55
|
return sql`
|
|
56
|
-
SELECT
|
|
56
|
+
SELECT CASE
|
|
57
|
+
WHEN table_schema = 'public' THEN table_name
|
|
58
|
+
ELSE table_schema || '.' || table_name
|
|
59
|
+
END as name
|
|
57
60
|
FROM information_schema.tables
|
|
58
|
-
WHERE table_schema
|
|
61
|
+
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
|
|
59
62
|
AND table_type = 'BASE TABLE'
|
|
60
|
-
ORDER BY table_name
|
|
63
|
+
ORDER BY table_schema, table_name
|
|
61
64
|
` as Promise<{ name: string }[]>;
|
|
62
65
|
case "mysql":
|
|
63
66
|
case "mariadb":
|