Frontend improvements for Databases plugin
Summary: Specs here: https://fb.quip.com/aPPOAWMraRMT Screenshots: https://pxl.cl/Gngf https://pxl.cl/Gngg https://pxl.cl/Gngd https://pxl.cl/GxQr https://pxl.cl/Gngh https://pxl.cl/Gngk https://pxl.cl/Gngl https://pxl.cl/Gngm Reviewed By: quanturium Differential Revision: D16266093 fbshipit-source-id: a5408b974875dcabcbd6055ccbb2818d0c1b25f6
This commit is contained in:
committed by
Facebook Github Bot
parent
dbf0e3db43
commit
fe56c8471c
@@ -48,6 +48,28 @@ type GetTableStructureResponse = {
|
||||
definition: string,
|
||||
};
|
||||
|
||||
type ExecuteSqlRequest = {
|
||||
databaseId: number,
|
||||
value: string,
|
||||
};
|
||||
|
||||
type ExecuteSqlResponse = {
|
||||
type: string,
|
||||
columns: Array<string>,
|
||||
values: Array<Array<Value>>,
|
||||
insertedId: number,
|
||||
affectedCount: number,
|
||||
};
|
||||
|
||||
type GetTableInfoRequest = {
|
||||
databaseId: number,
|
||||
table: string,
|
||||
};
|
||||
|
||||
type GetTableInfoResponse = {
|
||||
definition: string,
|
||||
};
|
||||
|
||||
export class DatabaseClient {
|
||||
client: PluginClient;
|
||||
|
||||
@@ -67,4 +89,12 @@ export class DatabaseClient {
|
||||
GetTableStructureRequest,
|
||||
GetTableStructureResponse,
|
||||
> = params => this.client.call('getTableStructure', params);
|
||||
|
||||
getExecution: ClientCall<ExecuteSqlRequest, ExecuteSqlResponse> = params =>
|
||||
this.client.call('execute', params);
|
||||
|
||||
getTableInfo: ClientCall<
|
||||
GetTableInfoRequest,
|
||||
GetTableInfoResponse,
|
||||
> = params => this.client.call('getTableInfo', params);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user