mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
refactor(plugin-data-spreadsheet-new): CB-1047
This commit is contained in:
+6
-3
@@ -10,7 +10,10 @@ import type { SqlResultColumn } from '@cloudbeaver/core-sdk';
|
||||
import type { IResultSetValue } from '@cloudbeaver/plugin-data-viewer';
|
||||
|
||||
export function isBooleanFormatter(cellValue: IResultSetValue, column: SqlResultColumn): boolean {
|
||||
return column?.dataKind?.toLowerCase() === 'boolean' && (
|
||||
(typeof cellValue === 'boolean' || (typeof cellValue === 'string' && (cellValue.toLowerCase() === 'false' || cellValue.toLowerCase() === 'true'))) || cellValue === null
|
||||
);
|
||||
return column?.dataKind?.toLowerCase() === 'boolean'
|
||||
&& (
|
||||
typeof cellValue === 'boolean'
|
||||
|| cellValue === null
|
||||
|| (typeof cellValue === 'string' && ['false', 'true'].includes(cellValue.toLowerCase()))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user