dolphindb 0.0.7 → 0.0.10
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/browser.d.ts +5 -4
- package/browser.js +14 -9
- package/browser.js.map +1 -1
- package/index.d.ts +6 -5
- package/index.js +14 -9
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/test.js +1 -1
- package/test.js.map +1 -1
package/browser.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare enum DdbType {
|
|
|
46
46
|
complex = 34,
|
|
47
47
|
point = 35,
|
|
48
48
|
duration = 36,
|
|
49
|
+
object = 37,
|
|
49
50
|
symbol_extended = 145
|
|
50
51
|
}
|
|
51
52
|
export declare enum DdbFunctionType {
|
|
@@ -163,16 +164,16 @@ export declare class DdbDouble extends DdbObj<number> {
|
|
|
163
164
|
constructor(value: number);
|
|
164
165
|
}
|
|
165
166
|
export declare class DdbVectorInt extends DdbObj<Int32Array> {
|
|
166
|
-
constructor(value: number[]);
|
|
167
|
+
constructor(value: number[], name?: string);
|
|
167
168
|
}
|
|
168
169
|
export declare class DdbVectorString extends DdbObj<string[]> {
|
|
169
|
-
constructor(value: string[]);
|
|
170
|
+
constructor(value: string[], name?: string);
|
|
170
171
|
}
|
|
171
172
|
export declare class DdbVectorDouble extends DdbObj<Float64Array> {
|
|
172
|
-
constructor(value: number[]);
|
|
173
|
+
constructor(value: number[], name?: string);
|
|
173
174
|
}
|
|
174
175
|
export declare class DdbVectorAny extends DdbObj {
|
|
175
|
-
constructor(value: DdbObj<DdbValue>[]);
|
|
176
|
+
constructor(value: DdbObj<DdbValue>[], name?: string);
|
|
176
177
|
}
|
|
177
178
|
export declare class DdbPair extends DdbObj<Int32Array> {
|
|
178
179
|
constructor(l: number, r?: number);
|
package/browser.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ddb = exports.DDB = exports.timestamp2str = exports.date2str = exports.DdbFunction = exports.DdbPair = exports.DdbVectorAny = exports.DdbVectorDouble = exports.DdbVectorString = exports.DdbVectorInt = exports.DdbDouble = exports.DdbLong = exports.DdbString = exports.DdbInt = exports.DdbBool = exports.DdbVoid = exports.DdbObj = exports.timezone_offset = exports.nulls = exports.DdbFunctionType = exports.DdbType = exports.DdbForm = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const dayjs_1 =
|
|
5
|
+
const dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
6
6
|
require("xshell/prototype.browser");
|
|
7
7
|
const utils_browser_1 = require("xshell/utils.browser");
|
|
8
8
|
var DdbForm;
|
|
@@ -54,6 +54,7 @@ var DdbType;
|
|
|
54
54
|
DdbType[DdbType["complex"] = 34] = "complex";
|
|
55
55
|
DdbType[DdbType["point"] = 35] = "point";
|
|
56
56
|
DdbType[DdbType["duration"] = 36] = "duration";
|
|
57
|
+
DdbType[DdbType["object"] = 37] = "object";
|
|
57
58
|
DdbType[DdbType["symbol_extended"] = 145] = "symbol_extended";
|
|
58
59
|
})(DdbType = exports.DdbType || (exports.DdbType = {}));
|
|
59
60
|
var DdbFunctionType;
|
|
@@ -843,7 +844,7 @@ class DdbObj {
|
|
|
843
844
|
}
|
|
844
845
|
to_dict() {
|
|
845
846
|
if (this.form !== DdbForm.dict)
|
|
846
|
-
throw new Error('this.form
|
|
847
|
+
throw new Error('this.form is not DdbForm.dict, cannot convert to Object');
|
|
847
848
|
const [{ value: keys }, { value: values }] = this.value;
|
|
848
849
|
let obj = {};
|
|
849
850
|
for (let i = 0; i < this.rows; i++)
|
|
@@ -924,7 +925,7 @@ class DdbDouble extends DdbObj {
|
|
|
924
925
|
}
|
|
925
926
|
exports.DdbDouble = DdbDouble;
|
|
926
927
|
class DdbVectorInt extends DdbObj {
|
|
927
|
-
constructor(value) {
|
|
928
|
+
constructor(value, name) {
|
|
928
929
|
super({
|
|
929
930
|
form: DdbForm.vector,
|
|
930
931
|
type: DdbType.int,
|
|
@@ -932,45 +933,49 @@ class DdbVectorInt extends DdbObj {
|
|
|
932
933
|
rows: value.length,
|
|
933
934
|
cols: 1,
|
|
934
935
|
value: Int32Array.from(value),
|
|
936
|
+
name,
|
|
935
937
|
});
|
|
936
938
|
}
|
|
937
939
|
}
|
|
938
940
|
exports.DdbVectorInt = DdbVectorInt;
|
|
939
941
|
class DdbVectorString extends DdbObj {
|
|
940
|
-
constructor(value) {
|
|
942
|
+
constructor(value, name) {
|
|
941
943
|
super({
|
|
942
944
|
form: DdbForm.vector,
|
|
943
945
|
type: DdbType.string,
|
|
944
946
|
length: 0,
|
|
945
947
|
rows: value.length,
|
|
946
948
|
cols: 1,
|
|
947
|
-
value
|
|
949
|
+
value,
|
|
950
|
+
name,
|
|
948
951
|
});
|
|
949
952
|
}
|
|
950
953
|
}
|
|
951
954
|
exports.DdbVectorString = DdbVectorString;
|
|
952
955
|
class DdbVectorDouble extends DdbObj {
|
|
953
|
-
constructor(value) {
|
|
956
|
+
constructor(value, name) {
|
|
954
957
|
super({
|
|
955
958
|
form: DdbForm.vector,
|
|
956
959
|
type: DdbType.double,
|
|
957
960
|
length: 0,
|
|
958
961
|
rows: value.length,
|
|
959
962
|
cols: 1,
|
|
960
|
-
value: Float64Array.from(value)
|
|
963
|
+
value: Float64Array.from(value),
|
|
964
|
+
name,
|
|
961
965
|
});
|
|
962
966
|
}
|
|
963
967
|
}
|
|
964
968
|
exports.DdbVectorDouble = DdbVectorDouble;
|
|
965
969
|
class DdbVectorAny extends DdbObj {
|
|
966
|
-
constructor(value) {
|
|
970
|
+
constructor(value, name) {
|
|
967
971
|
super({
|
|
968
972
|
form: DdbForm.vector,
|
|
969
973
|
type: DdbType.any,
|
|
970
974
|
length: 0,
|
|
971
975
|
rows: value.length,
|
|
972
976
|
cols: 1,
|
|
973
|
-
value
|
|
977
|
+
value,
|
|
978
|
+
name,
|
|
974
979
|
});
|
|
975
980
|
}
|
|
976
981
|
}
|