mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 04:26:01 +00:00
connecting via socket for mysql and postgres #358
This commit is contained in:
@@ -115,7 +115,12 @@ const postgresDriverBase = {
|
||||
if (values.useDatabaseUrl) {
|
||||
return ['databaseUrl', 'isReadOnly'].includes(field);
|
||||
}
|
||||
return ['server', 'port', 'user', 'password', 'defaultDatabase', 'singleDatabase', 'isReadOnly'].includes(field);
|
||||
|
||||
return (
|
||||
['authType', 'user', 'password', 'defaultDatabase', 'singleDatabase', 'isReadOnly'].includes(field) ||
|
||||
(values.authType == 'socket' && ['socketPath'].includes(field)) ||
|
||||
(values.authType != 'socket' && ['server', 'port'].includes(field))
|
||||
);
|
||||
},
|
||||
|
||||
beforeConnectionSave: connection => {
|
||||
@@ -159,6 +164,10 @@ $$ LANGUAGE plpgsql;`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
authTypeLabel: 'Connection mode',
|
||||
defaultAuthTypeName: 'hostPort',
|
||||
defaultSocketPath: '/var/run/postgresql',
|
||||
};
|
||||
|
||||
/** @type {import('dbgate-types').EngineDriver} */
|
||||
|
||||
Reference in New Issue
Block a user