From 0efe569e7010a0b6b21e2830be072108ac7817a5 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 11 Feb 2022 19:03:37 +0800 Subject: [PATCH] fix: if it is bigint type, then go for eq instead of like Signed-off-by: Wing-Kam Wong --- .../components/project/spreadsheet/mixins/spreadsheet.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js b/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js index 88b0fbbcd0..10c05784dc 100644 --- a/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js +++ b/packages/nc-gui/components/project/spreadsheet/mixins/spreadsheet.js @@ -163,7 +163,10 @@ export default { concatenatedXWhere() { let where = '' if (this.searchField && this.searchQuery.trim()) { - if (['text', 'string'].includes(this.sqlUi.getAbstractType(this.availableColumns.find(({ _cn }) => _cn === this.searchField) || this.availableColumns[0]))) { + const col = this.availableColumns.find(({ _cn }) => _cn === this.searchField) || this.availableColumns[0] + // bigint values are displayed in string format in UI + // when searching bigint values, the operator should be 'eq' instead of 'like' + if (['text', 'string'].includes(this.sqlUi.getAbstractType(col)) && col.dt !== 'bigint') { where = `(${this.searchField},like,%${this.searchQuery.trim()}%)` } else { where = `(${this.searchField},eq,${this.searchQuery.trim()})`