@inflector/optima 1.0.10 → 1.0.11
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 +23 -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;
|
|
@@ -1044,7 +1065,9 @@ export {
|
|
|
1044
1065
|
GeoPoint,
|
|
1045
1066
|
Int,
|
|
1046
1067
|
Json,
|
|
1068
|
+
OPS,
|
|
1047
1069
|
OptimaDB,
|
|
1070
|
+
OptimaTable,
|
|
1048
1071
|
Password,
|
|
1049
1072
|
SQLBuilder,
|
|
1050
1073
|
Slug,
|