@graffy/clickhouse 0.17.9-alpha.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/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@graffy/clickhouse",
3
+ "description": "Read-only Graffy provider for ClickHouse.",
4
+ "author": "aravind (https://github.com/aravindet)",
5
+ "version": "0.17.9-alpha.1",
6
+ "main": "./index.cjs",
7
+ "exports": {
8
+ "import": "./index.mjs",
9
+ "require": "./index.cjs"
10
+ },
11
+ "module": "./index.mjs",
12
+ "types": "./types/index.d.ts",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/usegraffy/graffy.git"
16
+ },
17
+ "license": "Apache-2.0",
18
+ "dependencies": {
19
+ "@graffy/common": "0.17.9-alpha.1"
20
+ },
21
+ "peerDependencies": {
22
+ "@clickhouse/client": "^1.17.0"
23
+ }
24
+ }
package/types/Db.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ export default class Db {
2
+ constructor(connection: any);
3
+ client: any;
4
+ query(sql: any): Promise<any>;
5
+ ensureSchema(tableOptions: any): Promise<void>;
6
+ normalizeRow(row: any, schema: any): {};
7
+ getCursorValue(row: any, orderItem: any): any;
8
+ read(rootQuery: any, tableOptions: any): Promise<{
9
+ key: Uint8Array<ArrayBuffer>;
10
+ end: Uint8Array<ArrayBuffer>;
11
+ version: number;
12
+ }[]>;
13
+ }
@@ -0,0 +1 @@
1
+ export default function getAst(filter: any): any;
@@ -0,0 +1 @@
1
+ export default function getFilterSql(filter: any, options: any): any;
@@ -0,0 +1,24 @@
1
+ export function clickhouse(options?: ClickhouseOptions & {
2
+ connection?: any;
3
+ }): (store: any) => void;
4
+ export function ch(options?: ClickhouseOptions & {
5
+ connection?: any;
6
+ }): (store: any) => void;
7
+ export type ClickhouseOptions = {
8
+ table?: string;
9
+ idCol?: string;
10
+ verCol?: string;
11
+ schema?: any;
12
+ database?: string;
13
+ final?: boolean;
14
+ joins?: Record<string, {
15
+ table?: string;
16
+ idCol?: string;
17
+ verCol?: string;
18
+ schema?: any;
19
+ database?: string;
20
+ final?: boolean;
21
+ refCol?: string;
22
+ joins?: Record<string, any>;
23
+ }>;
24
+ };
@@ -0,0 +1,5 @@
1
+ export function quoteIdent(name: any): string;
2
+ export function literal(value: any): any;
3
+ export function isPlainObject(value: any): boolean;
4
+ export function isUInt8Type(type: any): boolean;
5
+ export function isStringishType(type: any): boolean;
@@ -0,0 +1,35 @@
1
+ export default function getArgSql({ $first, $last, $after, $before, $since, $until, $all, $cursor: _, ...rest }: {
2
+ [x: string]: any;
3
+ $first: any;
4
+ $last: any;
5
+ $after: any;
6
+ $before: any;
7
+ $since: any;
8
+ $until: any;
9
+ $all: any;
10
+ $cursor: any;
11
+ }, options: any): {
12
+ where: any[];
13
+ limit: number;
14
+ orderSpec: any[];
15
+ order: any;
16
+ groupSpec: boolean | any[];
17
+ ensureSingleRow: boolean;
18
+ hasRangeArg: boolean;
19
+ hasCursor: boolean;
20
+ keyBase: {
21
+ [x: string]: any;
22
+ };
23
+ } | {
24
+ where: any[];
25
+ orderSpec: any;
26
+ order: any;
27
+ groupSpec: any[];
28
+ limit: number;
29
+ ensureSingleRow: boolean;
30
+ hasRangeArg: boolean;
31
+ hasCursor: boolean;
32
+ keyBase: {
33
+ [x: string]: any;
34
+ };
35
+ };
@@ -0,0 +1,11 @@
1
+ export function getLookup(prop: any, options: any): {
2
+ root: any;
3
+ suffix: any;
4
+ type: any;
5
+ isJsonPath: boolean;
6
+ rootExpr: string;
7
+ orderExpr: string;
8
+ textExpr: string;
9
+ rawExpr: string;
10
+ numericExpr: string;
11
+ };
@@ -0,0 +1,25 @@
1
+ export function getTableSql({ database, table, final }: {
2
+ database?: string;
3
+ table: any;
4
+ final?: boolean;
5
+ }): string;
6
+ export function selectByArgs(args: any, projection: any, options: any): {
7
+ where: any[];
8
+ order: any;
9
+ limit: number;
10
+ groupSpec: boolean | any[];
11
+ isAggregate: boolean;
12
+ aggregateAliases: {};
13
+ groupAliases: any[];
14
+ sql: string;
15
+ orderSpec: any;
16
+ ensureSingleRow: boolean;
17
+ hasRangeArg: boolean;
18
+ hasCursor: boolean;
19
+ keyBase: {
20
+ [x: string]: any;
21
+ };
22
+ };
23
+ export function selectByIds(ids: any, options: any): {
24
+ sql: string;
25
+ };