Merge branch 'master' into tableeditor2
@@ -1,5 +1,10 @@
|
|||||||
# ChangeLog
|
# ChangeLog
|
||||||
|
|
||||||
|
### 4.2.5
|
||||||
|
- FIXED: Fixed crash when using large model on some installations
|
||||||
|
- FIXED: Postgre SQL CREATE function
|
||||||
|
- FIXED: Analysing of MySQL when modifyDate is not known
|
||||||
|
|
||||||
### 4.2.4
|
### 4.2.4
|
||||||
- ADDED: Query history
|
- ADDED: Query history
|
||||||
- ADDED: One-click exports in desktop app
|
- ADDED: One-click exports in desktop app
|
||||||
|
|||||||
BIN
app/icons/128x128.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/icons/16x16.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/icons/256x256.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
app/icons/32x32.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/icons/48x48.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
app/icons/512x512.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
app/icons/64x64.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
@@ -45,7 +45,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon.png",
|
"icon": "icons/",
|
||||||
"category": "Development",
|
"category": "Development",
|
||||||
"synopsis": "Database manager for SQL Server, MySQL, PostgreSQL, MongoDB and SQLite",
|
"synopsis": "Database manager for SQL Server, MySQL, PostgreSQL, MongoDB and SQLite",
|
||||||
"publish": [
|
"publish": [
|
||||||
@@ -103,4 +103,4 @@
|
|||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"msnodesqlv8": "^2.0.10"
|
"msnodesqlv8": "^2.0.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,13 @@ const engines = [
|
|||||||
drop1: 'DROP PROCEDURE obj1',
|
drop1: 'DROP PROCEDURE obj1',
|
||||||
drop2: 'DROP PROCEDURE obj2',
|
drop2: 'DROP PROCEDURE obj2',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'functions',
|
||||||
|
create1: 'CREATE FUNCTION obj1() returns int LANGUAGE plpgsql AS $$ declare res integer; begin select count(*) into res from t1; return res; end; $$',
|
||||||
|
create2: 'CREATE FUNCTION obj2() returns int LANGUAGE plpgsql AS $$ declare res integer; begin select count(*) into res from t2; return res; end; $$',
|
||||||
|
drop1: 'DROP FUNCTION obj1',
|
||||||
|
drop2: 'DROP FUNCTION obj2',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "4.2.5-beta.2",
|
"version": "4.2.6-beta.1",
|
||||||
"name": "dbgate-all",
|
"name": "dbgate-all",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#each filtered as item (module.extractKey(item.data))}
|
{#each filtered as item}
|
||||||
<AppObjectListItem
|
<AppObjectListItem
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
{module}
|
{module}
|
||||||
|
|||||||
@@ -66,8 +66,6 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import registerCommand from '../commands/registerCommand';
|
import registerCommand from '../commands/registerCommand';
|
||||||
import { registerMenu } from '../utility/contextMenu';
|
import { registerMenu } from '../utility/contextMenu';
|
||||||
import { useSettings } from '../utility/metadataLoaders';
|
|
||||||
import { getCurrentSettings } from '../stores';
|
|
||||||
import { getBoolSettingsValue } from '../settings/settingsTools';
|
import { getBoolSettingsValue } from '../settings/settingsTools';
|
||||||
|
|
||||||
export let config;
|
export let config;
|
||||||
|
|||||||
@@ -13,6 +13,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const dateTimeRegex = /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d\d)?Z?$/;
|
const dateTimeRegex = /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d\d\d)?Z?$/;
|
||||||
|
|
||||||
|
function formatNumber(value) {
|
||||||
|
if (value >= 10000 || value <= -10000) {
|
||||||
|
if (getBoolSettingsValue('dataGrid.thousandsSeparator', false)) {
|
||||||
|
return value.toLocaleString();
|
||||||
|
} else {
|
||||||
|
return value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return value.toString();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -20,6 +32,7 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { isTypeLogical } from 'dbgate-tools';
|
import { isTypeLogical } from 'dbgate-tools';
|
||||||
import ShowFormButton from '../formview/ShowFormButton.svelte';
|
import ShowFormButton from '../formview/ShowFormButton.svelte';
|
||||||
|
import { getBoolSettingsValue } from '../settings/settingsTools';
|
||||||
|
|
||||||
export let rowIndex;
|
export let rowIndex;
|
||||||
export let col;
|
export let col;
|
||||||
@@ -80,16 +93,10 @@
|
|||||||
0
|
0
|
||||||
{/if}
|
{/if}
|
||||||
{:else if _.isNumber(value)}
|
{:else if _.isNumber(value)}
|
||||||
{#if value >= 10000 || value <= -10000}
|
{#if isDynamicStructure}
|
||||||
{#if isDynamicStructure}
|
<span class="value">{formatNumber(value)}</span>
|
||||||
<span class="value">{value.toLocaleString()}</span>
|
|
||||||
{:else}
|
|
||||||
{value.toLocaleString()}
|
|
||||||
{/if}
|
|
||||||
{:else if isDynamicStructure}
|
|
||||||
<span class="value">{value.toString()}</span>
|
|
||||||
{:else}
|
{:else}
|
||||||
{value.toString()}
|
{formatNumber(value)}
|
||||||
{/if}
|
{/if}
|
||||||
{:else if _.isString(value)}
|
{:else if _.isString(value)}
|
||||||
{#if dateTimeRegex.test(value)}
|
{#if dateTimeRegex.test(value)}
|
||||||
|
|||||||
@@ -46,6 +46,8 @@
|
|||||||
/>
|
/>
|
||||||
<FormCheckboxField name="dataGrid.showHintColumns" label="Show foreign key hints" defaultValue={true} />
|
<FormCheckboxField name="dataGrid.showHintColumns" label="Show foreign key hints" defaultValue={true} />
|
||||||
|
|
||||||
|
<FormCheckboxField name="dataGrid.thousandsSeparator" label="Use thounds separator for numbers" />
|
||||||
|
|
||||||
<div class="heading">Connection</div>
|
<div class="heading">Connection</div>
|
||||||
<FormCheckboxField
|
<FormCheckboxField
|
||||||
name="connection.autoRefresh"
|
name="connection.autoRefresh"
|
||||||
|
|||||||
@@ -1,3 +1,17 @@
|
|||||||
|
<script lang="ts" context="module">
|
||||||
|
function generateObjectList(seed = 0) {
|
||||||
|
const counts = [1000, 1200, 1100, 2100, 720];
|
||||||
|
const schemas = ['A', 'dev', 'public', 'dbo'];
|
||||||
|
const types = ['tables', 'views', 'functions', 'procedures', 'matviews', 'triggers'];
|
||||||
|
const res = _.range(1, counts[seed % counts.length]).map(i => ({
|
||||||
|
pureName: `name ${i}`,
|
||||||
|
schemaName: schemas[i % schemas.length],
|
||||||
|
objectTypeField: types[i % types.length],
|
||||||
|
}));
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import InlineButton from '../elements/InlineButton.svelte';
|
import InlineButton from '../elements/InlineButton.svelte';
|
||||||
import SearchInput from '../elements/SearchInput.svelte';
|
import SearchInput from '../elements/SearchInput.svelte';
|
||||||
@@ -33,6 +47,10 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// let generateIndex = 0;
|
||||||
|
// setInterval(() => (generateIndex += 1), 2000);
|
||||||
|
// $: objectList = generateObjectList(generateIndex);
|
||||||
|
|
||||||
const handleRefreshDatabase = () => {
|
const handleRefreshDatabase = () => {
|
||||||
axiosInstance.post('database-connections/refresh', { conid, database });
|
axiosInstance.post('database-connections/refresh', { conid, database });
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const Analyser = require('./Analyser');
|
|||||||
const MongoClient = require('mongodb').MongoClient;
|
const MongoClient = require('mongodb').MongoClient;
|
||||||
const ObjectId = require('mongodb').ObjectId;
|
const ObjectId = require('mongodb').ObjectId;
|
||||||
const Cursor = require('mongodb').Cursor;
|
const Cursor = require('mongodb').Cursor;
|
||||||
const { createBulkInsertStream } = require('./createBulkInsertStream');
|
const createBulkInsertStream = require('./createBulkInsertStream');
|
||||||
|
|
||||||
function readCursor(cursor, options) {
|
function readCursor(cursor, options) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ class Analyser extends DatabaseAnalyser {
|
|||||||
.filter(x => x.object_type == 'FUNCTION')
|
.filter(x => x.object_type == 'FUNCTION')
|
||||||
.map(func => ({
|
.map(func => ({
|
||||||
objectId: `functions:${func.schema_name}.${func.pure_name}`,
|
objectId: `functions:${func.schema_name}.${func.pure_name}`,
|
||||||
|
createSql: `CREATE FUNCTION "${func.schema_name}"."${func.pure_name}"() RETURNS ${func.data_type} LANGUAGE ${func.language}\nAS\n$$\n${func.definition}\n$$`,
|
||||||
pureName: func.pure_name,
|
pureName: func.pure_name,
|
||||||
schemaName: func.schema_name,
|
schemaName: func.schema_name,
|
||||||
contentHash: func.hash_code,
|
contentHash: func.hash_code,
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ select
|
|||||||
routine_definition as "definition",
|
routine_definition as "definition",
|
||||||
md5(routine_definition) as "hash_code",
|
md5(routine_definition) as "hash_code",
|
||||||
routine_type as "object_type",
|
routine_type as "object_type",
|
||||||
|
data_type as "data_type",
|
||||||
external_language as "language"
|
external_language as "language"
|
||||||
from
|
from
|
||||||
information_schema.routines where routine_schema != 'information_schema' and routine_schema != 'pg_catalog'
|
information_schema.routines where routine_schema != 'information_schema' and routine_schema != 'pg_catalog'
|
||||||
|
|||||||