mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 16:53:58 +00:00
mongoDB - bigint support WIP
This commit is contained in:
@@ -255,7 +255,7 @@ async function handleDriverDataCore(msgid, callMethod, { logName }) {
|
||||
const driver = requireEngineDriver(storedConnection);
|
||||
try {
|
||||
const result = await callMethod(driver);
|
||||
process.send({ msgtype: 'response', msgid, result });
|
||||
process.send({ msgtype: 'response', msgid, result: serializeJsTypesForJsonStringify(result) });
|
||||
} catch (err) {
|
||||
logger.error(extractErrorLogData(err, { logName }), `Error when handling message ${logName}`);
|
||||
process.send({ msgtype: 'response', msgid, errorMessage: extractErrorMessage(err, 'Error executing DB data') });
|
||||
|
||||
@@ -81,7 +81,7 @@ export function parseCellValue(value, editorTypes?: DataEditorTypesBehaviour) {
|
||||
|
||||
if (editorTypes?.parseNumber) {
|
||||
if (/^-?[0-9]+(?:\.[0-9]+)?$/.test(value)) {
|
||||
return parseFloat(value);
|
||||
return parseNumberSafe(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,6 +215,12 @@ export function stringifyCellValue(
|
||||
gridStyle: 'valueCellStyle',
|
||||
};
|
||||
}
|
||||
if (typeof value === 'bigint') {
|
||||
return {
|
||||
value: value.toString(),
|
||||
gridStyle: 'valueCellStyle',
|
||||
};
|
||||
}
|
||||
|
||||
if (editorTypes?.parseDateAsDollar) {
|
||||
if (value?.$date) {
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
{ useThousandsSeparator: getBoolSettingsValue('dataGrid.thousandsSeparator', false) },
|
||||
jsonParsedValue
|
||||
);
|
||||
|
||||
// $: console.log('CellValue', value, stringified);
|
||||
</script>
|
||||
|
||||
{#if rowData == null}
|
||||
|
||||
Reference in New Issue
Block a user