editing MySQL binary fiellds

This commit is contained in:
Jan Prochazka
2021-10-17 10:52:10 +02:00
parent 2231bc21cd
commit 5bb9f181d8
5 changed files with 35 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import _ from 'lodash';
import { toHexString } from 'dbgate-tools';
import { arrayToHexString } from 'dbgate-tools';
export function copyTextToClipboard(text) {
const oldFocus = document.activeElement;
@@ -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 toHexString(value.data);
if (value.type == 'Buffer' && _.isArray(value.data)) return arrayToHexString(value.data);
if (_.isPlainObject(value) || _.isArray(value)) return JSON.stringify(value);
return value;
}