mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Compare commits
10 Commits
v0.7.27
...
v0.7.28-be
Author | SHA1 | Date | |
---|---|---|---|
97279742e9 | |||
6cb21ff792 | |||
72bacdeabf | |||
c434855879 | |||
ba0ffcc6f5 | |||
8e7965a0f9 | |||
4aab84fbd5 | |||
|
74e97e660d | ||
|
f5d236b521 | ||
|
e794d207ad |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -2,6 +2,24 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [0.7.28-beta.0](https://github.com/antares-sql/antares/compare/v0.7.27...v0.7.28-beta.0) (2024-08-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add missing Dutch strings ([e794d20](https://github.com/antares-sql/antares/commit/e794d207ad75e0f5380f57df579912893e5edb6a))
|
||||||
|
* **translation:** Add more faker translations ([74e97e6](https://github.com/antares-sql/antares/commit/74e97e660df089ed8273565942118e112f6b3220))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* disabled column sort during loadings ([72bacde](https://github.com/antares-sql/antares/commit/72bacdeabf833880482a839c4735505573d33bdc))
|
||||||
|
* html tags searching in history or saved queries, fixes [#847](https://github.com/antares-sql/antares/issues/847) ([6cb21ff](https://github.com/antares-sql/antares/commit/6cb21ff7926c74469b421c47b434612b3894b4c2))
|
||||||
|
* **PostgreSQL:** issue exporting tables with primary keys ([c434855](https://github.com/antares-sql/antares/commit/c434855879de16f83e17784e38e931decdd94873))
|
||||||
|
* **PostgreSQL:** wrong export formato of JSON fields ([8e7965a](https://github.com/antares-sql/antares/commit/8e7965a0f94a17ed73d5c8913f66e4e9cf0b11c7))
|
||||||
|
* **translation:** Spelling error ([f5d236b](https://github.com/antares-sql/antares/commit/f5d236b521a3534754de0b1031513f8eb83b3cc0))
|
||||||
|
* wrong password message importing app data ([ba0ffcc](https://github.com/antares-sql/antares/commit/ba0ffcc6f56c5506c1768c05d43bb07f7b090a68))
|
||||||
|
|
||||||
### [0.7.27](https://github.com/antares-sql/antares/compare/v0.7.26...v0.7.27) (2024-07-16)
|
### [0.7.27](https://github.com/antares-sql/antares/compare/v0.7.26...v0.7.27) (2024-07-16)
|
||||||
|
|
||||||
|
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"version": "0.7.27",
|
"version": "0.7.28-beta.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"version": "0.7.27",
|
"version": "0.7.28-beta.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "antares",
|
"name": "antares",
|
||||||
"productName": "Antares",
|
"productName": "Antares",
|
||||||
"version": "0.7.27",
|
"version": "0.7.28-beta.0",
|
||||||
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": "https://github.com/antares-sql/antares.git",
|
"repository": "https://github.com/antares-sql/antares.git",
|
||||||
|
@@ -40,7 +40,7 @@ export const objectToGeoJSON = (val: any) => {
|
|||||||
export const escapeAndQuote = (val: string, client: ClientCode) => {
|
export const escapeAndQuote = (val: string, client: ClientCode) => {
|
||||||
const { stringsWrapper: sw } = customizations[client];
|
const { stringsWrapper: sw } = customizations[client];
|
||||||
// eslint-disable-next-line no-control-regex
|
// eslint-disable-next-line no-control-regex
|
||||||
const CHARS_TO_ESCAPE = /[\0\b\t\n\r\x1a"'\\]/g;
|
const CHARS_TO_ESCAPE = sw === '"' ? /[\0\b\t\n\r\x1a"'\\]/g : /[\0\b\t\n\r\x1a'\\]/g;
|
||||||
const CHARS_ESCAPE_MAP: Record<string, string> = {
|
const CHARS_ESCAPE_MAP: Record<string, string> = {
|
||||||
'\0': '\\0',
|
'\0': '\\0',
|
||||||
'\b': '\\b',
|
'\b': '\\b',
|
||||||
@@ -48,10 +48,13 @@ export const escapeAndQuote = (val: string, client: ClientCode) => {
|
|||||||
'\n': '\\n',
|
'\n': '\\n',
|
||||||
'\r': '\\r',
|
'\r': '\\r',
|
||||||
'\x1a': '\\Z',
|
'\x1a': '\\Z',
|
||||||
'"': '\\"',
|
|
||||||
'\'': '\\\'',
|
'\'': '\\\'',
|
||||||
'\\': '\\\\'
|
'\\': '\\\\'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (sw === '"')
|
||||||
|
CHARS_ESCAPE_MAP['"'] = '\\"';
|
||||||
|
|
||||||
let chunkIndex = CHARS_TO_ESCAPE.lastIndex = 0;
|
let chunkIndex = CHARS_TO_ESCAPE.lastIndex = 0;
|
||||||
let escapedVal = '';
|
let escapedVal = '';
|
||||||
let match;
|
let match;
|
||||||
@@ -97,10 +100,19 @@ export const valueToSqlString = (args: {
|
|||||||
}
|
}
|
||||||
else if ('isArray' in field && field.isArray) {
|
else if ('isArray' in field && field.isArray) {
|
||||||
let localVal;
|
let localVal;
|
||||||
if (Array.isArray(val))
|
if (Array.isArray(val)) {
|
||||||
localVal = JSON.stringify(val).replaceAll('[', '{').replaceAll(']', '}');
|
localVal = JSON
|
||||||
else
|
.stringify(val)
|
||||||
localVal = typeof val === 'string' ? val.replaceAll('[', '{').replaceAll(']', '}') : '';
|
.replaceAll('[', '{')
|
||||||
|
.replaceAll(']', '}');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
localVal = typeof val === 'string'
|
||||||
|
? val
|
||||||
|
.replaceAll('[', '{')
|
||||||
|
.replaceAll(']', '}')
|
||||||
|
: '';
|
||||||
|
}
|
||||||
parsedValue = `'${localVal}'`;
|
parsedValue = `'${localVal}'`;
|
||||||
}
|
}
|
||||||
else if (TEXT_SEARCH.includes(field.type))
|
else if (TEXT_SEARCH.includes(field.type))
|
||||||
|
@@ -251,7 +251,7 @@ export default (connections: Record<string, antares.Client>) => {
|
|||||||
setTimeout(() => { // Ensures that writing thread has finished
|
setTimeout(() => { // Ensures that writing thread has finished
|
||||||
exporter?.terminate();
|
exporter?.terminate();
|
||||||
exporter = null;
|
exporter = null;
|
||||||
}, 2000);
|
}, 500);
|
||||||
resolve({ status: 'success', response: payload });
|
resolve({ status: 'success', response: payload });
|
||||||
break;
|
break;
|
||||||
case 'cancel':
|
case 'cancel':
|
||||||
|
@@ -591,8 +591,8 @@ export class PostgreSQLClient extends BaseClient {
|
|||||||
}
|
}
|
||||||
/* eslint-enable camelcase */
|
/* eslint-enable camelcase */
|
||||||
|
|
||||||
if (schema !== 'public')
|
// if (schema !== 'public')
|
||||||
await this.use(schema);
|
await this.use(schema);
|
||||||
|
|
||||||
const { rows } = await this.raw<antares.QueryResult<ShowIntexesResult>>(`WITH ndx_list AS (
|
const { rows } = await this.raw<antares.QueryResult<ShowIntexesResult>>(`WITH ndx_list AS (
|
||||||
SELECT pg_index.indexrelid, pg_class.oid
|
SELECT pg_index.indexrelid, pg_class.oid
|
||||||
@@ -636,35 +636,7 @@ export class PostgreSQLClient extends BaseClient {
|
|||||||
}, {} as {table: string; schema: string}[]);
|
}, {} as {table: string; schema: string}[]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
async getTableDll ({ schema, table }: { schema: string; table: string }) {
|
async getTableDll ({ schema, table }: { schema: string; table: string }) {
|
||||||
// const { rows } = await this.raw<antares.QueryResult<{'ddl'?: string}>>(`
|
|
||||||
// SELECT
|
|
||||||
// 'CREATE TABLE ' || relname || E'\n(\n' ||
|
|
||||||
// array_to_string(
|
|
||||||
// array_agg(' ' || column_name || ' ' || type || ' '|| not_null)
|
|
||||||
// , E',\n'
|
|
||||||
// ) || E'\n);\n' AS ddl
|
|
||||||
// FROM (
|
|
||||||
// SELECT
|
|
||||||
// a.attname AS column_name
|
|
||||||
// , pg_catalog.format_type(a.atttypid, a.atttypmod) AS type
|
|
||||||
// , CASE WHEN a.attnotnull THEN 'NOT NULL' ELSE 'NULL' END AS not_null
|
|
||||||
// , c.relname
|
|
||||||
// FROM pg_attribute a, pg_class c, pg_type t
|
|
||||||
// WHERE a.attnum > 0
|
|
||||||
// AND a.attrelid = c.oid
|
|
||||||
// AND a.atttypid = t.oid
|
|
||||||
// AND c.relname = '${table}'
|
|
||||||
// ORDER BY a.attnum
|
|
||||||
// ) AS tabledefinition
|
|
||||||
// GROUP BY relname
|
|
||||||
// `);
|
|
||||||
|
|
||||||
// if (rows.length)
|
|
||||||
// return rows[0].ddl;
|
|
||||||
// else return '';
|
|
||||||
|
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
interface SequenceRecord {
|
interface SequenceRecord {
|
||||||
sequence_catalog: string;
|
sequence_catalog: string;
|
||||||
@@ -706,6 +678,34 @@ export class PostgreSQLClient extends BaseClient {
|
|||||||
|
|
||||||
if (!rows.length) return '';
|
if (!rows.length) return '';
|
||||||
|
|
||||||
|
const indexes = await this.getTableIndexes({ schema, table });
|
||||||
|
const primaryKey = indexes
|
||||||
|
.filter(i => i.type === 'PRIMARY')
|
||||||
|
.reduce((acc, cur) => {
|
||||||
|
if (!Object.keys(acc).length) {
|
||||||
|
cur.column = `"${cur.column}"`;
|
||||||
|
acc = cur;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
acc.column += `, "${cur.column}"`;
|
||||||
|
return acc;
|
||||||
|
}, {} as { name: string; column: string; type: string});
|
||||||
|
|
||||||
|
const remappedIndexes = indexes
|
||||||
|
.filter(i => i.type !== 'PRIMARY')
|
||||||
|
.reduce((acc, cur) => {
|
||||||
|
const existingIndex = acc.findIndex(i => i.name === cur.name);
|
||||||
|
|
||||||
|
if (existingIndex >= 0)
|
||||||
|
acc[existingIndex].column += `, "${cur.column}"`;
|
||||||
|
else {
|
||||||
|
cur.column = `"${cur.column}"`;
|
||||||
|
acc.push(cur);
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, [] as { name: string; column: string; type: string}[]);
|
||||||
|
|
||||||
for (const column of rows) {
|
for (const column of rows) {
|
||||||
let fieldType = column.data_type;
|
let fieldType = column.data_type;
|
||||||
if (fieldType === 'USER-DEFINED') fieldType = `"${schema}".${column.udt_name}`;
|
if (fieldType === 'USER-DEFINED') fieldType = `"${schema}".${column.udt_name}`;
|
||||||
@@ -733,6 +733,9 @@ export class PostgreSQLClient extends BaseClient {
|
|||||||
columnsSql.push(columnArr.join(' '));
|
columnsSql.push(columnArr.join(' '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (primaryKey)
|
||||||
|
columnsSql.push(`CONSTRAINT "${primaryKey.name}" PRIMARY KEY (${primaryKey.column})`);
|
||||||
|
|
||||||
// Table sequences
|
// Table sequences
|
||||||
for (let sequence of sequences) {
|
for (let sequence of sequences) {
|
||||||
if (sequence.includes('.')) sequence = sequence.split('.')[1];
|
if (sequence.includes('.')) sequence = sequence.split('.')[1];
|
||||||
@@ -749,25 +752,22 @@ export class PostgreSQLClient extends BaseClient {
|
|||||||
INCREMENT BY ${rows[0].increment}
|
INCREMENT BY ${rows[0].increment}
|
||||||
MINVALUE ${rows[0].minimum_value}
|
MINVALUE ${rows[0].minimum_value}
|
||||||
MAXVALUE ${rows[0].maximum_value}
|
MAXVALUE ${rows[0].maximum_value}
|
||||||
CACHE 1;\n`;
|
CACHE 1;\n\n`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Table create
|
// Table create
|
||||||
createSql += `\nCREATE TABLE "${schema}"."${table}"(
|
createSql += `CREATE TABLE "${schema}"."${table}"(
|
||||||
${columnsSql.join(',\n ')}
|
${columnsSql.join(',\n ')}
|
||||||
);\n`;
|
);\n`;
|
||||||
|
|
||||||
// Table indexes
|
// Table indexes
|
||||||
createSql += '\n';
|
createSql += '\n';
|
||||||
const { rows: indexes } = await this.select('*')
|
|
||||||
.schema('pg_catalog')
|
|
||||||
.from('pg_indexes')
|
|
||||||
.where({ schemaname: `= '${schema}'`, tablename: `= '${table}'` })
|
|
||||||
.run<{indexdef: string}>();
|
|
||||||
|
|
||||||
for (const index of indexes)
|
for (const index of remappedIndexes) {
|
||||||
createSql += `${index.indexdef};\n`;
|
if (index.type !== 'PRIMARY')
|
||||||
|
createSql += `CREATE ${index.type}${index.type === 'UNIQUE' ? ' INDEX' : ''} "${index.name}" ON "${schema}"."${table}" (${index.column});\n`;
|
||||||
|
}
|
||||||
|
|
||||||
return createSql;
|
return createSql;
|
||||||
}
|
}
|
||||||
|
@@ -336,7 +336,8 @@ CREATE TABLE \`${view.Name}\`(
|
|||||||
const connection = await this._client.getConnection();
|
const connection = await this._client.getConnection();
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const stream = (connection as any).connection.query(sql).stream();
|
const stream = (connection as any).connection.query(sql).stream();
|
||||||
const dispose = () => connection.end();
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const dispose = () => (connection as any).release();
|
||||||
|
|
||||||
stream.on('end', dispose);
|
stream.on('end', dispose);
|
||||||
stream.on('error', dispose);
|
stream.on('error', dispose);
|
||||||
|
@@ -39,115 +39,7 @@ SET row_security = off;\n\n\n`;
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getCreateTable (tableName: string) {
|
async getCreateTable (tableName: string) {
|
||||||
/* eslint-disable camelcase */
|
const createSql = await this._client.getTableDll({ schema: this.schemaName, table: tableName });
|
||||||
interface SequenceRecord {
|
|
||||||
sequence_catalog: string;
|
|
||||||
sequence_schema: string;
|
|
||||||
sequence_name: string;
|
|
||||||
data_type: string;
|
|
||||||
numeric_precision: number;
|
|
||||||
numeric_precision_radix: number;
|
|
||||||
numeric_scale: number;
|
|
||||||
start_value: string;
|
|
||||||
minimum_value: string;
|
|
||||||
maximum_value: string;
|
|
||||||
increment: string;
|
|
||||||
cycle_option: string;
|
|
||||||
}
|
|
||||||
/* eslint-enable camelcase */
|
|
||||||
|
|
||||||
let createSql = '';
|
|
||||||
const sequences = [];
|
|
||||||
const columnsSql = [];
|
|
||||||
const arrayTypes: Record<string, string> = {
|
|
||||||
_int2: 'smallint',
|
|
||||||
_int4: 'integer',
|
|
||||||
_int8: 'bigint',
|
|
||||||
_float4: 'real',
|
|
||||||
_float8: 'double precision',
|
|
||||||
_char: '"char"',
|
|
||||||
_varchar: 'character varying'
|
|
||||||
};
|
|
||||||
|
|
||||||
// Table columns
|
|
||||||
const { rows } = await this._client.raw(`
|
|
||||||
SELECT *
|
|
||||||
FROM "information_schema"."columns"
|
|
||||||
WHERE "table_schema" = '${this.schemaName}'
|
|
||||||
AND "table_name" = '${tableName}'
|
|
||||||
ORDER BY "ordinal_position" ASC
|
|
||||||
`, { schema: 'information_schema' });
|
|
||||||
|
|
||||||
if (!rows.length) return '';
|
|
||||||
|
|
||||||
for (const column of rows) {
|
|
||||||
let fieldType = column.data_type;
|
|
||||||
if (fieldType === 'USER-DEFINED') fieldType = `"${this.schemaName}".${column.udt_name}`;
|
|
||||||
else if (fieldType === 'ARRAY') {
|
|
||||||
if (Object.keys(arrayTypes).includes(fieldType))
|
|
||||||
fieldType = arrayTypes[column.udt_name] + '[]';
|
|
||||||
else
|
|
||||||
fieldType = column.udt_name.replaceAll('_', '') + '[]';
|
|
||||||
}
|
|
||||||
|
|
||||||
const columnArr = [
|
|
||||||
`"${column.column_name}"`,
|
|
||||||
`${fieldType}${column.character_maximum_length ? `(${column.character_maximum_length})` : ''}`
|
|
||||||
];
|
|
||||||
|
|
||||||
if (column.column_default) {
|
|
||||||
columnArr.push(`DEFAULT ${column.column_default}`);
|
|
||||||
if (column.column_default.includes('nextval')) {
|
|
||||||
const sequenceName = column.column_default.split('\'')[1];
|
|
||||||
sequences.push(sequenceName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (column.is_nullable === 'NO') columnArr.push('NOT NULL');
|
|
||||||
|
|
||||||
columnsSql.push(columnArr.join(' '));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Table sequences
|
|
||||||
for (let sequence of sequences) {
|
|
||||||
if (sequence.includes('.')) sequence = sequence.split('.')[1];
|
|
||||||
|
|
||||||
const { rows } = await this._client
|
|
||||||
.select('*')
|
|
||||||
.schema('information_schema')
|
|
||||||
.from('sequences')
|
|
||||||
.where({ sequence_schema: `= '${this.schemaName}'`, sequence_name: `= '${sequence}'` })
|
|
||||||
.run<SequenceRecord>();
|
|
||||||
|
|
||||||
if (rows.length) {
|
|
||||||
createSql += `CREATE SEQUENCE "${this.schemaName}"."${sequence}"
|
|
||||||
START WITH ${rows[0].start_value}
|
|
||||||
INCREMENT BY ${rows[0].increment}
|
|
||||||
MINVALUE ${rows[0].minimum_value}
|
|
||||||
MAXVALUE ${rows[0].maximum_value}
|
|
||||||
CACHE 1;\n`;
|
|
||||||
|
|
||||||
// createSql += `\nALTER TABLE "${sequence}" OWNER TO ${this._client._params.user};\n\n`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Table create
|
|
||||||
createSql += `\nCREATE TABLE "${this.schemaName}"."${tableName}"(
|
|
||||||
${columnsSql.join(',\n ')}
|
|
||||||
);\n`;
|
|
||||||
|
|
||||||
// createSql += `\nALTER TABLE "${tableName}" OWNER TO ${this._client._params.user};\n\n`;
|
|
||||||
|
|
||||||
// Table indexes
|
|
||||||
createSql += '\n';
|
|
||||||
const { rows: indexes } = await this._client
|
|
||||||
.select('*')
|
|
||||||
.schema('pg_catalog')
|
|
||||||
.from('pg_indexes')
|
|
||||||
.where({ schemaname: `= '${this.schemaName}'`, tablename: `= '${tableName}'` })
|
|
||||||
.run<{indexdef: string}>();
|
|
||||||
|
|
||||||
for (const index of indexes)
|
|
||||||
createSql += `${index.indexdef};\n`;
|
|
||||||
|
|
||||||
// Table foreigns
|
// Table foreigns
|
||||||
const { rows: foreigns } = await this._client.raw(`
|
const { rows: foreigns } = await this._client.raw(`
|
||||||
|
@@ -380,6 +380,7 @@ const startExport = async () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const { status, response } = await Schema.export(params);
|
const { status, response } = await Schema.export(params);
|
||||||
|
|
||||||
if (status === 'success')
|
if (status === 'success')
|
||||||
progressStatus.value = response.cancelled ? t('general.aborted') : t('general.completed');
|
progressStatus.value = response.cancelled ? t('general.aborted') : t('general.completed');
|
||||||
else {
|
else {
|
||||||
|
@@ -75,7 +75,7 @@
|
|||||||
<code
|
<code
|
||||||
class="cut-text"
|
class="cut-text"
|
||||||
:title="query.sql"
|
:title="query.sql"
|
||||||
v-html="highlight(highlightWord(query.sql), {html: true})"
|
v-html="highlight(query.sql, {html: true})"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="tile-bottom-content">
|
<div class="tile-bottom-content">
|
||||||
@@ -210,17 +210,6 @@ const resizeResults = () => {
|
|||||||
const refreshScroller = () => resizeResults();
|
const refreshScroller = () => resizeResults();
|
||||||
const closeModal = () => emit('close');
|
const closeModal = () => emit('close');
|
||||||
|
|
||||||
const highlightWord = (string: string) => {
|
|
||||||
string = string.replaceAll('<', '<').replaceAll('>', '>');
|
|
||||||
|
|
||||||
if (searchTerm.value) {
|
|
||||||
const regexp = new RegExp(`(${searchTerm.value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})`, 'gi');
|
|
||||||
return string.replace(regexp, '<span class="text-primary text-bold">$1</span>');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return string;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onKey = (e: KeyboardEvent) => {
|
const onKey = (e: KeyboardEvent) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (e.key === 'Escape')
|
if (e.key === 'Escape')
|
||||||
|
@@ -247,7 +247,7 @@ const exportData = () => {
|
|||||||
const exportObj = encrypt(JSON.stringify({
|
const exportObj = encrypt(JSON.stringify({
|
||||||
connections: filteredConnections,
|
connections: filteredConnections,
|
||||||
connectionsOrder: filteredOrders,
|
connectionsOrder: filteredOrders,
|
||||||
customIcons
|
customIcons: customIcons.value
|
||||||
}), options.value.passkey);
|
}), options.value.passkey);
|
||||||
|
|
||||||
// console.log(exportObj, JSON.parse(decrypt(exportObj, options.value.passkey)));
|
// console.log(exportObj, JSON.parse(decrypt(exportObj, options.value.passkey)));
|
||||||
|
@@ -206,7 +206,6 @@ const importData = () => {
|
|||||||
.includes(c.uid) ||
|
.includes(c.uid) ||
|
||||||
(c.isFolder && c.connections.every(c => newConnectionsUid.includes(c))));
|
(c.isFolder && c.connections.every(c => newConnectionsUid.includes(c))));
|
||||||
}
|
}
|
||||||
|
|
||||||
importConnections(importObj);
|
importConnections(importObj);
|
||||||
|
|
||||||
addNotification({
|
addNotification({
|
||||||
@@ -216,6 +215,7 @@ const importData = () => {
|
|||||||
closeModal();
|
closeModal();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
console.error(error);
|
||||||
addNotification({
|
addNotification({
|
||||||
status: 'error',
|
status: 'error',
|
||||||
message: t('application.wrongImportPassword')
|
message: t('application.wrongImportPassword')
|
||||||
@@ -223,6 +223,7 @@ const importData = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
console.error(error);
|
||||||
addNotification({
|
addNotification({
|
||||||
status: 'error',
|
status: 'error',
|
||||||
message: t('application.wrongFileFormat')
|
message: t('application.wrongFileFormat')
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
v-if="note.type === 'query'"
|
v-if="note.type === 'query'"
|
||||||
ref="noteParagraph"
|
ref="noteParagraph"
|
||||||
class="tile-paragraph sql"
|
class="tile-paragraph sql"
|
||||||
v-html="highlight(highlightWord(note.note), {html: true})"
|
v-html="highlight(note.note, {html: true})"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
|
@@ -253,6 +253,7 @@
|
|||||||
v-if="results"
|
v-if="results"
|
||||||
v-show="!isQuering"
|
v-show="!isQuering"
|
||||||
ref="queryTable"
|
ref="queryTable"
|
||||||
|
:is-quering="isQuering"
|
||||||
:results="results"
|
:results="results"
|
||||||
:tab-uid="tab.uid"
|
:tab-uid="tab.uid"
|
||||||
:conn-uid="connection.uid"
|
:conn-uid="connection.uid"
|
||||||
|
@@ -291,6 +291,7 @@ const { consoleHeight } = storeToRefs(consoleStore);
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
results: Array as Prop<QueryResult[]>,
|
results: Array as Prop<QueryResult[]>,
|
||||||
connUid: String,
|
connUid: String,
|
||||||
|
isQuering: Boolean,
|
||||||
mode: String as Prop<'table' | 'query'>,
|
mode: String as Prop<'table' | 'query'>,
|
||||||
page: {
|
page: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -790,7 +791,7 @@ const contextMenu = (event: MouseEvent, cell: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const sort = (field: TableField) => {
|
const sort = (field: TableField) => {
|
||||||
if (!isSortable.value) return;
|
if (!isSortable.value || props.isQuering) return;
|
||||||
|
|
||||||
selectedRows.value = [];
|
selectedRows.value = [];
|
||||||
let fieldName = field.name;
|
let fieldName = field.name;
|
||||||
|
@@ -202,6 +202,7 @@
|
|||||||
v-if="results"
|
v-if="results"
|
||||||
ref="queryTable"
|
ref="queryTable"
|
||||||
:results="results"
|
:results="results"
|
||||||
|
:is-quering="isQuering"
|
||||||
:page="page"
|
:page="page"
|
||||||
:tab-uid="tabUid"
|
:tab-uid="tabUid"
|
||||||
:conn-uid="connection.uid"
|
:conn-uid="connection.uid"
|
||||||
|
@@ -15,7 +15,7 @@ export const nlNL = {
|
|||||||
results: 'Resultaten',
|
results: 'Resultaten',
|
||||||
size: 'Grootte',
|
size: 'Grootte',
|
||||||
mimeType: 'Mime-Type',
|
mimeType: 'Mime-Type',
|
||||||
download: 'Download',
|
download: 'Download', // Same as English
|
||||||
add: 'Toevoegen',
|
add: 'Toevoegen',
|
||||||
data: 'Data',
|
data: 'Data',
|
||||||
properties: 'Eigenschappen',
|
properties: 'Eigenschappen',
|
||||||
@@ -65,7 +65,13 @@ export const nlNL = {
|
|||||||
outputFormat: 'Uitvoerformaat',
|
outputFormat: 'Uitvoerformaat',
|
||||||
singleFile: 'Enkel {ext}-bestand',
|
singleFile: 'Enkel {ext}-bestand',
|
||||||
zipCompressedFile: 'ZIP gecomprimeerd {ext}-bestand',
|
zipCompressedFile: 'ZIP gecomprimeerd {ext}-bestand',
|
||||||
include: 'Inclusief'
|
include: 'Inclusief',
|
||||||
|
search: 'Zoek',
|
||||||
|
copyName: 'Kopieer naam',
|
||||||
|
title: 'Titel',
|
||||||
|
archive: 'Archief',
|
||||||
|
undo: 'Ongedaan maken',
|
||||||
|
moveTo: 'Verplaats naar'
|
||||||
},
|
},
|
||||||
connection: {
|
connection: {
|
||||||
connectionName: 'Naam verbinding',
|
connectionName: 'Naam verbinding',
|
||||||
@@ -100,7 +106,10 @@ export const nlNL = {
|
|||||||
readOnlyMode: 'Alleen lezen modus',
|
readOnlyMode: 'Alleen lezen modus',
|
||||||
untrustedConnection: 'Niet vertrouwde verbinding',
|
untrustedConnection: 'Niet vertrouwde verbinding',
|
||||||
allConnections: 'Alle verbindingen',
|
allConnections: 'Alle verbindingen',
|
||||||
searchForConnections: 'Zoek naar verbindingen'
|
searchForConnections: 'Zoek naar verbindingen',
|
||||||
|
singleConnection: 'Enkele verbinding',
|
||||||
|
connection: 'Verbinding',
|
||||||
|
keepAliveInterval: 'Keep alive interval'
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
schema: 'Schema',
|
schema: 'Schema',
|
||||||
@@ -260,7 +269,15 @@ export const nlNL = {
|
|||||||
targetTable: 'Doeltabel',
|
targetTable: 'Doeltabel',
|
||||||
switchDatabase: 'Wissel van database',
|
switchDatabase: 'Wissel van database',
|
||||||
importQueryErrors: 'Waarschuwing: {n} fout is opgetreden | Waarschuwing: {n} fouten opgetreden',
|
importQueryErrors: 'Waarschuwing: {n} fout is opgetreden | Waarschuwing: {n} fouten opgetreden',
|
||||||
executedQueries: '{n} query uitgevoerd | {n} queries uitgevoerd'
|
executedQueries: '{n} query uitgevoerd | {n} queries uitgevoerd',
|
||||||
|
insert: 'Invoegen',
|
||||||
|
exportTable: 'Exporteer tabel',
|
||||||
|
savedQueries: 'Opgeslagen queries',
|
||||||
|
searchForElements: 'Zoek naar elementen',
|
||||||
|
searchForSchemas: 'Zoek naar schema\'s',
|
||||||
|
materializedview: 'Materialized view | Materialized views',
|
||||||
|
createNewMaterializedView: 'Materialized view maken',
|
||||||
|
newMaterializedView: 'Nieuwe materialized view'
|
||||||
},
|
},
|
||||||
application: {
|
application: {
|
||||||
settings: 'Instellingen',
|
settings: 'Instellingen',
|
||||||
@@ -367,7 +384,30 @@ export const nlNL = {
|
|||||||
wrongFileFormat: 'Bestand is geen geldig .antares bestand',
|
wrongFileFormat: 'Bestand is geen geldig .antares bestand',
|
||||||
required: 'Verplicht',
|
required: 'Verplicht',
|
||||||
choseFile: 'Selecteer bestand',
|
choseFile: 'Selecteer bestand',
|
||||||
password: 'Wachtwoord'
|
password: 'Wachtwoord',
|
||||||
|
note: 'Notitie',
|
||||||
|
data: 'Data',
|
||||||
|
event: 'Event',
|
||||||
|
key: 'Key',
|
||||||
|
customIcon: 'Aangepast pictogram',
|
||||||
|
fileName: 'bestandsnaam',
|
||||||
|
newFolder: 'Nieuwe map',
|
||||||
|
outOfFolder: 'Out of folder',
|
||||||
|
dataImportSuccess: 'Data succesvol geïmporteerd',
|
||||||
|
thereAreNoNotesYet: 'Er zijn nog geen notities',
|
||||||
|
addNote: 'Voeg notitie toe',
|
||||||
|
editNote: 'Bewerk notitie',
|
||||||
|
saveAsNote: 'Sla op als notitie',
|
||||||
|
showArchivedNotes: 'Toon gearchiveerde notities',
|
||||||
|
hideArchivedNotes: 'Verberg gearchiveerde notities',
|
||||||
|
tag: 'Tag',
|
||||||
|
saveFile: 'Bestand opslaan',
|
||||||
|
saveFileAs: 'Bestand opslaan als',
|
||||||
|
openFile: 'Open bestand',
|
||||||
|
openNotes: 'Open notities',
|
||||||
|
debugConsole: 'Debug Console',
|
||||||
|
executedQueries: 'Voer queries uit',
|
||||||
|
sizeLimitError: 'Maximum grootte {size} overschreden'
|
||||||
},
|
},
|
||||||
faker: {
|
faker: {
|
||||||
address: 'Adres',
|
address: 'Adres',
|
||||||
@@ -434,7 +474,7 @@ export const nlNL = {
|
|||||||
engine: 'Engine',
|
engine: 'Engine',
|
||||||
past: 'Verleden',
|
past: 'Verleden',
|
||||||
now: 'Nu',
|
now: 'Nu',
|
||||||
future: 'Future',
|
future: 'Toekomstig',
|
||||||
between: 'Between',
|
between: 'Between',
|
||||||
recent: 'Recent',
|
recent: 'Recent',
|
||||||
soon: 'Soon',
|
soon: 'Soon',
|
||||||
@@ -447,11 +487,11 @@ export const nlNL = {
|
|||||||
amount: 'Amount',
|
amount: 'Amount',
|
||||||
transactionType: 'Transaction type',
|
transactionType: 'Transaction type',
|
||||||
currencyCode: 'Currency code',
|
currencyCode: 'Currency code',
|
||||||
currencyName: 'Currency name',
|
currencyName: 'Valutanaam',
|
||||||
currencySymbol: 'Currency symbol',
|
currencySymbol: 'Valutateken',
|
||||||
bitcoinAddress: 'Bitcoin address',
|
bitcoinAddress: 'Bitcoin adres',
|
||||||
litecoinAddress: 'Litecoin address',
|
litecoinAddress: 'Litecoin adres',
|
||||||
creditCardNumber: 'Credit card number',
|
creditCardNumber: 'Credit card nummer',
|
||||||
creditCardCVV: 'Credit card CVV',
|
creditCardCVV: 'Credit card CVV',
|
||||||
ethereumAddress: 'Ethereum adres',
|
ethereumAddress: 'Ethereum adres',
|
||||||
iban: 'IBAN',
|
iban: 'IBAN',
|
||||||
@@ -487,10 +527,10 @@ export const nlNL = {
|
|||||||
sentence: 'Zin',
|
sentence: 'Zin',
|
||||||
slug: 'Slug',
|
slug: 'Slug',
|
||||||
sentences: 'Zinnen',
|
sentences: 'Zinnen',
|
||||||
paragraph: 'Paragraph',
|
paragraph: 'Paragraaf',
|
||||||
paragraphs: 'Paragraphs',
|
paragraphs: 'Paragrafen',
|
||||||
text: 'Text',
|
text: 'Tekst',
|
||||||
lines: 'Lines',
|
lines: 'Regels',
|
||||||
genre: 'Genre',
|
genre: 'Genre',
|
||||||
firstName: 'Voornaam',
|
firstName: 'Voornaam',
|
||||||
lastName: 'Achternaam',
|
lastName: 'Achternaam',
|
||||||
@@ -500,7 +540,7 @@ export const nlNL = {
|
|||||||
gender: 'Gender',
|
gender: 'Gender',
|
||||||
prefix: 'Prefix',
|
prefix: 'Prefix',
|
||||||
suffix: 'Suffix',
|
suffix: 'Suffix',
|
||||||
title: 'Title',
|
title: 'Titel',
|
||||||
jobDescriptor: 'Job descriptor',
|
jobDescriptor: 'Job descriptor',
|
||||||
jobArea: 'Job area',
|
jobArea: 'Job area',
|
||||||
jobType: 'Job type',
|
jobType: 'Job type',
|
||||||
@@ -514,24 +554,24 @@ export const nlNL = {
|
|||||||
objectElement: 'Object element',
|
objectElement: 'Object element',
|
||||||
uuid: 'Uuid',
|
uuid: 'Uuid',
|
||||||
boolean: 'Boolean',
|
boolean: 'Boolean',
|
||||||
image: 'Image',
|
image: 'Afbeelding',
|
||||||
locale: 'Locale',
|
locale: 'Locale',
|
||||||
alpha: 'Alpha',
|
alpha: 'Alpha',
|
||||||
alphaNumeric: 'Alphanumeric',
|
alphaNumeric: 'Alfanumeriek',
|
||||||
hexaDecimal: 'Hexadecimal',
|
hexaDecimal: 'Hexadecimaal',
|
||||||
fileName: 'File name',
|
fileName: 'Bestandsnaam',
|
||||||
commonFileName: 'Common file name',
|
commonFileName: 'Common file name',
|
||||||
mimeType: 'Mime type',
|
mimeType: 'Mime type',
|
||||||
commonFileType: 'Common file type',
|
commonFileType: 'Common file type',
|
||||||
commonFileExt: 'Common file extension',
|
commonFileExt: 'Common file extension',
|
||||||
fileType: 'File type',
|
fileType: 'Filetype',
|
||||||
fileExt: 'File extension',
|
fileExt: 'File extension',
|
||||||
directoryPath: 'Directory path',
|
directoryPath: 'Directory path',
|
||||||
filePath: 'File path',
|
filePath: 'File path',
|
||||||
semver: 'Semver',
|
semver: 'Semver',
|
||||||
manufacturer: 'Manufacturer',
|
manufacturer: 'Fabrikant',
|
||||||
model: 'Model',
|
model: 'Model',
|
||||||
fuel: 'Fuel',
|
fuel: 'Brandstof',
|
||||||
vin: 'Vin'
|
vin: 'Vin'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user