2020-06-15 18:23:51 +02:00
|
|
|
'use strict';
|
|
|
|
import { ipcRenderer } from 'electron';
|
2022-04-24 12:17:29 +02:00
|
|
|
import { unproxify } from '../libs/unproxify';
|
2020-06-15 18:23:51 +02:00
|
|
|
|
|
|
|
export default class {
|
|
|
|
static getTableColumns (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('get-table-columns', unproxify(params));
|
2020-06-15 18:23:51 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static getTableData (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('get-table-data', unproxify(params));
|
2020-06-15 18:23:51 +02:00
|
|
|
}
|
2020-06-27 15:14:08 +02:00
|
|
|
|
2021-08-04 15:52:26 +02:00
|
|
|
static getTableApproximateCount (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('get-table-count', unproxify(params));
|
2021-08-04 15:52:26 +02:00
|
|
|
}
|
|
|
|
|
2021-08-11 16:16:58 +02:00
|
|
|
static getTableOptions (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('get-table-options', unproxify(params));
|
2021-08-11 16:16:58 +02:00
|
|
|
}
|
|
|
|
|
2020-11-20 17:24:02 +01:00
|
|
|
static getTableIndexes (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('get-table-indexes', unproxify(params));
|
2020-11-20 17:24:02 +01:00
|
|
|
}
|
|
|
|
|
2020-08-14 18:07:29 +02:00
|
|
|
static getKeyUsage (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('get-key-usage', unproxify(params));
|
2020-08-14 18:07:29 +02:00
|
|
|
}
|
|
|
|
|
2020-06-27 15:14:08 +02:00
|
|
|
static updateTableCell (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('update-table-cell', unproxify(params));
|
2020-06-27 15:14:08 +02:00
|
|
|
}
|
2020-07-23 19:10:14 +02:00
|
|
|
|
|
|
|
static deleteTableRows (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('delete-table-rows', unproxify(params));
|
2020-07-23 19:10:14 +02:00
|
|
|
}
|
2020-08-12 18:12:30 +02:00
|
|
|
|
|
|
|
static insertTableRows (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('insert-table-rows', unproxify(params));
|
2020-08-12 18:12:30 +02:00
|
|
|
}
|
2020-08-17 15:10:19 +02:00
|
|
|
|
2021-02-13 18:45:16 +01:00
|
|
|
static insertTableFakeRows (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('insert-table-fake-rows', unproxify(params));
|
2021-02-13 18:45:16 +01:00
|
|
|
}
|
|
|
|
|
2020-08-17 15:10:19 +02:00
|
|
|
static getForeignList (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('get-foreign-list', unproxify(params));
|
2020-08-17 15:10:19 +02:00
|
|
|
}
|
2020-11-13 12:39:40 +01:00
|
|
|
|
2020-12-03 13:00:54 +01:00
|
|
|
static createTable (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('create-table', unproxify(params));
|
2020-12-03 13:00:54 +01:00
|
|
|
}
|
|
|
|
|
2020-11-13 12:39:40 +01:00
|
|
|
static alterTable (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('alter-table', unproxify(params));
|
2020-11-13 12:39:40 +01:00
|
|
|
}
|
2020-12-03 16:15:10 +01:00
|
|
|
|
2021-07-03 12:27:50 +02:00
|
|
|
static duplicateTable (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('duplicate-table', unproxify(params));
|
2021-07-03 12:27:50 +02:00
|
|
|
}
|
|
|
|
|
2020-12-03 16:15:10 +01:00
|
|
|
static truncateTable (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('truncate-table', unproxify(params));
|
2020-12-03 16:15:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static dropTable (params) {
|
2022-04-24 12:17:29 +02:00
|
|
|
return ipcRenderer.invoke('drop-table', unproxify(params));
|
2020-12-03 16:15:10 +01:00
|
|
|
}
|
2020-06-15 18:23:51 +02:00
|
|
|
}
|