mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fix
This commit is contained in:
parent
5bb9f181d8
commit
7eff7c649c
@ -99,7 +99,7 @@
|
||||
{:else}
|
||||
{highlightSpecialCharacters(value)}
|
||||
{/if}
|
||||
{:else if value.type == 'Buffer' && _.isArray(value.data)}
|
||||
{:else if value?.type == 'Buffer' && _.isArray(value.data)}
|
||||
{#if value.data.length <= 16}
|
||||
<span class="value">{arrayToHexString(value.data)}</span>
|
||||
{:else}
|
||||
|
@ -67,7 +67,7 @@ export function extractRowCopiedValue(row, col) {
|
||||
if (value === undefined) value = _.get(row, col);
|
||||
if (value === null) return '(NULL)';
|
||||
if (value === undefined) return '(NoField)';
|
||||
if (value.type == 'Buffer' && _.isArray(value.data)) return arrayToHexString(value.data);
|
||||
if (value && value.type == 'Buffer' && _.isArray(value.data)) return arrayToHexString(value.data);
|
||||
if (_.isPlainObject(value) || _.isArray(value)) return JSON.stringify(value);
|
||||
return value;
|
||||
}
|
||||
|
@ -66,8 +66,11 @@ class Dumper extends SqlDumper {
|
||||
}
|
||||
|
||||
putValue(value) {
|
||||
if (value.type == 'Buffer' && _isArray(value.data)) this.putRaw(`unhex('${arrayToHexString(value.data)}')`);
|
||||
else super.putValue(value);
|
||||
if (value && value.type == 'Buffer' && _isArray(value.data)) {
|
||||
this.putRaw(`unhex('${arrayToHexString(value.data)}')`);
|
||||
} else {
|
||||
super.putValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user