mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 02:06:01 +00:00
SYNC: call adapt db info
This commit is contained in:
@@ -5,6 +5,7 @@ import type {
|
||||
ViewInfo,
|
||||
CollectionInfo,
|
||||
NamedObjectInfo,
|
||||
EngineDriver,
|
||||
} from 'dbgate-types';
|
||||
import _flatten from 'lodash/flatten';
|
||||
import _uniq from 'lodash/uniq';
|
||||
@@ -304,3 +305,11 @@ export function skipDbGateInternalObjects(db: DatabaseInfo) {
|
||||
tables: (db.tables || []).filter(tbl => tbl.pureName != 'dbgate_deploy_journal'),
|
||||
};
|
||||
}
|
||||
|
||||
export function adaptDatabaseInfo(db: DatabaseInfo, driver: EngineDriver): DatabaseInfo {
|
||||
const modelAdapted = {
|
||||
...db,
|
||||
tables: db.tables.map(table => driver.adaptTableInfo(table)),
|
||||
};
|
||||
return modelAdapted;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user