Make databases a proxy
This commit is contained in:
parent
c84990ca6d
commit
52455a75d0
@ -6,44 +6,47 @@ import mssqlImage from "../assets/mssql-icon.png";
|
||||
import i18n from "../i18n/i18n";
|
||||
import { DB } from "./constants";
|
||||
|
||||
export const databases = {
|
||||
[DB.MYSQL]: {
|
||||
name: "MySQL",
|
||||
label: DB.MYSQL,
|
||||
image: mysqlImage,
|
||||
hasTypes: false,
|
||||
export const databases = new Proxy(
|
||||
{
|
||||
[DB.MYSQL]: {
|
||||
name: "MySQL",
|
||||
label: DB.MYSQL,
|
||||
image: mysqlImage,
|
||||
hasTypes: false,
|
||||
},
|
||||
[DB.POSTGRES]: {
|
||||
name: "PostgreSQL",
|
||||
label: DB.POSTGRES,
|
||||
image: postgresImage,
|
||||
hasTypes: true,
|
||||
hasEnums: true,
|
||||
hasArrays: true,
|
||||
},
|
||||
[DB.SQLITE]: {
|
||||
name: "SQLite",
|
||||
label: DB.SQLITE,
|
||||
image: sqliteImage,
|
||||
hasTypes: false,
|
||||
},
|
||||
[DB.MARIADB]: {
|
||||
name: "MariaDB",
|
||||
label: DB.MARIADB,
|
||||
image: mariadbImage,
|
||||
hasTypes: false,
|
||||
},
|
||||
[DB.MSSQL]: {
|
||||
name: "MSSQL",
|
||||
label: DB.MSSQL,
|
||||
image: mssqlImage,
|
||||
hasTypes: false,
|
||||
},
|
||||
[DB.GENERIC]: {
|
||||
name: i18n.t("generic"),
|
||||
label: DB.GENERIC,
|
||||
image: null,
|
||||
description: i18n.t("generic_description"),
|
||||
hasTypes: true,
|
||||
},
|
||||
},
|
||||
[DB.POSTGRES]: {
|
||||
name: "PostgreSQL",
|
||||
label: DB.POSTGRES,
|
||||
image: postgresImage,
|
||||
hasTypes: true,
|
||||
hasEnums: true,
|
||||
hasArrays: true,
|
||||
},
|
||||
[DB.SQLITE]: {
|
||||
name: "SQLite",
|
||||
label: DB.SQLITE,
|
||||
image: sqliteImage,
|
||||
hasTypes: false,
|
||||
},
|
||||
[DB.MARIADB]: {
|
||||
name: "MariaDB",
|
||||
label: DB.MARIADB,
|
||||
image: mariadbImage,
|
||||
hasTypes: false,
|
||||
},
|
||||
[DB.MSSQL]: {
|
||||
name: "MSSQL",
|
||||
label: DB.MSSQL,
|
||||
image: mssqlImage,
|
||||
hasTypes: false,
|
||||
},
|
||||
[DB.GENERIC]: {
|
||||
name: i18n.t("generic"),
|
||||
label: DB.GENERIC,
|
||||
image: null,
|
||||
description: i18n.t("generic_description"),
|
||||
hasTypes: true,
|
||||
},
|
||||
};
|
||||
{ get: (target, prop) => (prop in target ? target[prop] : {}) },
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user