@yydb/yydb 0.1.5 → 0.1.7
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/README.md +2 -2
- package/dist/api/database.d.ts +78 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -101,6 +101,6 @@ The native binding exposes additive operations (`schemaVersion`, `schemaDocument
|
|
|
101
101
|
Electron: main process can use `@yydb/yydb`; renderer code can use `@yydb/yydb-client` against the main-process
|
|
102
102
|
endpoint.
|
|
103
103
|
|
|
104
|
-
The managed engine listens on `127.0.0.1` with no authentication
|
|
104
|
+
The managed engine listens on `127.0.0.1` with no authentication �?keep the endpoint private.
|
|
105
105
|
|
|
106
|
-
[YYDB overview](https://github.com/yy-database/yydb) · [User guides](https://github.com/yy-database/yydb/tree/dev/projects/
|
|
106
|
+
[YYDB overview](https://github.com/yy-database/yydb) · [User guides](https://github.com/yy-database/yydb/tree/dev/projects/yydb.ts/homepage/documentation/zh-hans)
|
package/dist/api/database.d.ts
CHANGED
|
@@ -77,6 +77,84 @@ export interface CompactReport {
|
|
|
77
77
|
}
|
|
78
78
|
/** Declared type for a prepared statement parameter slot. */
|
|
79
79
|
export type SlotType = 'any' | 'bool' | 'i64' | 'text' | 'null';
|
|
80
|
+
/**
|
|
81
|
+
* Tagged JSON form of an exact `date` value (days since the Unix epoch,
|
|
82
|
+
* proleptic Gregorian calendar, UTC-free).
|
|
83
|
+
*/
|
|
84
|
+
export interface DateScalar {
|
|
85
|
+
readonly $yydb: 'date';
|
|
86
|
+
readonly days: number;
|
|
87
|
+
}
|
|
88
|
+
/** Tagged JSON form of an exact `time` value (nanoseconds since midnight, no zone). */
|
|
89
|
+
export interface TimeScalar {
|
|
90
|
+
readonly $yydb: 'time';
|
|
91
|
+
readonly nanos: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Tagged JSON form of an exact `timestamp` value (microseconds since the Unix
|
|
95
|
+
* epoch). Always UTC, encoded as a decimal string to avoid precision loss.
|
|
96
|
+
*/
|
|
97
|
+
export interface TimestampScalar {
|
|
98
|
+
readonly $yydb: 'timestamp';
|
|
99
|
+
readonly utcMicros: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Tagged JSON form of an exact fixed-point `decimal` value. `unscaled` is the
|
|
103
|
+
* decimal string of the integer significand scaled by `scale`.
|
|
104
|
+
*/
|
|
105
|
+
export interface DecimalScalar {
|
|
106
|
+
readonly $yydb: 'decimal';
|
|
107
|
+
readonly precision: number;
|
|
108
|
+
readonly scale: number;
|
|
109
|
+
readonly unscaled: string;
|
|
110
|
+
}
|
|
111
|
+
/** Every exact scalar crossing the JSON wire boundary uses this tagged form. */
|
|
112
|
+
export type ScalarValue = DateScalar | TimeScalar | TimestampScalar | DecimalScalar;
|
|
113
|
+
/** Declared execution type of a catalog field. */
|
|
114
|
+
export type SchemaFieldType = {
|
|
115
|
+
readonly kind: 'null' | 'bool' | 'i64' | 'text' | 'bytes' | 'file' | 'date';
|
|
116
|
+
} | {
|
|
117
|
+
readonly kind: 'time';
|
|
118
|
+
readonly unit: 'nanosecond';
|
|
119
|
+
readonly timezone: 'none';
|
|
120
|
+
} | {
|
|
121
|
+
readonly kind: 'timestamp';
|
|
122
|
+
readonly unit: 'microsecond';
|
|
123
|
+
readonly timezone: 'utc';
|
|
124
|
+
} | {
|
|
125
|
+
readonly kind: 'decimal';
|
|
126
|
+
readonly precision: number;
|
|
127
|
+
readonly scale: number;
|
|
128
|
+
} | {
|
|
129
|
+
readonly kind: 'vector';
|
|
130
|
+
readonly dimension: number;
|
|
131
|
+
readonly metric: 'cosine' | 'euclidean' | 'dot';
|
|
132
|
+
} | {
|
|
133
|
+
readonly kind: 'record';
|
|
134
|
+
readonly schemaId: number;
|
|
135
|
+
readonly fieldCount: number;
|
|
136
|
+
};
|
|
137
|
+
/** One uniqueness rule published by the catalog. */
|
|
138
|
+
export interface UniqueConstraintDescriptor {
|
|
139
|
+
readonly name: string;
|
|
140
|
+
readonly columns: string[];
|
|
141
|
+
/** `true` means NULLs never collide (SQL default); `false` means one shared NULL. */
|
|
142
|
+
readonly nullsDistinct: boolean;
|
|
143
|
+
}
|
|
144
|
+
/** One field in an introspected table. */
|
|
145
|
+
export interface SchemaFieldDescriptor {
|
|
146
|
+
readonly name: string;
|
|
147
|
+
readonly fieldId: number;
|
|
148
|
+
readonly virtualField: number;
|
|
149
|
+
readonly type: SchemaFieldType;
|
|
150
|
+
}
|
|
151
|
+
/** One introspected table with its declared field types and uniqueness rules. */
|
|
152
|
+
export interface SchemaTableDescriptor {
|
|
153
|
+
readonly name: string;
|
|
154
|
+
readonly schemaId: number;
|
|
155
|
+
readonly fields: SchemaFieldDescriptor[];
|
|
156
|
+
readonly uniqueConstraints: UniqueConstraintDescriptor[];
|
|
157
|
+
}
|
|
80
158
|
/** One named parameter descriptor on a {@link Statement}. */
|
|
81
159
|
export interface ParameterDescriptor {
|
|
82
160
|
/** Canonical parameter name (no leading `$`). */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { Database, Statement, type
|
|
1
|
+
export { Database, Statement, type DateScalar, type DecimalScalar, type OpenOptions, type ParameterDescriptor, type QueryKind, type ScalarValue, type SchemaFieldDescriptor, type SchemaFieldType, type SchemaTableDescriptor, type SchemaVersion, type SlotType, type StatementInfo, type TimeScalar, type TimestampScalar, type UniqueConstraintDescriptor, } from './api/database.js';
|
|
2
2
|
export { YydbError, YydbErrorCodes, YydbClientErrorCodes, isYydbError } from './shared/errors.js';
|
|
3
3
|
export type { YydbErrorCode, YydbErrorOptions } from './shared/errors.js';
|
|
4
4
|
export { defineMicro, type DefinedMicro, type MicroHandle, type TsMicroDefinitionInput, MicroSessionRegistry } from './shared/micro.js';
|
|
5
5
|
export { type InferUdfArgs, type InferUdfReturn, type MicroEffect, type MicroInvocationMode, type UdfScalarDescriptor, type UdfScalarKind, } from './shared/udf-types.js';
|
|
6
6
|
export { nativeBindingName, platformKey, resolveYydbBinary, resolveYydbCli } from './native/resolve.js';
|
|
7
|
+
export { loadNative } from './native/binding.js';
|
|
7
8
|
export * from './shared/vos.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { Database, Statement } from './api/database.js';
|
|
1
|
+
export { Database, Statement, } from './api/database.js';
|
|
2
2
|
export { YydbError, YydbErrorCodes, YydbClientErrorCodes, isYydbError } from './shared/errors.js';
|
|
3
3
|
export { defineMicro, MicroSessionRegistry } from './shared/micro.js';
|
|
4
4
|
export { nativeBindingName, platformKey, resolveYydbBinary, resolveYydbCli } from './native/resolve.js';
|
|
5
|
+
export { loadNative } from './native/binding.js';
|
|
5
6
|
export * from './shared/vos.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yydb/yydb",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "YYDB Node embedded engine and CLI",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "git+https://github.com/yy-database/yydb.git",
|
|
33
|
-
"directory": "projects/packages/yydb"
|
|
33
|
+
"directory": "projects/yydb.ts/packages/yydb"
|
|
34
34
|
},
|
|
35
|
-
"homepage": "https://github.com/yy-database/yydb/tree/dev/projects/packages/yydb#readme",
|
|
35
|
+
"homepage": "https://github.com/yy-database/yydb/tree/dev/projects/yydb.ts/packages/yydb#readme",
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/yy-database/yydb/issues"
|
|
38
38
|
},
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"node": ">=18"
|
|
60
60
|
},
|
|
61
61
|
"optionalDependencies": {
|
|
62
|
-
"@yydb/yydb-darwin-arm64": "0.1.
|
|
63
|
-
"@yydb/yydb-darwin-x64": "0.1.
|
|
64
|
-
"@yydb/yydb-linux-x64": "0.1.
|
|
65
|
-
"@yydb/yydb-win32-x64": "0.1.
|
|
62
|
+
"@yydb/yydb-darwin-arm64": "0.1.7",
|
|
63
|
+
"@yydb/yydb-darwin-x64": "0.1.7",
|
|
64
|
+
"@yydb/yydb-linux-x64": "0.1.7",
|
|
65
|
+
"@yydb/yydb-win32-x64": "0.1.7"
|
|
66
66
|
}
|
|
67
67
|
}
|