@inflector/optima 1.0.10 → 1.0.12
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/dist/index.d.ts +2 -1
- package/dist/index.js +24 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,7 @@ T | ConditionBuilder<T>;
|
|
|
175
175
|
type Where<Schema> = {
|
|
176
176
|
[K in keyof Schema]?: FieldQuery<Schema[K]>;
|
|
177
177
|
};
|
|
178
|
+
type TableSchema<T> = T extends OptimaTable<infer Schema> ? Prettify$1<Infer<Schema>> : never;
|
|
178
179
|
type GetRefSchema<Col> = Col extends ColumnBuilder<any, any, infer Ref> ? Ref : Col extends {
|
|
179
180
|
config: {
|
|
180
181
|
reference?: {
|
|
@@ -320,4 +321,4 @@ declare class OptimaDB<T extends Record<string, OptimaTable>> {
|
|
|
320
321
|
transaction<R>(fn: () => Promise<R>): Promise<R>;
|
|
321
322
|
}
|
|
322
323
|
|
|
323
|
-
export { Array$1 as Array, BigInt, Boolean, Bytes, Color, type ColumnBuilder, type ColumnConfig, type ConditionBuilder, DateType, Email, Enum, Float, GeoArea, GeoPoint, type Infer, type InferAdd, type InferColumnType, Int, Json, type Many, type One, OptimaDB, Password, type Prettify$1 as Prettify, type Restrict, SQLBuilder, Slug, Table, Text, Timestamp, Uuid, between, cond, contains, endsWith, eq, gt, gte, inOp, is, isNot, like, lt, lte, ne, notBetween, notIn, notLike, notRegexp, refHelpers, regexp, startsWith };
|
|
324
|
+
export { Array$1 as Array, BigInt, Boolean, Bytes, Color, type ColumnBuilder, type ColumnConfig, type ConditionBuilder, DateType, Email, Enum, type Extension, type FieldQuery, Float, GeoArea, GeoPoint, type Infer, type InferAdd, type InferColumnType, Int, Json, type Many, OPS, type One, type OpKey, OptimaDB, OptimaTable, Password, type Prettify$1 as Prettify, type Restrict, SQLBuilder, Slug, Table, type TableSchema, Text, Timestamp, Uuid, type Where, between, cond, contains, endsWith, eq, gt, gte, inOp, is, isNot, like, lt, lte, ne, notBetween, notIn, notLike, notRegexp, refHelpers, regexp, startsWith };
|
package/dist/index.js
CHANGED
|
@@ -272,6 +272,27 @@ function createQueryBuilderOne(table, initialConfig = {}) {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
// src/table.ts
|
|
275
|
+
var OPS = [
|
|
276
|
+
"eq",
|
|
277
|
+
"ne",
|
|
278
|
+
"gt",
|
|
279
|
+
"gte",
|
|
280
|
+
"lt",
|
|
281
|
+
"lte",
|
|
282
|
+
"like",
|
|
283
|
+
"notLike",
|
|
284
|
+
"in",
|
|
285
|
+
"notIn",
|
|
286
|
+
"is",
|
|
287
|
+
"isNot",
|
|
288
|
+
"between",
|
|
289
|
+
"notBetween",
|
|
290
|
+
"startsWith",
|
|
291
|
+
"endsWith",
|
|
292
|
+
"contains",
|
|
293
|
+
"regexp",
|
|
294
|
+
"notRegexp"
|
|
295
|
+
];
|
|
275
296
|
var ConditionBuilderImpl = class _ConditionBuilderImpl {
|
|
276
297
|
constructor(node) {
|
|
277
298
|
this.node = node;
|
|
@@ -881,6 +902,7 @@ var OptimaDB = class _OptimaDB {
|
|
|
881
902
|
}
|
|
882
903
|
close() {
|
|
883
904
|
this.connection.closeSync();
|
|
905
|
+
this.instance.closeSync();
|
|
884
906
|
}
|
|
885
907
|
/**
|
|
886
908
|
* Runs a function within a transaction.
|
|
@@ -1044,7 +1066,9 @@ export {
|
|
|
1044
1066
|
GeoPoint,
|
|
1045
1067
|
Int,
|
|
1046
1068
|
Json,
|
|
1069
|
+
OPS,
|
|
1047
1070
|
OptimaDB,
|
|
1071
|
+
OptimaTable,
|
|
1048
1072
|
Password,
|
|
1049
1073
|
SQLBuilder,
|
|
1050
1074
|
Slug,
|