dolphindb 2.0.503 → 2.0.504
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 +37 -32
- package/README.zh.md +29 -24
- package/browser.d.ts +14 -3
- package/browser.js +76 -15
- package/browser.js.map +1 -1
- package/index.d.ts +14 -3
- package/index.js +76 -15
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -189,18 +189,27 @@ export declare class DdbFunction extends DdbObj<DdbFunctionDefValue> {
|
|
|
189
189
|
export declare class DdbVectorInt extends DdbObj<Int32Array> {
|
|
190
190
|
constructor(ints: (number | null)[] | Int32Array, name?: string);
|
|
191
191
|
}
|
|
192
|
-
export declare class DdbVectorString extends DdbObj<string[]> {
|
|
193
|
-
constructor(strings: string[], name?: string);
|
|
194
|
-
}
|
|
195
192
|
export declare class DdbVectorDouble extends DdbObj<Float64Array> {
|
|
196
193
|
constructor(doubles: (number | null)[] | Float64Array, name?: string);
|
|
197
194
|
}
|
|
195
|
+
export declare class DdbVectorString extends DdbObj<string[]> {
|
|
196
|
+
constructor(strings: string[], name?: string);
|
|
197
|
+
}
|
|
198
198
|
export declare class DdbVectorAny extends DdbObj {
|
|
199
199
|
constructor(objs: DdbObj<DdbValue>[], name?: string);
|
|
200
200
|
}
|
|
201
201
|
export declare class DdbVectorSymbol extends DdbObj<DdbSymbolExtendedValue> {
|
|
202
202
|
constructor(strings: string[], name?: string);
|
|
203
203
|
}
|
|
204
|
+
export declare class DdbSetInt extends DdbObj<Int32Array> {
|
|
205
|
+
constructor(ints: (number | null)[] | Set<number> | Int32Array);
|
|
206
|
+
}
|
|
207
|
+
export declare class DdbSetDouble extends DdbObj<Float64Array> {
|
|
208
|
+
constructor(doubles: (number | null)[] | Set<number> | Float64Array);
|
|
209
|
+
}
|
|
210
|
+
export declare class DdbSetString extends DdbObj<string[]> {
|
|
211
|
+
constructor(strings: string[] | Set<string>);
|
|
212
|
+
}
|
|
204
213
|
export declare class DdbTable extends DdbObj<DdbObj[]> {
|
|
205
214
|
constructor(columns: DdbObj[], name?: string);
|
|
206
215
|
}
|
|
@@ -280,6 +289,8 @@ export declare class DDB {
|
|
|
280
289
|
|
|
281
290
|
@example
|
|
282
291
|
let ddb = new DDB('ws://127.0.0.1:8848')
|
|
292
|
+
|
|
293
|
+
// 使用 HTTPS 加密
|
|
283
294
|
let ddbsecure = new DDB('wss://dolphindb.com', {
|
|
284
295
|
autologin: true,
|
|
285
296
|
username: 'admin',
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DDB = exports.str2nanotimestamp = exports.nanotimestamp2str = exports.str2timestamp = exports.timestamp2str = exports.datetime2str = exports.date2str = exports.DdbTable = exports.DdbVectorSymbol = exports.DdbVectorAny = exports.
|
|
3
|
+
exports.DDB = exports.str2nanotimestamp = exports.nanotimestamp2str = exports.str2timestamp = exports.timestamp2str = exports.datetime2str = exports.date2str = exports.DdbTable = exports.DdbSetString = exports.DdbSetDouble = exports.DdbSetInt = exports.DdbVectorSymbol = exports.DdbVectorAny = exports.DdbVectorString = exports.DdbVectorDouble = exports.DdbVectorInt = exports.DdbFunction = exports.DdbPair = exports.DdbNanoTimeStamp = exports.DdbTimeStamp = exports.DdbDateTime = exports.DdbDouble = exports.DdbLong = exports.DdbString = exports.DdbInt = exports.DdbChar = exports.DdbBool = exports.DdbVoid = exports.DdbObj = exports.timezone_offset = exports.nulls = exports.DdbFunctionType = exports.ddb_sizes = exports.DdbType = exports.DdbForm = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ws_1 = require("ws");
|
|
6
6
|
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
@@ -1094,20 +1094,6 @@ class DdbVectorInt extends DdbObj {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
exports.DdbVectorInt = DdbVectorInt;
|
|
1097
|
-
class DdbVectorString extends DdbObj {
|
|
1098
|
-
constructor(strings, name) {
|
|
1099
|
-
super({
|
|
1100
|
-
form: DdbForm.vector,
|
|
1101
|
-
type: DdbType.string,
|
|
1102
|
-
length: 0,
|
|
1103
|
-
rows: strings.length,
|
|
1104
|
-
cols: 1,
|
|
1105
|
-
value: strings,
|
|
1106
|
-
name,
|
|
1107
|
-
});
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
exports.DdbVectorString = DdbVectorString;
|
|
1111
1097
|
class DdbVectorDouble extends DdbObj {
|
|
1112
1098
|
constructor(doubles, name) {
|
|
1113
1099
|
super({
|
|
@@ -1128,6 +1114,20 @@ class DdbVectorDouble extends DdbObj {
|
|
|
1128
1114
|
}
|
|
1129
1115
|
}
|
|
1130
1116
|
exports.DdbVectorDouble = DdbVectorDouble;
|
|
1117
|
+
class DdbVectorString extends DdbObj {
|
|
1118
|
+
constructor(strings, name) {
|
|
1119
|
+
super({
|
|
1120
|
+
form: DdbForm.vector,
|
|
1121
|
+
type: DdbType.string,
|
|
1122
|
+
length: 0,
|
|
1123
|
+
rows: strings.length,
|
|
1124
|
+
cols: 1,
|
|
1125
|
+
value: strings,
|
|
1126
|
+
name,
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
exports.DdbVectorString = DdbVectorString;
|
|
1131
1131
|
class DdbVectorAny extends DdbObj {
|
|
1132
1132
|
constructor(objs, name) {
|
|
1133
1133
|
super({
|
|
@@ -1173,6 +1173,65 @@ class DdbVectorSymbol extends DdbObj {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
exports.DdbVectorSymbol = DdbVectorSymbol;
|
|
1176
|
+
class DdbSetInt extends DdbObj {
|
|
1177
|
+
constructor(ints) {
|
|
1178
|
+
super({
|
|
1179
|
+
form: DdbForm.set,
|
|
1180
|
+
type: DdbType.int,
|
|
1181
|
+
length: 0,
|
|
1182
|
+
rows: ints instanceof Set ?
|
|
1183
|
+
ints.size
|
|
1184
|
+
:
|
|
1185
|
+
ints.length,
|
|
1186
|
+
cols: 1,
|
|
1187
|
+
value: ints instanceof Int32Array ?
|
|
1188
|
+
ints
|
|
1189
|
+
:
|
|
1190
|
+
Int32Array.from(ints, v => v === null ?
|
|
1191
|
+
exports.nulls.int32
|
|
1192
|
+
:
|
|
1193
|
+
v),
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
exports.DdbSetInt = DdbSetInt;
|
|
1198
|
+
class DdbSetDouble extends DdbObj {
|
|
1199
|
+
constructor(doubles) {
|
|
1200
|
+
super({
|
|
1201
|
+
form: DdbForm.set,
|
|
1202
|
+
type: DdbType.double,
|
|
1203
|
+
length: 0,
|
|
1204
|
+
rows: doubles instanceof Set ?
|
|
1205
|
+
doubles.size
|
|
1206
|
+
:
|
|
1207
|
+
doubles.length,
|
|
1208
|
+
cols: 1,
|
|
1209
|
+
value: doubles instanceof Int32Array ?
|
|
1210
|
+
doubles
|
|
1211
|
+
:
|
|
1212
|
+
Int32Array.from(doubles, v => v === null ?
|
|
1213
|
+
exports.nulls.int32
|
|
1214
|
+
:
|
|
1215
|
+
v),
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
exports.DdbSetDouble = DdbSetDouble;
|
|
1220
|
+
class DdbSetString extends DdbObj {
|
|
1221
|
+
constructor(strings) {
|
|
1222
|
+
if (strings instanceof Set)
|
|
1223
|
+
strings = [...strings];
|
|
1224
|
+
super({
|
|
1225
|
+
form: DdbForm.set,
|
|
1226
|
+
type: DdbType.string,
|
|
1227
|
+
length: 0,
|
|
1228
|
+
rows: strings.length,
|
|
1229
|
+
cols: 1,
|
|
1230
|
+
value: strings
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
exports.DdbSetString = DdbSetString;
|
|
1176
1235
|
class DdbTable extends DdbObj {
|
|
1177
1236
|
constructor(columns, name = '') {
|
|
1178
1237
|
super({
|
|
@@ -1289,6 +1348,8 @@ class DDB {
|
|
|
1289
1348
|
|
|
1290
1349
|
@example
|
|
1291
1350
|
let ddb = new DDB('ws://127.0.0.1:8848')
|
|
1351
|
+
|
|
1352
|
+
// 使用 HTTPS 加密
|
|
1292
1353
|
let ddbsecure = new DDB('wss://dolphindb.com', {
|
|
1293
1354
|
autologin: true,
|
|
1294
1355
|
username: 'admin',
|