rado 1.3.0-preview.0 → 1.3.0-preview.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.
|
@@ -3,7 +3,7 @@ import type { QueryMeta } from '../MetaData.js';
|
|
|
3
3
|
import type { QueryData } from '../Queries.js';
|
|
4
4
|
import type { SelectQuery } from '../query/Query.js';
|
|
5
5
|
import { type Select, type SelectBase } from '../query/Select.js';
|
|
6
|
-
import type {
|
|
6
|
+
import type { SelectionRow } from '../Selection.js';
|
|
7
7
|
import { type Sql } from '../Sql.js';
|
|
8
8
|
export type IncludeQuery = SelectQuery & {
|
|
9
9
|
first: boolean;
|
|
@@ -15,8 +15,8 @@ export declare class Include<Result, Meta extends QueryMeta = QueryMeta> impleme
|
|
|
15
15
|
constructor(data: QueryData<Meta> & IncludeQuery);
|
|
16
16
|
get [internalSql](): Sql<Result>;
|
|
17
17
|
}
|
|
18
|
-
export declare function include<Input, Meta extends QueryMeta>(select: Select<Input, Meta>): Include<Array<
|
|
18
|
+
export declare function include<Input, Meta extends QueryMeta>(select: Select<Input, Meta>): Include<Array<SelectionRow<Input>>, Meta>;
|
|
19
19
|
export declare namespace include {
|
|
20
|
-
function one<Input, Meta extends QueryMeta>(select: SelectBase<Input, Meta>): Include<
|
|
20
|
+
function one<Input, Meta extends QueryMeta>(select: SelectBase<Input, Meta>): Include<SelectionRow<Input> | null, Meta>;
|
|
21
21
|
}
|
|
22
22
|
export declare function includeQuery(query: IncludeQuery): Sql;
|
|
@@ -55,7 +55,7 @@ function includeQuery(query) {
|
|
|
55
55
|
const { first, limit, offset, orderBy } = query;
|
|
56
56
|
const wrapQuery = Boolean(limit || offset || orderBy);
|
|
57
57
|
const innerQuery = selectQuery(query);
|
|
58
|
-
const inner = wrapQuery ? sql`select * from (${innerQuery})` : innerQuery;
|
|
58
|
+
const inner = wrapQuery ? sql`select * from (${innerQuery}) as __` : innerQuery;
|
|
59
59
|
const fields = querySelection(query).fieldNames();
|
|
60
60
|
const subject = jsonArray(
|
|
61
61
|
...fields.map((name) => sql`_.${sql.identifier(name)}`)
|
|
@@ -32,7 +32,7 @@ export declare abstract class UnionBase<Input, Meta extends QueryMeta = QueryMet
|
|
|
32
32
|
except(target: UnionTarget<Input, Meta>): Union<Input, Meta>;
|
|
33
33
|
exceptAll<Meta extends IsPostgres | IsMysql>(this: UnionBase<Input, Meta>, target: UnionTarget<Input, Meta>): Union<Input, Meta>;
|
|
34
34
|
}
|
|
35
|
-
declare const forKeywords: readonly [
|
|
35
|
+
declare const forKeywords: readonly ['update', 'no key update', 'share', 'key share'];
|
|
36
36
|
export declare class Select<Input, Meta extends QueryMeta = QueryMeta> extends UnionBase<StripFieldMeta<Input>, Meta> implements HasSelection, SelectBase<Input, Meta>, HasQuery<Array<SelectionRow<Input>>> {
|
|
37
37
|
#private;
|
|
38
38
|
readonly [internalData]: QueryData<Meta> & SelectQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rado",
|
|
3
|
-
"version": "1.3.0-preview.
|
|
3
|
+
"version": "1.3.0-preview.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
]
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
+
"imports": {
|
|
22
|
+
"#/*": "./src/*"
|
|
23
|
+
},
|
|
21
24
|
"exports": {
|
|
22
25
|
"./package.json": "./package.json",
|
|
23
26
|
".": "./dist/index.js",
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
"lint": "oxlint .",
|
|
35
38
|
"check": "bun run format:check && bun run lint",
|
|
36
39
|
"test:bun": "bun test",
|
|
37
|
-
"test:node": "node --test-force-exit --test-concurrency=1 --
|
|
40
|
+
"test:node": "node --disable-warning=ExperimentalWarning --test-force-exit --test-concurrency=1 --test-reporter=spec --experimental-transform-types --test \"**/*.test.ts\"",
|
|
38
41
|
"test:deno": "deno test --node-modules-dir=false --no-check -A --unstable-ffi",
|
|
39
42
|
"docs:build": "bun docs/build.ts",
|
|
40
43
|
"docs:dev": "bun docs/build.ts --serve"
|
|
@@ -66,7 +69,6 @@
|
|
|
66
69
|
"speedscope": "^1.25.0",
|
|
67
70
|
"sql.js": "^1.14.1",
|
|
68
71
|
"sqlite3": "^6.0.1",
|
|
69
|
-
"
|
|
70
|
-
"typescript": "^5.9.3"
|
|
72
|
+
"typescript": "^7.0.1-rc"
|
|
71
73
|
}
|
|
72
74
|
}
|