From 94c49523197284510361ebbb6984816a3bb1b243 Mon Sep 17 00:00:00 2001 From: Fabio Di Stasio Date: Thu, 18 Feb 2021 15:26:17 +0100 Subject: [PATCH] fix: support of bit fields in table filler --- src/main/ipc-handlers/tables.js | 2 ++ src/renderer/components/FakerSelect.vue | 2 ++ src/renderer/components/ModalFakerRows.vue | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/ipc-handlers/tables.js b/src/main/ipc-handlers/tables.js index 4439068e..ad7395ca 100644 --- a/src/main/ipc-handlers/tables.js +++ b/src/main/ipc-handlers/tables.js @@ -232,6 +232,8 @@ export default (connections) => { else escapedParam = '""'; } + else if (BIT.includes(type)) + escapedParam = `b'${sqlEscaper(params.row[key].value)}'`; else escapedParam = `"${sqlEscaper(params.row[key].value)}"`; diff --git a/src/renderer/components/FakerSelect.vue b/src/renderer/components/FakerSelect.vue index 15e4aa78..c4d03232 100644 --- a/src/renderer/components/FakerSelect.vue +++ b/src/renderer/components/FakerSelect.vue @@ -136,6 +136,8 @@ export default { this.localType = 'datetime'; else if (TIME.includes(this.type)) this.localType = 'time'; + else + this.localType = 'none'; return FakerMethods.getGroupsByType(this.localType); }, diff --git a/src/renderer/components/ModalFakerRows.vue b/src/renderer/components/ModalFakerRows.vue index 0e0c6a59..b0ab4e94 100644 --- a/src/renderer/components/ModalFakerRows.vue +++ b/src/renderer/components/ModalFakerRows.vue @@ -184,7 +184,7 @@