1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

Compare commits

..

22 Commits

Author SHA1 Message Date
83b3ca563a chore(release): 0.7.15 2023-07-31 13:04:53 +02:00
0fab3bc43c ci: arrangements for beta channel 2023-07-31 13:04:30 +02:00
2e11a0c032 chore: update dependabot branch target 2023-07-26 17:57:14 +02:00
193042b92d chore: update dependabot branch target 2023-07-26 17:42:16 +02:00
51b14195a8 fix(MySQL): error insertinf new fields with some MySQL configurations, fixes #360 2023-07-24 09:09:11 +02:00
f831fcd442 fix: display content of BLOB fields if not binary, fixes #628 2023-07-21 18:17:31 +02:00
3104847b92 Merge pull request #630 from SmileYzn/master
Update pt-BR.ts 🇧🇷
2023-07-21 08:44:11 +02:00
Cleverson
bc0b029369 Update pt-BR.ts 2023-07-20 16:55:23 -03:00
efee7f3a0e Merge branch 'master' of https://github.com/antares-sql/antares 2023-07-17 18:00:43 +02:00
7c820b1827 fix(MySQL): unable to set more than one value in SET fields 2023-07-17 18:00:40 +02:00
38ec703705 Merge pull request #625 from antares-sql/all-contributors/add-zxp19821005
docs: add zxp19821005 as a contributor for platform
2023-07-17 09:34:48 +02:00
allcontributors[bot]
2afb66a2e6 docs: update .all-contributorsrc [skip ci] 2023-07-17 07:34:13 +00:00
allcontributors[bot]
5a5af3af5e docs: update README.md [skip ci] 2023-07-17 07:34:12 +00:00
8f0e5407ae Merge branch 'master' of https://github.com/antares-sql/antares 2023-07-16 11:33:30 +02:00
8bed7c2f34 chore: update README.md AUR link 2023-07-16 11:33:28 +02:00
f4a2f43ea4 Merge pull request #621 from brdtheo/i18n-french-translation
chore(i18n): update french translation
2023-07-16 11:16:41 +02:00
Théo Billardey
6063b3f697 chore(i18n): update french translation 2023-07-15 21:57:18 +02:00
2f5fa0f2e4 feat: export file name with hour, minutes and seconds, closes #610 2023-07-12 15:20:44 +02:00
703a515462 chore(release): 0.7.14 2023-07-07 15:22:53 +02:00
9d8e9a5e1f perf(PostgreSQL): minor improvement to schema selection 2023-07-07 15:22:16 +02:00
1c73503138 fix: unable to insert new rows 2023-07-07 15:21:48 +02:00
32bbc45329 feat: button to open view settings tab 2023-07-07 09:04:40 +02:00
19 changed files with 314 additions and 96 deletions

View File

@@ -230,6 +230,15 @@
"code",
"translation"
]
},
{
"login": "zxp19821005",
"name": "Woodenman",
"avatar_url": "https://avatars.githubusercontent.com/u/4915850?v=4",
"profile": "https://github.com/zxp19821005",
"contributions": [
"platform"
]
}
],
"contributorsPerLine": 7,

View File

@@ -11,3 +11,4 @@ updates:
directory: "/"
schedule:
interval: "monthly"
target-branch: "develop"

42
.github/workflows/build-beta.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Build & release [BETA]
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
ref: beta
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm i
- name: "Build"
run: npm run build
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/*.AppImage,build/*.yml,build/*.deb,build/*.dmg,build/*.blockmap,build/*.zip,build/*.exe"
allowUpdates: true
draft: true
generateReleaseNotes: true

View File

@@ -1,9 +1,12 @@
name: Build & release
name: Build & release [STABLE]
on:
push:
tags:
- "v*"
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
release:
@@ -11,11 +14,13 @@ jobs:
strategy:
matrix:
os: [macos-11, ubuntu-20.04, windows-latest]
os: [macos-11, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
ref: master
- name: Install Node.js
uses: actions/setup-node@v3

View File

@@ -1,6 +1,9 @@
name: Test end-to-end [WINDOWS]
on: push
on:
push:
branches:
- master
jobs:
release:

View File

@@ -2,6 +2,37 @@
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.15](https://github.com/antares-sql/antares/compare/v0.7.14...v0.7.15) (2023-07-31)
### Features
* export file name with hour, minutes and seconds, closes [#610](https://github.com/antares-sql/antares/issues/610) ([2f5fa0f](https://github.com/antares-sql/antares/commit/2f5fa0f2e416e88753c9dc2bf32edefba8c4e072))
### Bug Fixes
* display content of BLOB fields if not binary, fixes [#628](https://github.com/antares-sql/antares/issues/628) ([f831fcd](https://github.com/antares-sql/antares/commit/f831fcd442f16a03f0ea83ff5bf77a4a79906eb6))
* **MySQL:** error insertinf new fields with some MySQL configurations, fixes [#360](https://github.com/antares-sql/antares/issues/360) ([51b1419](https://github.com/antares-sql/antares/commit/51b14195a8a6c7e7f1b12bd4b86b7164a56b2aa5))
* **MySQL:** unable to set more than one value in SET fields ([7c820b1](https://github.com/antares-sql/antares/commit/7c820b18276e4ed5e381d91110acd032862a5be9))
### [0.7.14](https://github.com/antares-sql/antares/compare/v0.7.13...v0.7.14) (2023-07-07)
### Features
* button to open view settings tab ([32bbc45](https://github.com/antares-sql/antares/commit/32bbc453294736970ddbcadd3cc45597277f5bda))
### Bug Fixes
* unable to insert new rows ([1c73503](https://github.com/antares-sql/antares/commit/1c735031380c48aa8b08ed5ce3df80008dc72af8))
### Improvements
* **PostgreSQL:** minor improvement to schema selection ([9d8e9a5](https://github.com/antares-sql/antares/commit/9d8e9a5e1fda190ee7b3d4fd59e6178dd5ec1651))
### [0.7.13](https://github.com/antares-sql/antares/compare/v0.7.12...v0.7.13) (2023-07-06)

View File

@@ -66,7 +66,7 @@ On macOS you can run `.dmg` distribution following [this guide](https://support.
## Download
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/antares) [![Get it from AUR](https://raw.githubusercontent.com/Fabio286/antares/3e00c4bae6e036300c752c1a40c5a038fea9c169/docs/aur-badge.svg)](https://aur.archlinux.org/packages/antares-sql/) [<img src="https://developer.microsoft.com/store/badges/images/English_get-it-from-MS.png" style="height: 56px">](https://www.microsoft.com/p/antares-sql-client/9nhtb9sq51r1?cid=storebadge&ocid=badge&rtc=1&activetab=pivot:overviewtab)
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/antares) [![Get it from AUR](https://raw.githubusercontent.com/Fabio286/antares/3e00c4bae6e036300c752c1a40c5a038fea9c169/docs/aur-badge.svg)](https://aur.archlinux.org/packages/antares-sql-bin) [<img src="https://developer.microsoft.com/store/badges/images/English_get-it-from-MS.png" style="height: 56px">](https://www.microsoft.com/p/antares-sql-client/9nhtb9sq51r1?cid=storebadge&ocid=badge&rtc=1&activetab=pivot:overviewtab)
🚀 **[Other Downloads](https://github.com/Fabio286/antares/releases/latest)**
## Coming soon
@@ -151,6 +151,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/555cider"><img src="https://avatars.githubusercontent.com/u/73565447?v=4?s=100" width="100px;" alt="555cider"/><br /><sub><b>555cider</b></sub></a><br /><a href="#translation-555cider" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/m1khal3v"><img src="https://avatars.githubusercontent.com/u/41085561?v=4?s=100" width="100px;" alt="Anton Mikhalev"/><br /><sub><b>Anton Mikhalev</b></sub></a><br /><a href="#translation-m1khal3v" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://64k.nl/"><img src="https://avatars.githubusercontent.com/u/3864423?v=4?s=100" width="100px;" alt="René"/><br /><sub><b>René</b></sub></a><br /><a href="https://github.com/antares-sql/antares/commits?author=64knl" title="Code">💻</a> <a href="#translation-64knl" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zxp19821005"><img src="https://avatars.githubusercontent.com/u/4915850?v=4?s=100" width="100px;" alt="Woodenman"/><br /><sub><b>Woodenman</b></sub></a><br /><a href="#platform-zxp19821005" title="Packaging/porting to new platform">📦</a></td>
</tr>
</tbody>
</table>

38
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "antares",
"version": "0.7.13",
"version": "0.7.15",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "antares",
"version": "0.7.13",
"version": "0.7.15",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -29,7 +29,7 @@
"moment": "~2.29.4",
"mysql2": "~2.3.2",
"node-firebird": "~1.1.4",
"pg": "~8.7.1",
"pg": "~8.11.1",
"pg-connection-string": "~2.5.0",
"pg-query-stream": "~4.2.3",
"pgsql-ast-parser": "~7.2.1",
@@ -10439,22 +10439,26 @@
"license": "MIT"
},
"node_modules/pg": {
"version": "8.7.3",
"license": "MIT",
"version": "8.11.1",
"resolved": "https://registry.npmjs.org/pg/-/pg-8.11.1.tgz",
"integrity": "sha512-utdq2obft07MxaDg0zBJI+l/M3mBRfIpEN3iSemsz0G5F2/VXx+XzqF4oxrbIZXQxt2AZzIUzyVg/YM6xOP/WQ==",
"dependencies": {
"buffer-writer": "2.0.0",
"packet-reader": "1.0.0",
"pg-connection-string": "^2.5.0",
"pg-pool": "^3.5.1",
"pg-protocol": "^1.5.0",
"pg-connection-string": "^2.6.1",
"pg-pool": "^3.6.1",
"pg-protocol": "^1.6.0",
"pg-types": "^2.1.0",
"pgpass": "1.x"
},
"engines": {
"node": ">= 8.0.0"
},
"optionalDependencies": {
"pg-cloudflare": "^1.1.1"
},
"peerDependencies": {
"pg-native": ">=2.0.0"
"pg-native": ">=3.0.1"
},
"peerDependenciesMeta": {
"pg-native": {
@@ -10462,6 +10466,12 @@
}
}
},
"node_modules/pg-cloudflare": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz",
"integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==",
"optional": true
},
"node_modules/pg-connection-string": {
"version": "2.5.0",
"license": "MIT"
@@ -10481,8 +10491,9 @@
}
},
"node_modules/pg-pool": {
"version": "3.6.0",
"license": "MIT",
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.1.tgz",
"integrity": "sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==",
"peerDependencies": {
"pg": ">=8.0"
}
@@ -10512,6 +10523,11 @@
"node": ">=4"
}
},
"node_modules/pg/node_modules/pg-connection-string": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.1.tgz",
"integrity": "sha512-w6ZzNu6oMmIzEAYVw+RLK0+nqHPt8K3ZnknKi+g48Ak2pr3dtljJW3o+D/n2zzCG07Zoe9VOX3aiKpj+BN0pjg=="
},
"node_modules/pgpass": {
"version": "1.0.5",
"license": "MIT",

View File

@@ -1,7 +1,7 @@
{
"name": "antares",
"productName": "Antares",
"version": "0.7.13",
"version": "0.7.15",
"description": "A modern, fast and productivity driven SQL client with a focus in UX.",
"license": "MIT",
"repository": "https://github.com/antares-sql/antares.git",
@@ -16,7 +16,7 @@
"build:appx": "npm run build -- --win appx",
"rebuild:electron": "rimraf ./dist && npm run postinstall && npm run devtools:install",
"release": "standard-version",
"release:pre": "npm run release -- --prerelease alpha",
"release:beta": "npm run release -- --prerelease beta",
"devtools:install": "node scripts/devtoolsInstaller",
"postinstall": "electron-builder install-app-deps",
"test:e2e": "npm run compile && npm run test:e2e-dry",
@@ -136,7 +136,7 @@
"moment": "~2.29.4",
"mysql2": "~2.3.2",
"node-firebird": "~1.1.4",
"pg": "~8.7.1",
"pg": "~8.11.1",
"pg-connection-string": "~2.5.0",
"pg-query-stream": "~4.2.3",
"pgsql-ast-parser": "~7.2.1",

View File

@@ -1,11 +1,20 @@
import { ipcMain } from 'electron';
import { autoUpdater } from 'electron-updater';
import * as Store from 'electron-store';
const persistentStore = new Store({ name: 'settings', clearInvalidConfig: true });
const isMacOS = process.platform === 'darwin';
const persistentStore = new Store({
name: 'settings',
clearInvalidConfig: true,
migrations: {
'0.7.15': store => {
store.set('allow_prerelease', false);
}
}
});
const isMacOS = process.platform === 'darwin';
let mainWindow: Electron.IpcMainEvent;
autoUpdater.allowPrerelease = persistentStore.get('allow_prerelease', true) as boolean;
autoUpdater.allowPrerelease = persistentStore.get('allow_prerelease', false) as boolean;
export default () => {
ipcMain.on('check-for-updates', event => {

View File

@@ -582,7 +582,7 @@ export class MySQLClient extends AntaresCore {
return rows.map((field) => {
const numLengthMatch = field.COLUMN_TYPE.match(/int\(([^)]+)\)/);
const numLength = numLengthMatch ? +numLengthMatch.pop() : field.NUMERIC_PRECISION || null;
const enumValues = /(enum|set)/.test(field.COLUMN_TYPE)
const enumValues = /(enum)/.test(field.COLUMN_TYPE)
? field.COLUMN_TYPE.match(/\(([^)]+)\)/)[0].slice(1, -1)
: null;
@@ -865,21 +865,23 @@ export class MySQLClient extends AntaresCore {
options
} = params;
let sql = `ALTER TABLE \`${schema}\`.\`${table}\` `;
const alterColumns: string[] = [];
const sql = `ALTER TABLE \`${schema}\`.\`${table}\` `;
const alterColumnsAdd: string[] = [];
const alterColumnsChange: string[] = [];
const alterColumnsDrop: string[] = [];
// OPTIONS
if ('comment' in options) alterColumns.push(`COMMENT='${options.comment}'`);
if ('engine' in options) alterColumns.push(`ENGINE=${options.engine}`);
if ('autoIncrement' in options) alterColumns.push(`AUTO_INCREMENT=${+options.autoIncrement}`);
if ('collation' in options) alterColumns.push(`COLLATE='${options.collation}'`);
if ('comment' in options) alterColumnsChange.push(`COMMENT='${options.comment}'`);
if ('engine' in options) alterColumnsChange.push(`ENGINE=${options.engine}`);
if ('autoIncrement' in options) alterColumnsChange.push(`AUTO_INCREMENT=${+options.autoIncrement}`);
if ('collation' in options) alterColumnsChange.push(`COLLATE='${options.collation}'`);
// ADD FIELDS
additions.forEach(addition => {
const typeInfo = this.getTypeInfo(addition.type);
const length = typeInfo.length ? addition.enumValues || addition.numLength || addition.charLength || addition.datePrecision : false;
alterColumns.push(`ADD COLUMN \`${addition.name}\`
alterColumnsAdd.push(`ADD COLUMN \`${addition.name}\`
${addition.type.toUpperCase()}${length ? `(${length}${addition.numScale ? `,${addition.numScale}` : ''})` : ''}
${addition.unsigned ? 'UNSIGNED' : ''}
${addition.zerofill ? 'ZEROFILL' : ''}
@@ -898,18 +900,18 @@ export class MySQLClient extends AntaresCore {
let type = addition.type;
if (type === 'PRIMARY')
alterColumns.push(`ADD PRIMARY KEY (${fields})`);
alterColumnsAdd.push(`ADD PRIMARY KEY (${fields})`);
else {
if (type === 'UNIQUE')
type = 'UNIQUE INDEX';
alterColumns.push(`ADD ${type} \`${addition.name}\` (${fields})`);
alterColumnsAdd.push(`ADD ${type} \`${addition.name}\` (${fields})`);
}
});
// ADD FOREIGN KEYS
foreignChanges.additions.forEach(addition => {
alterColumns.push(`ADD CONSTRAINT \`${addition.constraintName}\` FOREIGN KEY (\`${addition.field}\`) REFERENCES \`${addition.refTable}\` (\`${addition.refField}\`) ON UPDATE ${addition.onUpdate} ON DELETE ${addition.onDelete}`);
alterColumnsAdd.push(`ADD CONSTRAINT \`${addition.constraintName}\` FOREIGN KEY (\`${addition.field}\`) REFERENCES \`${addition.refTable}\` (\`${addition.refField}\`) ON UPDATE ${addition.onUpdate} ON DELETE ${addition.onDelete}`);
});
// CHANGE FIELDS
@@ -917,7 +919,7 @@ export class MySQLClient extends AntaresCore {
const typeInfo = this.getTypeInfo(change.type);
const length = typeInfo.length ? change.enumValues || change.numLength || change.charLength || change.datePrecision : false;
alterColumns.push(`CHANGE COLUMN \`${change.orgName}\` \`${change.name}\`
alterColumnsChange.push(`CHANGE COLUMN \`${change.orgName}\` \`${change.name}\`
${change.type.toUpperCase()}${length ? `(${length}${change.numScale ? `,${change.numScale}` : ''})` : ''}
${change.unsigned ? 'UNSIGNED' : ''}
${change.zerofill ? 'ZEROFILL' : ''}
@@ -933,53 +935,56 @@ export class MySQLClient extends AntaresCore {
// CHANGE INDEX
indexChanges.changes.forEach(change => {
if (change.oldType === 'PRIMARY')
alterColumns.push('DROP PRIMARY KEY');
alterColumnsChange.push('DROP PRIMARY KEY');
else
alterColumns.push(`DROP INDEX \`${change.oldName}\``);
alterColumnsChange.push(`DROP INDEX \`${change.oldName}\``);
const fields = change.fields.map(field => `\`${field}\``).join(',');
let type = change.type;
if (type === 'PRIMARY')
alterColumns.push(`ADD PRIMARY KEY (${fields})`);
alterColumnsChange.push(`ADD PRIMARY KEY (${fields})`);
else {
if (type === 'UNIQUE')
type = 'UNIQUE INDEX';
alterColumns.push(`ADD ${type} \`${change.name}\` (${fields})`);
alterColumnsChange.push(`ADD ${type} \`${change.name}\` (${fields})`);
}
});
// CHANGE FOREIGN KEYS
foreignChanges.changes.forEach(change => {
alterColumns.push(`DROP FOREIGN KEY \`${change.oldName}\``);
alterColumns.push(`ADD CONSTRAINT \`${change.constraintName}\` FOREIGN KEY (\`${change.field}\`) REFERENCES \`${change.refTable}\` (\`${change.refField}\`) ON UPDATE ${change.onUpdate} ON DELETE ${change.onDelete}`);
alterColumnsChange.push(`DROP FOREIGN KEY \`${change.oldName}\``);
alterColumnsChange.push(`ADD CONSTRAINT \`${change.constraintName}\` FOREIGN KEY (\`${change.field}\`) REFERENCES \`${change.refTable}\` (\`${change.refField}\`) ON UPDATE ${change.onUpdate} ON DELETE ${change.onDelete}`);
});
// DROP FIELDS
deletions.forEach(deletion => {
alterColumns.push(`DROP COLUMN \`${deletion.name}\``);
alterColumnsDrop.push(`DROP COLUMN \`${deletion.name}\``);
});
// DROP INDEX
indexChanges.deletions.forEach(deletion => {
if (deletion.type === 'PRIMARY')
alterColumns.push('DROP PRIMARY KEY');
alterColumnsDrop.push('DROP PRIMARY KEY');
else
alterColumns.push(`DROP INDEX \`${deletion.name}\``);
alterColumnsDrop.push(`DROP INDEX \`${deletion.name}\``);
});
// DROP FOREIGN KEYS
foreignChanges.deletions.forEach(deletion => {
alterColumns.push(`DROP FOREIGN KEY \`${deletion.constraintName}\``);
alterColumnsDrop.push(`DROP FOREIGN KEY \`${deletion.constraintName}\``);
});
sql += alterColumns.join(', ');
const alterQueryes = [];
if (alterColumnsAdd.length) alterQueryes.push(sql+alterColumnsAdd.join(', '));
if (alterColumnsChange.length) alterQueryes.push(sql+alterColumnsChange.join(', '));
if (alterColumnsDrop.length) alterQueryes.push(sql+alterColumnsDrop.join(', '));
// RENAME
if (options.name) sql += `; RENAME TABLE \`${schema}\`.\`${table}\` TO \`${schema}\`.\`${options.name}\``;
if (options.name) alterQueryes.push(`RENAME TABLE \`${schema}\`.\`${table}\` TO \`${schema}\`.\`${options.name}\``);
return await this.raw(sql);
return await this.raw(alterQueryes.join(';'));
}
async duplicateTable (params: { schema: string; table: string }) {

View File

@@ -1579,7 +1579,7 @@ export class PostgreSQLClient extends AntaresCore {
if (args.tabUid && isPool)
this._runningConnections.set(args.tabUid, (connection as pg.PoolClient & { processID: number }).processID);
if (args.schema && args.schema !== 'public')
if (args.schema)
await this.use(args.schema, connection);
for (const query of queries) {

View File

@@ -327,7 +327,7 @@ const schemaItems = computed(() => {
return [];
});
const filename = computed(() => {
const date = moment().format('YYYY-MM-DD');
const date = moment().format('YYYY-MM-DD_HH-mm-ss');
return `${props.selectedSchema}_${date}.${options.value.outputFormat}`;
});
const dumpFilePath = computed(() => `${basePath.value}/${filename.value}`);

View File

@@ -44,7 +44,7 @@
</button>
</div>
<div class="form-group mt-4">
<label class="form-switch d-inline-block disabled" @click.prevent="toggleAllowPrerelease">
<label class="form-switch d-inline-block" @click.prevent="toggleAllowPrerelease">
<input type="checkbox" :checked="allowPrerelease">
<i class="form-icon" /> {{ t('message.includeBetaUpdates') }}
</label>

View File

@@ -589,7 +589,9 @@ const typeFormat = (val: string | number | Date | number[], type: string, precis
}
if (BLOB.includes(type)) {
const buff = Buffer.from(val as string);
if (typeof val === 'string') return val;
const buff = Buffer.from(val as unknown as ArrayBuffer);
if (!buff.length) return '';
const hex = buff.toString('hex').substring(0, 8).toUpperCase();

View File

@@ -118,7 +118,6 @@
<div class="divider-vert py-3" />
<button
v-if="isTable"
class="btn btn-dark btn-sm"
:disabled="isQuering"
:title="t('word.settings')"
@@ -216,7 +215,6 @@ import { ConnectionParams } from 'common/interfaces/antares';
import { TableFilterClausole } from 'common/interfaces/tableApis';
import { useFilters } from '@/composables/useFilters';
import { ipcRenderer } from 'electron';
import { table } from 'console';
const { localeString } = useFilters();
@@ -447,13 +445,14 @@ const openTableSettingTab = () => {
uid: workspace.value.uid,
elementName: props.table,
schema: props.schema,
type: 'table-props',
elementType: 'table'
type: isTable.value ? 'table-props' : 'view-props',
elementType: isTable.value ? 'table' : 'view'
});
changeBreadcrumbs({
schema: props.schema,
table: props.table
table: isTable.value ? props.table : null,
view: !isTable.value ? props.table : null
});
};

View File

@@ -1,7 +1,7 @@
export const frFR = {
word: {
edit: 'Editer',
save: 'Sauver',
save: 'Sauvegarder',
close: 'Fermer',
delete: 'Effacer',
confirm: 'Confirmer',
@@ -23,10 +23,10 @@ export const frFR = {
general: 'Général',
themes: 'Thèmes',
update: 'Mise à jour',
about: 'À propos de',
language: 'Langage',
about: 'À propos',
language: 'Langue',
version: 'Version',
donate: 'Faire une donation',
donate: 'Faire une don',
run: 'Éxécuter',
schema: 'Schéma',
results: 'Résultats',
@@ -44,11 +44,11 @@ export const frFR = {
collation: 'Langage',
clear: 'Effacer',
options: 'Options',
autoRefresh: 'Auto-rafraîchissemnt',
autoRefresh: 'Auto-rafraîchissement',
indexes: 'Indexs',
foreignKeys: 'Clés étrangères',
length: 'Longueur',
unsigned: 'non signé',
unsigned: 'Non signé',
default: 'Par défaut',
comment: 'Commentaire',
key: 'Clé | Clés',
@@ -60,7 +60,7 @@ export const frFR = {
approximately: 'Approximativement',
total: 'Total',
table: 'Table',
discard: 'Jeter',
discard: 'Annuler',
stay: 'Rester',
author: 'Auteur',
light: 'Clair',
@@ -95,7 +95,6 @@ export const frFR = {
upload: 'Téléverser',
browse: 'Naviguer',
faker: 'Imposteur',
sshTunnel: 'Tunnel SSH',
content: 'Contenu',
cut: 'Couper',
copy: 'Copier',
@@ -106,8 +105,9 @@ export const frFR = {
Database: 'Base de données',
scratchpad: 'Bloc-notes',
array: 'Tableau',
changelog: 'Log de changement',
changelog: 'Journal des modifications',
Format: 'Format',
sshTunnel: 'Tunnel SSH',
structure: 'Structure',
small: 'Petit',
medium: 'Moyen',
@@ -119,9 +119,9 @@ export const frFR = {
duplicate: 'Dupliquer',
routine: 'Routine',
new: 'Nouveau',
history: 'Passé',
history: 'Historique',
select: 'Sélectionner',
passphrase: 'Phrase',
passphrase: 'Phrase secrète',
filter: 'Filtre',
change: 'Changement',
views: 'Vues',
@@ -140,7 +140,20 @@ export const frFR = {
rollback: 'Retour arrière',
connectionString: 'Chaîne de connexion',
contributors: 'Contributeurs',
shortcuts: 'Raccourcis'
pin: 'Épingler',
unpin: 'Désépingler',
console: 'Console',
shortcuts: 'Raccourcis',
folder: 'Dossier | Dossiers',
appearance: 'Apparence',
color: 'Couleur',
label: 'Libellé',
icon: 'Icône',
resultsTable: 'Table des résultats',
ddl: 'DDL',
none: 'Aucun',
singleQuote: 'Simple guillemets',
doubleQuote: 'Double guillemets'
},
message: {
appWelcome: 'Bienvenue dans le client SQL Antares!',
@@ -148,7 +161,7 @@ export const frFR = {
addConnection: 'Ajouter une connexion',
createConnection: 'Créer une connexion',
createNewConnection: 'Créer une nouvelle connexion',
askCredentials: 'Demander des informations d\'identification',
askCredentials: 'Demander les informations d\'identification',
testConnection: 'Tester la connexion',
editConnection: 'Modifier la connexion',
deleteConnection: 'Supprimer la connexion',
@@ -164,7 +177,7 @@ export const frFR = {
updateDownloaded: 'Mise à jour téléchargée',
restartToInstall: 'Redémarrer Antares pour installer',
unableEditFieldWithoutPrimary: 'Impossible de modifier un champ sans clé primaire dans le jeu de résultats',
editCell: 'Editer la cellule',
editCell: 'Éditer la cellule',
deleteRows: 'Effacer la ligne | Effacer {count} lignes',
confirmToDeleteRows: 'Confirmez-vous la suppression d\'une ligne ? | Confirmez-vous la suppression de {count} lignes ?',
notificationsTimeout: 'Délai d\'attente pour les notifications',
@@ -194,7 +207,7 @@ export const frFR = {
deleteTable: 'Supprimer une table',
emptyConfirm: 'Confirmez-vous que vous souhaitez vider la table ?',
unsavedChanges: 'Modifications non sauvegardées',
discardUnsavedChanges: 'Vous avez des modifications non sauvegardées. En fermant cet onglet, ces modifications seront supprimées',
discardUnsavedChanges: 'Vous avez des modifications non sauvegardées. En fermant cet onglet, ces modifications seront supprimées.',
thereAreNoIndexes: 'Il n\'y a pas d\'index',
thereAreNoForeign: 'Il n\'y a pas de clés étrangères',
createNewForeign: 'Créer une nouvelle clé étrangère',
@@ -214,7 +227,7 @@ export const frFR = {
createNewView: 'Créer une nouvelle vue',
deleteTrigger: 'Effacer un déclencheur',
createNewTrigger: 'Créer un nouveau déclencheur',
currentUser: 'utilisateur courant',
currentUser: 'utilisateur actuel',
routineBody: 'Corps de la routine',
dataAccess: 'Accès aux données',
thereAreNoParameters: 'Il n\'y a pas de paramètre',
@@ -231,13 +244,13 @@ export const frFR = {
enableSsl: 'Activer le SSL',
manualValue: 'Valeur manuelle',
tableFiller: 'Remplisseur de table',
fakeDataLanguage: 'Language de données fausses',
fakeDataLanguage: 'Langue des fausses données',
searchForElements: 'Rechercher des éléments',
selectAll: 'Tout sélectionner',
queryDuration: 'Temps de requêtage',
queryDuration: 'Temps de requête',
includeBetaUpdates: 'Inclure les mises à jour beta',
setNull: 'Définir comme NULL',
processesList: 'List des processus',
processesList: 'Liste des processus',
processInfo: 'Information sur le processus',
manageUsers: 'Organisation des utilisateurs',
createNewSchema: 'Créer un nouveau schéma',
@@ -249,10 +262,10 @@ export const frFR = {
dataTabPageSize: 'Taille de la page de l\'onglet données',
enableSsh: 'Activer le SSH',
pageNumber: 'Numéro de la page',
duplicateTable: 'Copier la table',
duplicateTable: 'Dupliquer la table',
noOpenTabs: 'Il n\'y a pas d\'onglet ouvert, naviguer vers la barre gauche ou :',
noSchema: 'Pas de schéma',
restorePreviousSession: 'Restorer une session précédente',
noSchema: 'Aucun schéma',
restorePreviousSession: 'Restaurer la session précédente',
runQuery: 'Lancer la requête',
thereAreNoTableFields: 'Il n\'y a pas de champ table',
newTable: 'Nouvelle table',
@@ -264,7 +277,7 @@ export const frFR = {
newTriggerFunction: 'Nouvelle fonction de déclencheur',
thereIsNoQueriesYet: 'Il n\'y a pas encore de requête',
searchForQueries: 'Rechercher des requêtes',
killProcess: 'tuer un processus',
killProcess: 'Terminer un processus',
closeTab: 'Fermer un onglet',
exportSchema: 'Exporter un schéma',
importSchema: 'Importer un schéma',
@@ -278,7 +291,7 @@ export const frFR = {
goToDownloadPage: 'Aller vers la page de téléchargement',
readOnlyMode: 'Mode lecture seule',
killQuery: 'Terminer une requête',
insertRow: 'Insérer un ligne | Insérer des lignes',
insertRow: 'Insérer une ligne | Insérer des lignes',
commitMode: 'Mode insertion directe',
autoCommit: 'Insertion directe automatique',
manualCommit: 'Insertion directe manuelle',
@@ -286,17 +299,71 @@ export const frFR = {
importQueryErrors: 'Attention : {n} erreurs se sont produites | Attention: {n} erreurs sont apparues',
executedQueries: '{n} requêtes ont été exécutées | {n} requêtes exécutées',
outputFormat: 'Format de sortie',
singleFile: 'Seul fichier avec l\'extension {ext}',
singleFile: 'Fichier seul avec l\'extension {ext}',
zipCompressedFile: 'Fichier compréssé avec l\'extension {ext}',
disableBlur: 'Désactiver le floue',
disableBlur: 'Désactiver le flou',
untrustedConnection: 'Connexion non approuvée',
missingOrIncompleteTranslation: 'Traduction manquante ou incomplète?',
findOutHowToContribute: 'Trouver comment contribuer',
disableScratchpad: 'Désactiver le bloc-notes'
disableFKChecks: 'Désactiver les vérifications de clé étrangère',
allConnections: 'Toutes les connexions',
searchForConnections: 'Rechercher des connexions',
disableScratchpad: 'Désactiver le bloc-notes',
reportABug: 'Signaler un bug',
nextTab: 'Onglet suivant',
previousTab: 'Onglet précédent',
selectTabNumber: 'Sélectionner l\'onglet numéro {param}',
toggleConsole: 'Activer/Désactiver la console',
addShortcut: 'Ajouter un raccourci',
editShortcut: 'Modifier un raccourci',
deleteShortcut: 'Supprimer un raccourci',
restoreDefaults: 'Restaurer les valeurs par défaut',
restoreDefaultsQuestion: 'Voulez-vous vraiment restaurer les valeurs par défaut?',
registerAShortcut: 'Enregistrer un raccourci',
invalidShortcutMessage: 'Combinaison invalide, continuez l\'insertion',
shortcutAlreadyExists: 'Ce raccourci existe déjà',
saveContent: 'Sauvegarder le contenu',
openAllConnections: 'Ouvrir toutes les connexions',
openSettings: 'Ouvrir les paramètres',
openScratchpad: 'Ouvrir le bloc-notes',
runOrReload: 'Exécuter ou rafraîchir',
formatQuery: 'Formater la requête',
queryHistory: 'Historique de requête',
clearQuery: 'Effacer la requête',
openFilter: 'Ouvrir le filtre',
nextResultsPage: 'Page de résultats suivante',
previousResultsPage: 'Page de résultats précédente',
fillCell: 'Remplir la cellule',
editFolder: 'Editer le dossier',
folderName: 'Nom du dossier',
deleteFolder: 'Supprimer le dossier',
editConnectionAppearance: 'Editer l\'apparence de la connexion',
executeSelectedQuery: 'Exécuter la requête sélectionnée',
defaultCopyType: 'Type de copie par défaut',
showTableSize: 'Afficher la taille de la table dans la barre latérale',
showTableSizeDescription: 'MySQL/MariaDB seulement. Activer cette option peut affecter les performances du schéma sur plusieurs tables.',
searchForSchemas: 'Rechercher des shémas',
switchSearchMethod: 'Changer la méthode de recherche',
noResultsPresent: 'Aucun résultat présent',
sqlExportOptions: 'Options d\'export SQL',
targetTable: 'Table cible',
phpArray: 'Tableau PHP',
closeAllTabs: 'Fermer tous les onglets',
closeOtherTabs: 'Fermer les autres onglets',
closeTabsToLeft: 'Fermer les onglets à gauche',
closeTabsToRight: 'Fermer les onglets à droite',
switchDatabase: 'Changer la base de données',
csvExportOptions: 'Options d\'export CSV',
csvFieldDelimiter: 'Délimiteur de champ',
csvLinesTerminator: 'Fin de ligne',
csvStringDelimiter: 'Séparateur',
csvIncludeHeader: 'Inclure l\'en-tête',
scratchPadDefaultValue: '# COMMENT SOUTENIR ANTARES\n\n- [ ] Laissez une etoile à Antares [GitHub repo](https://github.com/antares-sql/antares)\n- [ ] Envoyez vos avis et conseils\n- [ ] Signalez les bugs\n- [ ] Si vous l\'appréciez, partagez Antares avec des amis\n\n# A PROPOS DU BLOC-NOTES\n\nCeci est un bloc-notes où vous pouvez sauvegarder vos **notes personnelles**. Il supporte le format `markdown`, mais vous êtes libre d\'utiliser du texte standard.\nCe contenu est juste un modèle, vous pouvez a tout moment l\'effacer pour le remplacer par vos notes.\n'
},
faker: {
address: 'Adresse',
commerce: 'Commerce',
company: 'Companie',
company: 'Entreprise',
database: 'Base de données',
date: 'Date',
finance: 'Finance',
@@ -324,7 +391,7 @@ export const frFR = {
county: 'Département',
country: 'Pays',
countryCode: 'Code du pays',
state: 'Etat',
state: 'État',
stateAbbr: 'Abréviation de l\'état',
latitude: 'Latitude',
longitude: 'Longitude',
@@ -344,11 +411,11 @@ export const frFR = {
suffixes: 'Suffixes',
companyName: 'Nom de la société',
companySuffix: 'Suffixe de la société',
catchPhrase: 'Phrase de rappel',
catchPhrase: 'Phrase d\'accroche',
bs: 'BS',
catchPhraseAdjective: 'Adjectif de la phrase de rappel',
catchPhraseDescriptor: 'Descripteur de la phrase de rappel',
catchPhraseNoun: 'Nom de la phrase de rappel',
catchPhraseAdjective: 'Adjectif de la phrase d\'accroche',
catchPhraseDescriptor: 'Descripteur de la phrase d\'accroche',
catchPhraseNoun: 'Nom de la phrase d\'accroche',
bsAdjective: 'Adjectif BS',
bsBuzz: 'BS buzz',
bsNoun: 'Nom BS',
@@ -357,6 +424,7 @@ export const frFR = {
collation: 'Langue',
engine: 'Moteur',
past: 'Passé',
now: 'Maintenant',
future: 'Future',
between: 'Entre',
recent: 'Récent',
@@ -364,7 +432,7 @@ export const frFR = {
month: 'Mois',
weekday: 'Jour de la semaine',
account: 'compte',
accountName: 'Nom du compte',
accountName: 'Nom de compte',
routingNumber: 'Numéro de la routing',
mask: 'Masque',
amount: 'Montant',
@@ -394,12 +462,12 @@ export const frFR = {
avatar: 'Avatar',
email: 'mail',
exampleEmail: 'Exemple de mail',
userName: 'Nom utilisateur',
userName: 'Nom d\'utilisateur',
protocol: 'Protocole',
url: 'Url',
domainName: 'Nom du domaine',
domainSuffix: 'Suffixe du domaine',
domainWord: 'Mot domaine',
domainWord: 'Mot de domaine',
ip: 'Ip',
ipv6: 'Ipv6',
userAgent: 'Agent utilisateur',
@@ -419,7 +487,7 @@ export const frFR = {
lastName: 'Nom de famille',
middleName: 'Deuxième prénom',
findName: 'Nom complet',
jobTitle: 'Nom du poste',
jobTitle: 'Nom du travail',
gender: 'Sexe',
prefix: 'Préfixe',
suffix: 'Suffixe',

View File

@@ -147,7 +147,12 @@ export const ptBR = {
appearance: 'Aparência',
color: 'Cor',
label: 'Rótulo',
icon: 'Icone'
icon: 'Icone',
resultsTable: 'Resultados da tabela',
ddl: 'DDL',
none: 'Nenhum',
singleQuote: 'Aspas simples',
doubleQuote: 'Aspas duplas'
},
message: {
appWelcome: 'Bem vindo ao Antares SQL Client!',
@@ -253,6 +258,7 @@ export const ptBR = {
deleteSchema: 'Apagar schema',
markdownSupported: 'Markdown suportado',
plantATree: 'Plante uma árvore',
dataTabPageSize: 'Tamanho da guia DADOS',
enableSsh: 'Habilitar SSH',
pageNumber: 'Número de página',
duplicateTable: 'Duplicar tabela',
@@ -330,7 +336,28 @@ export const ptBR = {
editFolder: 'Editar Pasta',
folderName: 'Nome da pasta',
deleteFolder: 'Apagar Pasta',
editConnectionAppearance: 'Editar aparência da conexão'
editConnectionAppearance: 'Editar aparência da conexão',
executeSelectedQuery: 'Executar consulta selecionada',
defaultCopyType: 'Padrão do tipo de cópia',
showTableSize: 'Exibir tamanho da tabela na barra lateral',
showTableSizeDescription: 'Apenas MySQL/MariaDB. Habilitar essa opcão pode afetar o desempenho no banco com muitas tabelas.',
searchForSchemas: 'Procurar banco',
switchSearchMethod: 'Alterar o modo da pesquisa',
noResultsPresent: 'Nenhum resultado presente',
sqlExportOptions: 'Opções de exportação do SQL',
targetTable: 'Tabela de destino',
phpArray: 'Array PHP',
closeAllTabs: 'Fechar todas as guias',
closeOtherTabs: 'Fechar outras guias',
closeTabsToLeft: 'Fechar guias a esquerda',
closeTabsToRight: 'Fechar guias a direita',
switchDatabase: 'Alterar banco de dados',
csvExportOptions: 'Opções de exportação do CSV',
csvFieldDelimiter: 'Delimitador do campo',
csvLinesTerminator: 'Delimitador da linha',
csvStringDelimiter: 'Delimitador da String',
csvIncludeHeader: 'Incluir cabeçalho',
scratchPadDefaultValue: '# COMO AJUDAR O ANTARES\n\n- [ ] Deixe sua estrela para o Antares [GitHub repo](https://github.com/antares-sql/antares)\n- [ ] Envie sugestões e avisos\n- [ ] Relate bugs\n- [ ] Se você gostar, compartilhe o Antares com amigos\n\n# SOBRE O BLOCO DE NOTAS\n\nEsse é o bloco de notas para salvar suas **notas pessoais**. ele suporta o formato `markdown`, porém você é livre para usar qualquer texto.\nEsse conteúdo é apenas um texto, fique a vontade para limpar e obter mais espaço para suas notas.\n'
},
faker: {
address: 'Endereço',

View File

@@ -16,7 +16,7 @@ export type ApplicationTheme = 'light' | 'dark';
export const useSettingsStore = defineStore('settings', {
state: () => ({
locale: settingsStore.get('locale', 'en-US') as AvailableLocale,
allowPrerelease: settingsStore.get('allow_prerelease', true) as boolean,
allowPrerelease: settingsStore.get('allow_prerelease', false) as boolean,
explorebarSize: settingsStore.get('explorebar_size', null) as number,
notificationsTimeout: settingsStore.get('notifications_timeout', 5) as number,
showTableSize: settingsStore.get('show_table_size', false) as boolean,