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

feat: approximate totals in table tata tab

This commit is contained in:
2020-11-25 11:47:35 +01:00
parent e954f04828
commit e95d29c7c3
3 changed files with 12 additions and 3 deletions

View File

@ -42,7 +42,10 @@
</div>
<div class="workspace-query-info">
<div v-if="results.length && results[0].rows">
{{ $t('word.results') }}: <b>{{ results[0].rows.length }}</b>
{{ $t('word.results') }}: <b>{{ results[0].rows.length.toLocaleString() }}</b>
</div>
<div v-if="results.length && results[0].rows && results[0].rows.length < tableInfo.rows">
{{ $t('word.total') }}: <b>{{ tableInfo.rows.toLocaleString() }}</b> <small>({{ $t('word.approximately') }})</small>
</div>
<div v-if="workspace.breadcrumbs.database">
{{ $t('word.schema') }}: <b>{{ workspace.breadcrumbs.database }}</b>
@ -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: {