mirror of
https://github.com/Mintplex-Labs/express-admin.git
synced 2026-07-21 00:45:22 -04:00
Fixed postgresql config queries
This commit is contained in:
+4
-3
@@ -45,12 +45,13 @@ exports.sql = function (name) {
|
||||
// config queries
|
||||
case 'show-tables': s = this.client.mysql
|
||||
? "SHOW TABLES IN `{0}` ;"
|
||||
: "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' ;";
|
||||
: "SELECT table_name FROM information_schema.tables WHERE table_schema = '{0}' ;";
|
||||
break;
|
||||
case 'show-columns': s = this.client.mysql
|
||||
? "SHOW COLUMNS IN `{0}` IN `{1}` ;"
|
||||
: 'SELECT column_name AS "Field", data_type AS "Type", is_nullable AS "Null", \'?\' AS "Key", column_default AS "Default", \'?\' AS "Extra" FROM information_schema.columns WHERE table_name =\'{0}\';';
|
||||
// describe table_name ; - same
|
||||
: 'SELECT column_name AS "Field", data_type AS "Type", is_nullable AS "Null", column_default AS "Default", '+
|
||||
'numeric_precision, numeric_precision_radix, numeric_scale, character_maximum_length '+
|
||||
'FROM information_schema.columns WHERE table_schema = \'{0}\' AND table_name = \'{1}\' ;';
|
||||
break;
|
||||
|
||||
default: s = 'Query name doesn\'t exist'; break;
|
||||
|
||||
Reference in New Issue
Block a user