Skip to content

Commit

Permalink
feat(SQLite): table data visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Nov 13, 2021
1 parent c54438d commit f2fcc98
Show file tree
Hide file tree
Showing 4 changed files with 1,308 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "cross-env NODE_ENV=production npm run compile",
"build:local": "npm run build && electron-builder",
"build:appx": "npm run build:local -- --win appx",
"rebuild:electron": "npm run postinstall && electron-rebuild",
"rebuild:electron": "npm run postinstall",
"release": "standard-version",
"release:pre": "npm run release -- --prerelease alpha",
"postinstall": "electron-builder install-app-deps",
Expand All @@ -30,6 +30,7 @@
"appId": "com.fabio286.antares",
"artifactName": "${productName}-${version}-${os}_${arch}.${ext}",
"asar": true,
"buildDependenciesFromSource": true,
"directories": {
"output": "build",
"buildResources": "assets"
Expand Down Expand Up @@ -104,6 +105,7 @@
"@electron/remote": "^2.0.1",
"@mdi/font": "^6.1.95",
"ace-builds": "^1.4.13",
"better-sqlite3": "^7.4.4",
"electron-log": "^4.4.1",
"electron-store": "^8.0.1",
"electron-updater": "^4.3.9",
Expand Down Expand Up @@ -134,7 +136,6 @@
"electron": "^15.3.0",
"electron-builder": "^22.13.1",
"electron-devtools-installer": "^3.2.0",
"electron-rebuild": "^3.2.3",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.24.2",
Expand Down
6 changes: 6 additions & 0 deletions src/main/ipc-handlers/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default connections => {
if (conn.database)
params.database = conn.database;

if (conn.databasePath)
params.databasePath = conn.databasePath;

if (conn.ssl) {
params.ssl = {
key: conn.key ? fs.readFileSync(conn.key) : null,
Expand Down Expand Up @@ -68,6 +71,9 @@ export default connections => {
if (conn.database)
params.database = conn.database;

if (conn.databasePath)
params.databasePath = conn.databasePath;

if (conn.schema)
params.schema = conn.schema;

Expand Down
3 changes: 3 additions & 0 deletions src/main/libs/ClientsFactory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';
import { MySQLClient } from './clients/MySQLClient';
import { PostgreSQLClient } from './clients/PostgreSQLClient';
import { SQLiteClient } from './clients/SQLiteClient';

const queryLogger = sql => {
// Remove comments, newlines and multiple spaces
Expand Down Expand Up @@ -37,6 +38,8 @@ export class ClientsFactory {
return new MySQLClient(args);
case 'pg':
return new PostgreSQLClient(args);
case 'sqlite':
return new SQLiteClient(args);
default:
throw new Error(`Unknown database client: ${args.client}`);
}
Expand Down
Loading

0 comments on commit f2fcc98

Please sign in to comment.