mirror of https://github.com/Fabio286/antares.git
fix: edit bit fields
This commit is contained in:
parent
4e72bb1587
commit
ede6fe81ce
|
@ -46,7 +46,7 @@ This is a roadmap with major features will come in near future.
|
||||||
|
|
||||||
- Support for other databases.
|
- Support for other databases.
|
||||||
- Database tools (variables, process list...).
|
- Database tools (variables, process list...).
|
||||||
- SSL and SSH tunnel support.
|
- SSH tunnel support.
|
||||||
- Users management (add/edit/delete).
|
- Users management (add/edit/delete).
|
||||||
- UI/UX improvements.
|
- UI/UX improvements.
|
||||||
- Query history.
|
- Query history.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ipcMain } from 'electron';
|
import { ipcMain } from 'electron';
|
||||||
import { sqlEscaper } from 'common/libs/sqlEscaper';
|
import { sqlEscaper } from 'common/libs/sqlEscaper';
|
||||||
import { TEXT, LONG_TEXT, NUMBER, BLOB } from 'common/fieldTypes';
|
import { TEXT, LONG_TEXT, NUMBER, BLOB, BIT } from 'common/fieldTypes';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
export default (connections) => {
|
export default (connections) => {
|
||||||
|
@ -75,6 +75,10 @@ export default (connections) => {
|
||||||
else
|
else
|
||||||
escapedParam = '""';
|
escapedParam = '""';
|
||||||
}
|
}
|
||||||
|
else if ([...BIT].includes(params.type)) {
|
||||||
|
escapedParam = `b'${sqlEscaper(params.content)}'`;
|
||||||
|
reload = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
escapedParam = `"${sqlEscaper(params.content)}"`;
|
escapedParam = `"${sqlEscaper(params.content)}"`;
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,7 @@ export default {
|
||||||
getWorkspace: 'workspaces/getWorkspace'
|
getWorkspace: 'workspaces/getWorkspace'
|
||||||
}),
|
}),
|
||||||
localLength () {
|
localLength () {
|
||||||
return this.localRow.numLength || this.localRow.charLength || this.localRow.datePrecision || 0;
|
return this.localRow.numLength || this.localRow.charLength || this.localRow.datePrecision || this.localRow.numPrecision || 0;
|
||||||
},
|
},
|
||||||
fieldType () {
|
fieldType () {
|
||||||
const fieldType = this.dataTypes.reduce((acc, group) => [...acc, ...group.types], []).filter(type =>
|
const fieldType = this.dataTypes.reduce((acc, group) => [...acc, ...group.types], []).filter(type =>
|
||||||
|
|
Loading…
Reference in New Issue