antares/src/renderer/ipc-api/Tables.js

70 lines
1.9 KiB
JavaScript
Raw Normal View History

2020-06-15 18:23:51 +02:00
'use strict';
import { ipcRenderer } from 'electron';
import { unproxify } from '../libs/unproxify';
2020-06-15 18:23:51 +02:00
export default class {
static getTableColumns (params) {
return ipcRenderer.invoke('get-table-columns', unproxify(params));
2020-06-15 18:23:51 +02:00
}
static getTableData (params) {
return ipcRenderer.invoke('get-table-data', unproxify(params));
2020-06-15 18:23:51 +02:00
}
2020-06-27 15:14:08 +02:00
static getTableApproximateCount (params) {
return ipcRenderer.invoke('get-table-count', unproxify(params));
}
static getTableOptions (params) {
return ipcRenderer.invoke('get-table-options', unproxify(params));
}
static getTableIndexes (params) {
return ipcRenderer.invoke('get-table-indexes', unproxify(params));
}
static getKeyUsage (params) {
return ipcRenderer.invoke('get-key-usage', unproxify(params));
}
2020-06-27 15:14:08 +02:00
static updateTableCell (params) {
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) {
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) {
return ipcRenderer.invoke('insert-table-rows', unproxify(params));
2020-08-12 18:12:30 +02:00
}
2021-02-13 18:45:16 +01:00
static insertTableFakeRows (params) {
return ipcRenderer.invoke('insert-table-fake-rows', unproxify(params));
2021-02-13 18:45:16 +01:00
}
static getForeignList (params) {
return ipcRenderer.invoke('get-foreign-list', unproxify(params));
}
2020-11-13 12:39:40 +01:00
2020-12-03 13:00:54 +01:00
static createTable (params) {
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) {
return ipcRenderer.invoke('alter-table', unproxify(params));
2020-11-13 12:39:40 +01:00
}
2020-12-03 16:15:10 +01:00
static duplicateTable (params) {
return ipcRenderer.invoke('duplicate-table', unproxify(params));
}
2020-12-03 16:15:10 +01:00
static truncateTable (params) {
return ipcRenderer.invoke('truncate-table', unproxify(params));
2020-12-03 16:15:10 +01:00
}
static dropTable (params) {
return ipcRenderer.invoke('drop-table', unproxify(params));
2020-12-03 16:15:10 +01:00
}
2020-06-15 18:23:51 +02:00
}