mirror of https://github.com/Fabio286/antares.git
refactor: minor refactors
This commit is contained in:
parent
46167e4473
commit
8c6950cebd
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,5 @@
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as mysql from 'mysql2';
|
import * as mysql from 'mysql2';
|
||||||
import { builtinsTypes } from 'pg-types';
|
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import * as pgAst from 'pgsql-ast-parser';
|
import * as pgAst from 'pgsql-ast-parser';
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { AntaresCore } from '../AntaresCore';
|
||||||
|
@ -19,6 +18,68 @@ pg.types.setTypeParser(1114, pgToString); // timestamp
|
||||||
pg.types.setTypeParser(1184, pgToString); // timestamptz
|
pg.types.setTypeParser(1184, pgToString); // timestamptz
|
||||||
pg.types.setTypeParser(1266, pgToString); // timetz
|
pg.types.setTypeParser(1266, pgToString); // timetz
|
||||||
|
|
||||||
|
// from pg-types
|
||||||
|
type builtinsTypes =
|
||||||
|
'BOOL' |
|
||||||
|
'BYTEA' |
|
||||||
|
'CHAR' |
|
||||||
|
'INT8' |
|
||||||
|
'INT2' |
|
||||||
|
'INT4' |
|
||||||
|
'REGPROC' |
|
||||||
|
'TEXT' |
|
||||||
|
'OID' |
|
||||||
|
'TID' |
|
||||||
|
'XID' |
|
||||||
|
'CID' |
|
||||||
|
'JSON' |
|
||||||
|
'XML' |
|
||||||
|
'PG_NODE_TREE' |
|
||||||
|
'SMGR' |
|
||||||
|
'PATH' |
|
||||||
|
'POLYGON' |
|
||||||
|
'CIDR' |
|
||||||
|
'FLOAT4' |
|
||||||
|
'FLOAT8' |
|
||||||
|
'ABSTIME' |
|
||||||
|
'RELTIME' |
|
||||||
|
'TINTERVAL' |
|
||||||
|
'CIRCLE' |
|
||||||
|
'MACADDR8' |
|
||||||
|
'MONEY' |
|
||||||
|
'MACADDR' |
|
||||||
|
'INET' |
|
||||||
|
'ACLITEM' |
|
||||||
|
'BPCHAR' |
|
||||||
|
'VARCHAR' |
|
||||||
|
'DATE' |
|
||||||
|
'TIME' |
|
||||||
|
'TIMESTAMP' |
|
||||||
|
'TIMESTAMPTZ' |
|
||||||
|
'INTERVAL' |
|
||||||
|
'TIMETZ' |
|
||||||
|
'BIT' |
|
||||||
|
'VARBIT' |
|
||||||
|
'NUMERIC' |
|
||||||
|
'REFCURSOR' |
|
||||||
|
'REGPROCEDURE' |
|
||||||
|
'REGOPER' |
|
||||||
|
'REGOPERATOR' |
|
||||||
|
'REGCLASS' |
|
||||||
|
'REGTYPE' |
|
||||||
|
'UUID' |
|
||||||
|
'TXID_SNAPSHOT' |
|
||||||
|
'PG_LSN' |
|
||||||
|
'PG_NDISTINCT' |
|
||||||
|
'PG_DEPENDENCIES' |
|
||||||
|
'TSVECTOR' |
|
||||||
|
'TSQUERY' |
|
||||||
|
'GTSVECTOR' |
|
||||||
|
'REGCONFIG' |
|
||||||
|
'REGDICTIONARY' |
|
||||||
|
'JSONB' |
|
||||||
|
'REGNAMESPACE' |
|
||||||
|
'REGROLE';
|
||||||
export class PostgreSQLClient extends AntaresCore {
|
export class PostgreSQLClient extends AntaresCore {
|
||||||
private _schema?: string;
|
private _schema?: string;
|
||||||
private _runningConnections: Map<string, number>;
|
private _runningConnections: Map<string, number>;
|
||||||
|
|
|
@ -315,7 +315,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeUnmount, Ref, ref } from 'vue';
|
import { onBeforeUnmount, Ref, ref, computed } from 'vue';
|
||||||
import { shell } from 'electron';
|
import { shell } from 'electron';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
@ -328,7 +328,6 @@ import ModalSettingsUpdate from '@/components/ModalSettingsUpdate.vue';
|
||||||
import ModalSettingsChangelog from '@/components/ModalSettingsChangelog.vue';
|
import ModalSettingsChangelog from '@/components/ModalSettingsChangelog.vue';
|
||||||
import BaseTextEditor from '@/components/BaseTextEditor.vue';
|
import BaseTextEditor from '@/components/BaseTextEditor.vue';
|
||||||
import BaseSelect from '@/components/BaseSelect.vue';
|
import BaseSelect from '@/components/BaseSelect.vue';
|
||||||
import { computed } from '@vue/reactivity';
|
|
||||||
|
|
||||||
const { t, availableLocales } = useI18n();
|
const { t, availableLocales } = useI18n();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue