@fadhilp/stateql 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +222 -0
- package/dist/src/adapters.d.ts +23 -0
- package/dist/src/adapters.js +346 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +516 -0
- package/dist/src/errors.d.ts +12 -0
- package/dist/src/errors.js +45 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +2 -0
- package/dist/src/sql.d.ts +13 -0
- package/dist/src/sql.js +91 -0
- package/dist/src/stateql.d.ts +55 -0
- package/dist/src/stateql.js +1655 -0
- package/dist/src/store.d.ts +245 -0
- package/dist/src/store.js +622 -0
- package/dist/src/types.d.ts +112 -0
- package/dist/src/types.js +1 -0
- package/dist/src/util.d.ts +8 -0
- package/dist/src/util.js +75 -0
- package/package.json +48 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { BatchCommand, BatchOptions, ConnectOptions, ExecOptions, FilterOptions, PlanOptions, ProfileOptions, QueryOptions, Response, RowsOptions, StateQLOptions } from "./types.js";
|
|
2
|
+
export declare class StateQL {
|
|
3
|
+
private readonly store;
|
|
4
|
+
private readonly sessionName;
|
|
5
|
+
private readonly previewRows;
|
|
6
|
+
private readonly cacheTtlSeconds;
|
|
7
|
+
private readonly resultTtlSeconds;
|
|
8
|
+
private readonly maxCellCharacters;
|
|
9
|
+
private readonly maxResultRows;
|
|
10
|
+
private readonly now;
|
|
11
|
+
constructor(options?: StateQLOptions);
|
|
12
|
+
close(): void;
|
|
13
|
+
connect(target?: string, options?: ConnectOptions): Promise<Response<unknown>>;
|
|
14
|
+
addProfile(name: string, target?: string, options?: ProfileOptions): Promise<Response<unknown>>;
|
|
15
|
+
listProfiles(): Promise<Response<unknown>>;
|
|
16
|
+
showProfile(name: string): Promise<Response<unknown>>;
|
|
17
|
+
removeProfile(name: string): Promise<Response<unknown>>;
|
|
18
|
+
disconnect(): Promise<Response<unknown>>;
|
|
19
|
+
status(): Promise<Response<unknown>>;
|
|
20
|
+
startSession(name: string): Promise<Response<unknown>>;
|
|
21
|
+
listSessions(): Promise<Response<unknown>>;
|
|
22
|
+
showSession(idOrName?: string): Promise<Response<unknown>>;
|
|
23
|
+
sessionSummary(): Promise<Response<unknown>>;
|
|
24
|
+
closeSession(): Promise<Response<unknown>>;
|
|
25
|
+
query(sql: string, options?: QueryOptions): Promise<Response<unknown>>;
|
|
26
|
+
show(idOrAlias: string): Promise<Response<unknown>>;
|
|
27
|
+
filter(idOrAlias: string, predicate: string, options?: FilterOptions): Promise<Response<unknown>>;
|
|
28
|
+
rows(idOrAlias: string, options?: RowsOptions): Promise<Response<unknown>>;
|
|
29
|
+
count(idOrAlias: string): Promise<Response<unknown>>;
|
|
30
|
+
columns(idOrAlias: string): Promise<Response<unknown>>;
|
|
31
|
+
setAlias(name: string, id: string): Promise<Response<unknown>>;
|
|
32
|
+
exportResult(idOrAlias: string, output: string, format?: "json" | "jsonl" | "csv"): Promise<Response<unknown>>;
|
|
33
|
+
exec(sql: string, options?: ExecOptions): Promise<Response<unknown>>;
|
|
34
|
+
receipt(id: string): Promise<Response<unknown>>;
|
|
35
|
+
beginTransaction(isolation?: string): Promise<Response<unknown>>;
|
|
36
|
+
transactionStatus(id?: string): Promise<Response<unknown>>;
|
|
37
|
+
commitTransaction(id?: string): Promise<Response<unknown>>;
|
|
38
|
+
rollbackTransaction(id?: string): Promise<Response<unknown>>;
|
|
39
|
+
inspect(kind: string, table?: string): Promise<Response<unknown>>;
|
|
40
|
+
plan(sql: string, options?: PlanOptions): Promise<Response<unknown>>;
|
|
41
|
+
apply(planId: string): Promise<Response<unknown>>;
|
|
42
|
+
history(limit?: number): Promise<Response<unknown>>;
|
|
43
|
+
capabilities(): Promise<Response<unknown>>;
|
|
44
|
+
executeCommand(command: BatchCommand): Promise<Response<unknown>>;
|
|
45
|
+
batch(commands: Iterable<BatchCommand> | AsyncIterable<BatchCommand>, options?: BatchOptions): AsyncGenerator<Response<unknown>>;
|
|
46
|
+
private performExec;
|
|
47
|
+
private batchFailure;
|
|
48
|
+
private withResult;
|
|
49
|
+
private requireResult;
|
|
50
|
+
private requireConnection;
|
|
51
|
+
private requireActiveTransaction;
|
|
52
|
+
private resultData;
|
|
53
|
+
private cacheValid;
|
|
54
|
+
private run;
|
|
55
|
+
}
|