From e95d29c7c37e24e7cc14b466f9b539fa667042c2 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Wed, 25 Nov 2020 11:47:35 +0100 Subject: [PATCH] feat: approximate totals in table tata tab --- src/renderer/components/WorkspaceQueryTab.vue | 2 +- src/renderer/components/WorkspaceTableTab.vue | 8 +++++++- src/renderer/i18n/en-US.js | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/WorkspaceQueryTab.vue b/src/renderer/components/WorkspaceQueryTab.vue index b2c29f96..2aa53481 100644 --- a/src/renderer/components/WorkspaceQueryTab.vue +++ b/src/renderer/components/WorkspaceQueryTab.vue @@ -17,7 +17,7 @@
- {{ $t('word.results') }}: {{ resultsCount }} + {{ $t('word.results') }}: {{ resultsCount.toLocaleString() }}
{{ $t('message.affectedRows') }}: {{ affectedCount }} diff --git a/src/renderer/components/WorkspaceTableTab.vue b/src/renderer/components/WorkspaceTableTab.vue index 18a9dc12..409a9743 100644 --- a/src/renderer/components/WorkspaceTableTab.vue +++ b/src/renderer/components/WorkspaceTableTab.vue @@ -42,7 +42,10 @@
- {{ $t('word.results') }}: {{ results[0].rows.length }} + {{ $t('word.results') }}: {{ results[0].rows.length.toLocaleString() }} +
+
+ {{ $t('word.total') }}: {{ tableInfo.rows.toLocaleString() }} ({{ $t('word.approximately') }})
{{ $t('word.schema') }}: {{ workspace.breadcrumbs.database }} @@ -117,6 +120,9 @@ export default { }, keyUsage () { return this.results.length ? this.results[0].keys : []; + }, + tableInfo () { + return this.workspace.structure.find(db => db.name === this.schema).tables.find(table => table.name === this.table); } }, watch: { diff --git a/src/renderer/i18n/en-US.js b/src/renderer/i18n/en-US.js index dafee136..dfda9449 100644 --- a/src/renderer/i18n/en-US.js +++ b/src/renderer/i18n/en-US.js @@ -55,7 +55,10 @@ module.exports = { order: 'Order', expression: 'Expression', autoIncrement: 'Auto Increment', - engine: 'Engine' + engine: 'Engine', + field: 'Field | Fields', + approximately: 'Approximately', + total: 'Total' }, message: { appWelcome: 'Welcome to Antares SQL Client!',