Skip to content

Commit

Permalink
feat(Firebird SQL): display table content and query results
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Nov 4, 2022
1 parent 7ab84bd commit 95bb41e
Show file tree
Hide file tree
Showing 11 changed files with 347 additions and 151 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"MySQL",
"PostgreSQL",
"SQLite",
"Firebird SQL",
"Windows",
"translation",
"Linux",
Expand Down
4 changes: 2 additions & 2 deletions src/common/customizations/firebird.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const customizations: Customizations = {
variables: false,
// Structure
schemas: false,
tables: false,
tables: true,
views: false,
triggers: false,
triggerFunctions: false,
Expand All @@ -29,7 +29,7 @@ export const customizations: Customizations = {
schedulers: false,
// Settings
elementsWrapper: '',
stringsWrapper: '"',
stringsWrapper: '\'',
tableAdd: false,
tableTruncateDisableFKCheck: false,
viewAdd: false,
Expand Down
120 changes: 120 additions & 0 deletions src/common/data-types/firebird.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import { TypesGroup } from 'common/interfaces/antares';

export default [
{
group: 'integer',
types: [
{
name: 'SMALLINT',
length: true,
collation: false,
unsigned: true,
zerofill: true
},
{
name: 'INTEGER',
length: true,
collation: false,
unsigned: true,
zerofill: true
},
{
name: 'BIGINT',
length: true,
collation: false,
unsigned: true,
zerofill: true
}
]
},
{
group: 'float',
types: [
{
name: 'DECIMAL',
length: true,
collation: false,
unsigned: false,
zerofill: false
},
{
name: 'NUMERIC',
length: true,
collation: false,
unsigned: false,
zerofill: false
},
{
name: 'FLOAT',
length: true,
collation: false,
unsigned: false,
zerofill: false
},
{
name: 'DOUBLE PRECISION',
length: true,
collation: false,
unsigned: false,
zerofill: false
}
]
},
{
group: 'string',
types: [
{
name: 'CHAR',
length: true,
collation: true,
unsigned: false,
zerofill: false
},
{
name: 'VARCHAR',
length: true,
collation: true,
unsigned: false,
zerofill: false
}
]
},
{
group: 'binary',
types: [
{
name: 'BLOB',
length: true,
collation: false,
unsigned: false,
zerofill: false
}
]
},
{
group: 'time',
types: [
{
name: 'DATE',
length: false,
collation: false,
unsigned: false,
zerofill: false
},
{
name: 'TIME',
length: true,
collation: false,
unsigned: false,
zerofill: false
},
{
name: 'TIMESTAMP',
length: true,
collation: false,
unsigned: false,
zerofill: false
}
]
}
] as TypesGroup[];
5 changes: 5 additions & 0 deletions src/common/index-types/firebird.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default [
'PRIMARY',
'INDEX',
'UNIQUE'
];
2 changes: 1 addition & 1 deletion src/main/ipc-handlers/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default (connections: {[key: string]: antares.Client}) => {

ipcMain.handle('get-engines', async (event, uid) => {
try {
const result = await connections[uid].getEngines();
const result: any = await connections[uid].getEngines();

return { status: 'success', response: result };
}
Expand Down
Loading

0 comments on commit 95bb41e

Please sign in to comment.