mirror of
https://github.com/dbgate/dbgate
synced 2024-11-08 04:35:58 +00:00
commit
8c051ff5f7
@ -9,7 +9,7 @@ import {
|
|||||||
AllowIdentityInsert,
|
AllowIdentityInsert,
|
||||||
Expression,
|
Expression,
|
||||||
} from 'dbgate-sqltree';
|
} from 'dbgate-sqltree';
|
||||||
import { NamedObjectInfo, DatabaseInfo } from 'dbgate-types';
|
import type { NamedObjectInfo, DatabaseInfo } from 'dbgate-types';
|
||||||
|
|
||||||
export interface ChangeSetItem {
|
export interface ChangeSetItem {
|
||||||
pureName: string;
|
pureName: string;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc, DisplayColumn } from './GridDisplay';
|
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc, DisplayColumn } from './GridDisplay';
|
||||||
import { EngineDriver, ViewInfo, ColumnInfo, CollectionInfo } from 'dbgate-types';
|
import type { EngineDriver, ViewInfo, ColumnInfo, CollectionInfo } from 'dbgate-types';
|
||||||
import { GridConfig, GridCache } from './GridConfig';
|
import { GridConfig, GridCache } from './GridConfig';
|
||||||
|
|
||||||
function getObjectKeys(obj) {
|
function getObjectKeys(obj) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { GridConfig, GridCache, GridConfigColumns, createGridCache, GroupFunc } from './GridConfig';
|
import { GridConfig, GridCache, GridConfigColumns, createGridCache, GroupFunc } from './GridConfig';
|
||||||
import { TableInfo, EngineDriver, DatabaseInfo, SqlDialect } from 'dbgate-types';
|
import type { TableInfo, EngineDriver, DatabaseInfo, SqlDialect } from 'dbgate-types';
|
||||||
import { getFilterValueExpression } from 'dbgate-filterparser';
|
import { getFilterValueExpression } from 'dbgate-filterparser';
|
||||||
import { ChangeCacheFunc, ChangeConfigFunc, DisplayColumn } from './GridDisplay';
|
import { ChangeCacheFunc, ChangeConfigFunc, DisplayColumn } from './GridDisplay';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types';
|
import type { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types';
|
||||||
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
||||||
import { GridConfig, GridCache } from './GridConfig';
|
import { GridConfig, GridCache } from './GridConfig';
|
||||||
import { FreeTableModel } from './FreeTableModel';
|
import { FreeTableModel } from './FreeTableModel';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { TableInfo } from 'dbgate-types';
|
import type { TableInfo } from 'dbgate-types';
|
||||||
|
|
||||||
export interface FreeTableModel {
|
export interface FreeTableModel {
|
||||||
structure: TableInfo;
|
structure: TableInfo;
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
import { DisplayColumn } from './GridDisplay';
|
|
||||||
import { TableInfo } from 'dbgate-types';
|
|
||||||
|
|
||||||
export interface GridConfigColumns {
|
export interface GridConfigColumns {
|
||||||
hiddenColumns: string[];
|
hiddenColumns: string[];
|
||||||
expandedColumns: string[];
|
expandedColumns: string[];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { GridConfig, GridCache, GridConfigColumns, createGridCache, GroupFunc, createGridConfig } from './GridConfig';
|
import { GridConfig, GridCache, GridConfigColumns, createGridCache, GroupFunc, createGridConfig } from './GridConfig';
|
||||||
import {
|
import type {
|
||||||
ForeignKeyInfo,
|
ForeignKeyInfo,
|
||||||
TableInfo,
|
TableInfo,
|
||||||
ColumnInfo,
|
ColumnInfo,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
||||||
import { QueryResultColumn } from 'dbgate-types';
|
|
||||||
import { GridConfig, GridCache } from './GridConfig';
|
import { GridConfig, GridCache } from './GridConfig';
|
||||||
import { analyseCollectionDisplayColumns } from './CollectionGridDisplay';
|
import { analyseCollectionDisplayColumns } from './CollectionGridDisplay';
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { RangeDefinition } from 'dbgate-types';
|
|
||||||
import { PerspectiveDataLoadProps } from './PerspectiveDataProvider';
|
import { PerspectiveDataLoadProps } from './PerspectiveDataProvider';
|
||||||
import _pick from 'lodash/pick';
|
import _pick from 'lodash/pick';
|
||||||
import _zip from 'lodash/zip';
|
import _zip from 'lodash/zip';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { DatabaseInfo, ForeignKeyInfo, NamedObjectInfo, TableInfo } from 'dbgate-types';
|
import type { DatabaseInfo, ForeignKeyInfo, NamedObjectInfo, TableInfo } from 'dbgate-types';
|
||||||
import uuidv1 from 'uuid/v1';
|
import uuidv1 from 'uuid/v1';
|
||||||
|
|
||||||
// export interface PerspectiveConfigColumns {
|
// export interface PerspectiveConfigColumns {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import debug from 'debug';
|
import debug from 'debug';
|
||||||
import { Condition } from 'dbgate-sqltree';
|
import { Condition } from 'dbgate-sqltree';
|
||||||
import { RangeDefinition } from 'dbgate-types';
|
import type { RangeDefinition } from 'dbgate-types';
|
||||||
import { PerspectiveBindingGroup, PerspectiveCache } from './PerspectiveCache';
|
import { PerspectiveBindingGroup, PerspectiveCache } from './PerspectiveCache';
|
||||||
import { PerspectiveDataLoader } from './PerspectiveDataLoader';
|
import { PerspectiveDataLoader } from './PerspectiveDataLoader';
|
||||||
import { PerspectiveDataPatternDict } from './PerspectiveDataPattern';
|
import { PerspectiveDataPatternDict } from './PerspectiveDataPattern';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {
|
import type {
|
||||||
CollectionInfo,
|
CollectionInfo,
|
||||||
ColumnInfo,
|
ColumnInfo,
|
||||||
DatabaseInfo,
|
DatabaseInfo,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { FormViewDisplay } from './FormViewDisplay';
|
import { FormViewDisplay } from './FormViewDisplay';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { ChangeCacheFunc, DisplayColumn, ChangeConfigFunc } from './GridDisplay';
|
import { ChangeCacheFunc, DisplayColumn, ChangeConfigFunc } from './GridDisplay';
|
||||||
import { EngineDriver, NamedObjectInfo, DatabaseInfo } from 'dbgate-types';
|
import type { EngineDriver, NamedObjectInfo, DatabaseInfo } from 'dbgate-types';
|
||||||
import { GridConfig, GridCache } from './GridConfig';
|
import { GridConfig, GridCache } from './GridConfig';
|
||||||
import { mergeConditions, Condition, OrderByExpression } from 'dbgate-sqltree';
|
import { mergeConditions, Condition, OrderByExpression } from 'dbgate-sqltree';
|
||||||
import { TableGridDisplay } from './TableGridDisplay';
|
import { TableGridDisplay } from './TableGridDisplay';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { filterName, isTableColumnUnique } from 'dbgate-tools';
|
import { filterName, isTableColumnUnique } from 'dbgate-tools';
|
||||||
import { GridDisplay, ChangeCacheFunc, DisplayColumn, DisplayedColumnInfo, ChangeConfigFunc } from './GridDisplay';
|
import { GridDisplay, ChangeCacheFunc, DisplayColumn, DisplayedColumnInfo, ChangeConfigFunc } from './GridDisplay';
|
||||||
import {
|
import type {
|
||||||
TableInfo,
|
TableInfo,
|
||||||
EngineDriver,
|
EngineDriver,
|
||||||
ViewInfo,
|
ViewInfo,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
||||||
import { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types';
|
import type { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types';
|
||||||
import { GridConfig, GridCache } from './GridConfig';
|
import { GridConfig, GridCache } from './GridConfig';
|
||||||
|
|
||||||
export class ViewGridDisplay extends GridDisplay {
|
export class ViewGridDisplay extends GridDisplay {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Command, Insert, Update, Delete, UpdateField, Condition, AllowIdentityInsert } from 'dbgate-sqltree';
|
import { Command, Insert, Update, Delete, UpdateField, Condition, AllowIdentityInsert } from 'dbgate-sqltree';
|
||||||
import { NamedObjectInfo, DatabaseInfo, ForeignKeyInfo, TableInfo } from 'dbgate-types';
|
import type { NamedObjectInfo, DatabaseInfo, ForeignKeyInfo, TableInfo } from 'dbgate-types';
|
||||||
import { ChangeSet, ChangeSetItem, extractChangeSetCondition } from './ChangeSet';
|
import { ChangeSet, ChangeSetItem, extractChangeSetCondition } from './ChangeSet';
|
||||||
|
|
||||||
export interface ChangeSetDeleteCascade {
|
export interface ChangeSetDeleteCascade {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { findForeignKeyForColumn } from 'dbgate-tools';
|
import { findForeignKeyForColumn } from 'dbgate-tools';
|
||||||
import { DatabaseInfo, TableInfo, ViewInfo } from 'dbgate-types';
|
import type { DatabaseInfo, TableInfo, ViewInfo } from 'dbgate-types';
|
||||||
import { createPerspectiveNodeConfig, MultipleDatabaseInfo, PerspectiveConfig } from './PerspectiveConfig';
|
import { createPerspectiveNodeConfig, MultipleDatabaseInfo, PerspectiveConfig } from './PerspectiveConfig';
|
||||||
import { PerspectiveDataPattern, PerspectiveDataPatternDict } from './PerspectiveDataPattern';
|
import { PerspectiveDataPattern, PerspectiveDataPatternDict } from './PerspectiveDataPattern';
|
||||||
import { PerspectiveTableNode } from './PerspectiveTreeNode';
|
import { PerspectiveTableNode } from './PerspectiveTreeNode';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { DatabaseInfo } from 'dbgate-types';
|
import type { DatabaseInfo } from 'dbgate-types';
|
||||||
|
|
||||||
export const chinookDbInfo: DatabaseInfo = {
|
export const chinookDbInfo: DatabaseInfo = {
|
||||||
tables: [
|
tables: [
|
||||||
|
@ -2,7 +2,7 @@ import P from 'parsimmon';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { FilterType } from './types';
|
import { FilterType } from './types';
|
||||||
import { Condition } from 'dbgate-sqltree';
|
import { Condition } from 'dbgate-sqltree';
|
||||||
import { TransformType } from 'dbgate-types';
|
import type { TransformType } from 'dbgate-types';
|
||||||
import { interpretEscapes, token, word, whitespace } from './common';
|
import { interpretEscapes, token, word, whitespace } from './common';
|
||||||
|
|
||||||
const compoudCondition = conditionType => conditions => {
|
const compoudCondition = conditionType => conditions => {
|
||||||
|
@ -2,7 +2,6 @@ import P from 'parsimmon';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { FilterType } from './types';
|
import { FilterType } from './types';
|
||||||
import { Condition } from 'dbgate-sqltree';
|
import { Condition } from 'dbgate-sqltree';
|
||||||
import { TransformType } from 'dbgate-types';
|
|
||||||
import { interpretEscapes, token, word, whitespace } from './common';
|
import { interpretEscapes, token, word, whitespace } from './common';
|
||||||
import { mongoParser } from './mongoParser';
|
import { mongoParser } from './mongoParser';
|
||||||
import { datetimeParser } from './datetimeParser';
|
import { datetimeParser } from './datetimeParser';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { SqlDumper } from 'dbgate-types';
|
import type { SqlDumper } from 'dbgate-types';
|
||||||
import { Command, Select, Update, Delete, Insert } from './types';
|
import { Command, Select, Update, Delete, Insert } from './types';
|
||||||
import { dumpSqlExpression } from './dumpSqlExpression';
|
import { dumpSqlExpression } from './dumpSqlExpression';
|
||||||
import { dumpSqlFromDefinition, dumpSqlSourceRef } from './dumpSqlSource';
|
import { dumpSqlFromDefinition, dumpSqlSourceRef } from './dumpSqlSource';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { SqlDumper } from 'dbgate-types';
|
import type { SqlDumper } from 'dbgate-types';
|
||||||
import { Condition, BinaryCondition } from './types';
|
import { Condition, BinaryCondition } from './types';
|
||||||
import { dumpSqlExpression } from './dumpSqlExpression';
|
import { dumpSqlExpression } from './dumpSqlExpression';
|
||||||
import { dumpSqlSelect } from './dumpSqlCommand';
|
import { dumpSqlSelect } from './dumpSqlCommand';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { SqlDumper } from 'dbgate-types';
|
import type { SqlDumper } from 'dbgate-types';
|
||||||
import { Expression, ColumnRefExpression } from './types';
|
import { Expression, ColumnRefExpression } from './types';
|
||||||
import { dumpSqlSourceRef } from './dumpSqlSource';
|
import { dumpSqlSourceRef } from './dumpSqlSource';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Source, FromDefinition, Relation } from './types';
|
import { Source, FromDefinition, Relation } from './types';
|
||||||
import { SqlDumper } from 'dbgate-types';
|
import type { SqlDumper } from 'dbgate-types';
|
||||||
import { dumpSqlSelect } from './dumpSqlCommand';
|
import { dumpSqlSelect } from './dumpSqlCommand';
|
||||||
import { dumpSqlCondition } from './dumpSqlCondition';
|
import { dumpSqlCondition } from './dumpSqlCondition';
|
||||||
|
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
import { SqlDumper } from 'dbgate-types';
|
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { Condition, BinaryCondition } from './types';
|
import { Condition, BinaryCondition } from './types';
|
||||||
import { dumpSqlExpression } from './dumpSqlExpression';
|
|
||||||
import { link } from 'fs';
|
|
||||||
import { evaluateExpression } from './evaluateExpression';
|
import { evaluateExpression } from './evaluateExpression';
|
||||||
import { cond } from 'lodash';
|
|
||||||
|
|
||||||
function isEmpty(value) {
|
function isEmpty(value) {
|
||||||
if (value == null) return true;
|
if (value == null) return true;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { NamedObjectInfo, RangeDefinition, TransformType } from 'dbgate-types';
|
import type { NamedObjectInfo, RangeDefinition, TransformType } from 'dbgate-types';
|
||||||
|
|
||||||
// export interface Command {
|
// export interface Command {
|
||||||
// }
|
// }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { EngineDriver, SqlDumper } from 'dbgate-types';
|
import type { EngineDriver, SqlDumper } from 'dbgate-types';
|
||||||
import { Command, Condition } from './types';
|
import { Command, Condition } from './types';
|
||||||
import { dumpSqlCommand } from './dumpSqlCommand';
|
import { dumpSqlCommand } from './dumpSqlCommand';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import {
|
import type {
|
||||||
ColumnInfo,
|
ColumnInfo,
|
||||||
ConstraintInfo,
|
ConstraintInfo,
|
||||||
EngineDriver,
|
EngineDriver,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {
|
import type {
|
||||||
DatabaseInfo,
|
DatabaseInfo,
|
||||||
EngineDriver,
|
EngineDriver,
|
||||||
FunctionInfo,
|
FunctionInfo,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { DbDiffOptions, testEqualColumns, testEqualTables, testEqualSqlObjects } from './diffTools';
|
import { DbDiffOptions, testEqualColumns, testEqualTables, testEqualSqlObjects } from './diffTools';
|
||||||
import { DatabaseInfo, EngineDriver, SqlObjectInfo, TableInfo } from 'dbgate-types';
|
import type { DatabaseInfo, EngineDriver, SqlObjectInfo, TableInfo } from 'dbgate-types';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
export function computeDiffRowsCore(sourceList, targetList, testEqual) {
|
export function computeDiffRowsCore(sourceList, targetList, testEqual) {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { EngineDriver } from 'dbgate-types';
|
|
||||||
import _intersection from 'lodash/intersection';
|
import _intersection from 'lodash/intersection';
|
||||||
import { prepareTableForImport } from './tableTransforms';
|
import { prepareTableForImport } from './tableTransforms';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {
|
import type {
|
||||||
ColumnInfo,
|
ColumnInfo,
|
||||||
ConstraintInfo,
|
ConstraintInfo,
|
||||||
DatabaseInfo,
|
DatabaseInfo,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import _cloneDeep from 'lodash/cloneDeep';
|
import _cloneDeep from 'lodash/cloneDeep';
|
||||||
import _isString from 'lodash/isString';
|
import _isString from 'lodash/isString';
|
||||||
import {
|
import type {
|
||||||
ColumnInfo,
|
ColumnInfo,
|
||||||
ColumnReference,
|
ColumnReference,
|
||||||
DatabaseInfo,
|
DatabaseInfo,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { EngineDriver, ExtensionsDirectory } from 'dbgate-types';
|
import type { EngineDriver, ExtensionsDirectory } from 'dbgate-types';
|
||||||
import _camelCase from 'lodash/camelCase';
|
import _camelCase from 'lodash/camelCase';
|
||||||
import _isString from 'lodash/isString';
|
import _isString from 'lodash/isString';
|
||||||
import _isPlainObject from 'lodash/isPlainObject';
|
import _isPlainObject from 'lodash/isPlainObject';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { DatabaseInfo, EngineDriver } from 'dbgate-types';
|
import type { DatabaseInfo, EngineDriver } from 'dbgate-types';
|
||||||
|
|
||||||
export async function enrichWithPreloadedRows(
|
export async function enrichWithPreloadedRows(
|
||||||
dbModel: DatabaseInfo,
|
dbModel: DatabaseInfo,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import uuidv1 from 'uuid/v1';
|
import uuidv1 from 'uuid/v1';
|
||||||
import _omit from 'lodash/omit';
|
import _omit from 'lodash/omit';
|
||||||
import {
|
import type {
|
||||||
ColumnInfo,
|
ColumnInfo,
|
||||||
ConstraintInfo,
|
ConstraintInfo,
|
||||||
ForeignKeyInfo,
|
ForeignKeyInfo,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { DatabaseInfo, TableInfo, ApplicationDefinition, ViewInfo, CollectionInfo } from 'dbgate-types';
|
import type { DatabaseInfo, TableInfo, ApplicationDefinition, ViewInfo, CollectionInfo } from 'dbgate-types';
|
||||||
import _flatten from 'lodash/flatten';
|
import _flatten from 'lodash/flatten';
|
||||||
|
|
||||||
export function addTableDependencies(db: DatabaseInfo): DatabaseInfo {
|
export function addTableDependencies(db: DatabaseInfo): DatabaseInfo {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { TableInfo } from 'dbgate-types';
|
import type { TableInfo } from 'dbgate-types';
|
||||||
import _cloneDeep from 'lodash/cloneDeep';
|
import _cloneDeep from 'lodash/cloneDeep';
|
||||||
import _fromPairs from 'lodash/fromPairs';
|
import _fromPairs from 'lodash/fromPairs';
|
||||||
import _get from 'lodash/get';
|
import _get from 'lodash/get';
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
$: currentThemeType = $currentThemeDefinition?.themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light';
|
$: currentThemeType = $currentThemeDefinition?.themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light';
|
||||||
|
|
||||||
$: themeStyle = `<style id="themePlugin">${$currentThemeDefinition?.themeCss}</style>`;
|
$: themeStyle = `<st` + `yle id="themePlugin">${$currentThemeDefinition?.themeCss}</st` + `yle>`;
|
||||||
|
|
||||||
const isElectron = !!getElectron();
|
const isElectron = !!getElectron();
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
tabComponent,
|
tabComponent,
|
||||||
tooltip,
|
tooltip,
|
||||||
props: {
|
props: {
|
||||||
savedFile:fileName + '.' + fileType,
|
savedFile: fileName + '.' + fileType,
|
||||||
savedFolder: 'app:' + folderName,
|
savedFolder: 'app:' + folderName,
|
||||||
savedFormat: 'text',
|
savedFormat: 'text',
|
||||||
appFolder: folderName,
|
appFolder: folderName,
|
||||||
@ -28,7 +28,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const extractKey = data => data.fileName;
|
export const extractKey = data => data.fileName;
|
||||||
export const createMatcher = ({ fileName }) => filter => filterName(filter, fileName);
|
export const createMatcher =
|
||||||
|
({ fileName }) =>
|
||||||
|
filter =>
|
||||||
|
filterName(filter, fileName);
|
||||||
const APP_ICONS = {
|
const APP_ICONS = {
|
||||||
'config.json': 'img json',
|
'config.json': 'img json',
|
||||||
'command.sql': 'img app-command',
|
'command.sql': 'img app-command',
|
||||||
@ -50,7 +53,6 @@
|
|||||||
import InputTextModal from '../modals/InputTextModal.svelte';
|
import InputTextModal from '../modals/InputTextModal.svelte';
|
||||||
import ConfirmModal from '../modals/ConfirmModal.svelte';
|
import ConfirmModal from '../modals/ConfirmModal.svelte';
|
||||||
import { apiCall } from '../utility/api';
|
import { apiCall } from '../utility/api';
|
||||||
import { currentDatabase, currentDatabase } from '../stores';
|
|
||||||
|
|
||||||
export let data;
|
export let data;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { dumpSqlSelect, Select } from 'dbgate-sqltree';
|
import type { Select } from 'dbgate-sqltree';
|
||||||
import { EngineDriver } from 'dbgate-types';
|
import type { EngineDriver } from 'dbgate-types';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { apiCall } from '../utility/api';
|
import { apiCall } from '../utility/api';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { tick } from 'svelte';
|
import { tick } from 'svelte';
|
||||||
import { commands } from '../stores';
|
import { commands } from '../stores';
|
||||||
import { GlobalCommand } from './registerCommand';
|
import type { GlobalCommand } from './registerCommand';
|
||||||
|
|
||||||
let isInvalidated = false;
|
let isInvalidated = false;
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { dumpSqlSelect, Select, JoinType, Condition, Relation, mergeConditions, Source } from 'dbgate-sqltree';
|
import type { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types';
|
||||||
import { EngineDriver } from 'dbgate-types';
|
|
||||||
import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types';
|
|
||||||
import { findPrimaryTable, findConnectingReference, referenceIsJoin, referenceIsExists } from './designerTools';
|
import { findPrimaryTable, findConnectingReference, referenceIsJoin, referenceIsExists } from './designerTools';
|
||||||
|
|
||||||
export class DesignerComponent {
|
export class DesignerComponent {
|
||||||
|
@ -10,7 +10,6 @@ import {
|
|||||||
ResultField,
|
ResultField,
|
||||||
Expression,
|
Expression,
|
||||||
} from 'dbgate-sqltree';
|
} from 'dbgate-sqltree';
|
||||||
import { EngineDriver } from 'dbgate-types';
|
|
||||||
import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types';
|
import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types';
|
||||||
import { DesignerComponent } from './DesignerComponentCreator';
|
import { DesignerComponent } from './DesignerComponentCreator';
|
||||||
import {
|
import {
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { dumpSqlSelect, Select, JoinType, Condition, Relation, mergeConditions, Source } from 'dbgate-sqltree';
|
import type { Select, Condition, Source } from 'dbgate-sqltree';
|
||||||
import { EngineDriver } from 'dbgate-types';
|
import { dumpSqlSelect, mergeConditions } from 'dbgate-sqltree';
|
||||||
import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types';
|
import type { EngineDriver } from 'dbgate-types';
|
||||||
|
import type { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types';
|
||||||
import { DesignerComponentCreator } from './DesignerComponentCreator';
|
import { DesignerComponentCreator } from './DesignerComponentCreator';
|
||||||
import { DesignerQueryDumper } from './DesignerQueryDumper';
|
import { DesignerQueryDumper } from './DesignerQueryDumper';
|
||||||
import { getFilterType } from 'dbgate-filterparser';
|
import { getFilterType } from 'dbgate-filterparser';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { JoinType } from 'dbgate-sqltree';
|
import type { JoinType } from 'dbgate-sqltree';
|
||||||
import { TableInfo } from 'dbgate-types';
|
import type { TableInfo } from 'dbgate-types';
|
||||||
|
|
||||||
export type DesignerTableInfo = TableInfo & {
|
export type DesignerTableInfo = TableInfo & {
|
||||||
designerId: string;
|
designerId: string;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<span class="null"> (no image)</span>
|
<span class="null"> (no image)</span>
|
||||||
{/if}
|
{/if}
|
||||||
{:else if !value.$oid && (_.isArray(value) || _.isPlainObject(value))}
|
{:else if !value?.$oid && (_.isArray(value) || _.isPlainObject(value))}
|
||||||
<JSONTree {value} slicedKeyCount={1} disableContextMenu />
|
<JSONTree {value} slicedKeyCount={1} disableContextMenu />
|
||||||
{:else}
|
{:else}
|
||||||
<CellValue {rowData} {value} />
|
<CellValue {rowData} {value} />
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
PerspectiveTreeNode,
|
PerspectiveTreeNode,
|
||||||
switchPerspectiveReferenceDirection,
|
switchPerspectiveReferenceDirection,
|
||||||
} from 'dbgate-datalib';
|
} from 'dbgate-datalib';
|
||||||
import { CollectionInfo } from 'dbgate-types';
|
import type { CollectionInfo } from 'dbgate-types';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { tick } from 'svelte';
|
import { tick } from 'svelte';
|
||||||
import runCommand from '../commands/runCommand';
|
import runCommand from '../commands/runCommand';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FileFormatDefinition, QuickExportDefinition } from 'dbgate-types';
|
import type { FileFormatDefinition, QuickExportDefinition } from 'dbgate-types';
|
||||||
|
|
||||||
const jsonlFormat = {
|
const jsonlFormat = {
|
||||||
storageType: 'jsonl',
|
storageType: 'jsonl',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ThemeDefinition } from 'dbgate-types';
|
import type { ThemeDefinition } from 'dbgate-types';
|
||||||
import FontIcon from '../icons/FontIcon.svelte';
|
import FontIcon from '../icons/FontIcon.svelte';
|
||||||
import { currentTheme } from '../stores';
|
import { currentTheme } from '../stores';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { writable, derived, readable } from 'svelte/store';
|
import { writable, derived, readable } from 'svelte/store';
|
||||||
import { ExtensionsDirectory } from 'dbgate-types';
|
import type { ExtensionsDirectory } from 'dbgate-types';
|
||||||
import invalidateCommands from './commands/invalidateCommands';
|
import invalidateCommands from './commands/invalidateCommands';
|
||||||
import getElectron from './utility/getElectron';
|
import getElectron from './utility/getElectron';
|
||||||
import { getSettings, useConfig, useSettings } from './utility/metadataLoaders';
|
import { getSettings, useConfig, useSettings } from './utility/metadataLoaders';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ApplicationDefinition, StoredConnection } from 'dbgate-types';
|
import type { ApplicationDefinition, StoredConnection } from 'dbgate-types';
|
||||||
import { apiCall } from '../utility/api';
|
import { apiCall } from '../utility/api';
|
||||||
|
|
||||||
export async function saveDbToApp(conid: string, database: string, app: string) {
|
export async function saveDbToApp(conid: string, database: string, app: string) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { QuickExportDefinition } from 'dbgate-types';
|
import type { QuickExportDefinition } from 'dbgate-types';
|
||||||
import { getExtensions } from '../stores';
|
import { getExtensions } from '../stores';
|
||||||
|
|
||||||
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { DictionaryDescription } from 'dbgate-datalib';
|
import { DictionaryDescription } from 'dbgate-datalib';
|
||||||
import { ApplicationDefinition, TableInfo } from 'dbgate-types';
|
import type { ApplicationDefinition, TableInfo } from 'dbgate-types';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { apiCall } from './api';
|
import { apiCall } from './api';
|
||||||
import { filterAppsForDatabase, saveDbToApp } from './appTools';
|
import { filterAppsForDatabase, saveDbToApp } from './appTools';
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { loadCachedValue, subscribeCacheChange, unsubscribeCacheChange } from './cache';
|
import { loadCachedValue, subscribeCacheChange, unsubscribeCacheChange } from './cache';
|
||||||
import stableStringify from 'json-stable-stringify';
|
import stableStringify from 'json-stable-stringify';
|
||||||
import getAsArray from './getAsArray';
|
|
||||||
import { DatabaseInfo } from 'dbgate-types';
|
|
||||||
import { derived } from 'svelte/store';
|
import { derived } from 'svelte/store';
|
||||||
import { extendDatabaseInfo } from 'dbgate-tools';
|
import { extendDatabaseInfo } from 'dbgate-tools';
|
||||||
import { setLocalStorage } from '../utility/storageCache';
|
import { setLocalStorage } from '../utility/storageCache';
|
||||||
|
@ -48,16 +48,17 @@ const driver = {
|
|||||||
...driverBase,
|
...driverBase,
|
||||||
analyserClass: Analyser,
|
analyserClass: Analyser,
|
||||||
async connect({ server, port, user, password, database, useDatabaseUrl, databaseUrl, ssl }) {
|
async connect({ server, port, user, password, database, useDatabaseUrl, databaseUrl, ssl }) {
|
||||||
// let mongoUrl = databaseUrl;
|
let mongoUrl;
|
||||||
// if (!useDatabaseUrl) {
|
if (useDatabaseUrl) {
|
||||||
// mongoUrl = user ? `mongodb://${user}:${password}@${server}:${port}` : `mongodb://${server}:${port}`;
|
// change port to ssh tunnel port
|
||||||
// if (database) mongoUrl += '/' + database;
|
const url = new URL(databaseUrl);
|
||||||
// }
|
url.port = port;
|
||||||
const mongoUrl = useDatabaseUrl
|
mongoUrl = url.href;
|
||||||
? databaseUrl
|
} else {
|
||||||
: user
|
mongoUrl = user
|
||||||
? `mongodb://${user}:${password}@${server}:${port}`
|
? `mongodb://${user}:${password}@${server}:${port}`
|
||||||
: `mongodb://${server}:${port}`;
|
: `mongodb://${server}:${port}`;
|
||||||
|
}
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
useUnifiedTopology: true,
|
useUnifiedTopology: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user