generated from napi-rs/package-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.d.ts
87 lines (85 loc) · 3 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
/** A ':' separated key value pair */
export interface KeyValue {
key: string;
value: string;
}
export interface ClientOptions {
/**
* Additional headers.
*
* Values should be key value pairs separated by ':'
*/
headers: Array<KeyValue>;
/** Username */
username?: string;
/** Password */
password?: string;
/** Auth token. */
token?: string;
/** Use TLS. */
tls: boolean;
/** Server host. */
host: string;
/** Server port. */
port?: number;
}
export function createFlightSqlClient(options: ClientOptions): Promise<FlightSqlClient>;
export function rustCrateVersion(): string;
export interface GetDbSchemasOptions {
/**
* Specifies the Catalog to search for the tables.
* An empty string retrieves those without a catalog.
* If omitted the catalog name should not be used to narrow the search.
*/
catalog?: string;
/**
* Specifies a filter pattern for schemas to search for.
* When no db_schema_filter_pattern is provided, the pattern will not be used to narrow the search.
* In the pattern string, two special characters can be used to denote matching rules:
* - "%" means to match any substring with 0 or more characters.
* - "_" means to match any one character.
*/
dbSchemaFilterPattern?: string;
}
export interface GetTablesOptions {
/**
* Specifies the Catalog to search for the tables.
* An empty string retrieves those without a catalog.
* If omitted the catalog name should not be used to narrow the search.
*/
catalog?: string;
/**
* Specifies a filter pattern for schemas to search for.
* When no db_schema_filter_pattern is provided, the pattern will not be used to narrow the search.
* In the pattern string, two special characters can be used to denote matching rules:
* - "%" means to match any substring with 0 or more characters.
* - "_" means to match any one character.
*/
dbSchemaFilterPattern?: string;
/**
* Specifies a filter pattern for tables to search for.
* When no table_name_filter_pattern is provided, all tables matching other filters are searched.
* In the pattern string, two special characters can be used to denote matching rules:
* - "%" means to match any substring with 0 or more characters.
* - "_" means to match any one character.
*/
tableNameFilterPattern?: string;
/**
* Specifies a filter of table types which must match.
* The table types depend on vendor/implementation.
* It is usually used to separate tables from views or system tables.
* TABLE, VIEW, and SYSTEM TABLE are commonly supported.
*/
tableTypes?: Array<string>;
/** Specifies if the Arrow schema should be returned for found tables. */
includeSchema?: boolean;
}
export class FlightSqlClient {
query(query: string): Promise<Buffer>;
getCatalogs(): Promise<Buffer>;
getDbSchemas(options: GetDbSchemasOptions): Promise<Buffer>;
getTables(options: GetTablesOptions): Promise<Buffer>;
}