pqb 0.7.1 → 0.7.3
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +22 -2
- package/dist/index.esm.js +6 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/columnSchema/columnType.test.ts +2 -1
- package/src/columnSchema/columnTypes.ts +4 -2
- package/src/columnSchema/utils.ts +1 -1
- package/src/db.test.ts +4 -4
- package/src/queryMethods/json.test.ts +3 -3
- package/src/queryMethods/log.test.ts +12 -1
- package/src/test-utils/test-utils.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -311,7 +311,7 @@ const numeric = () => __spreadProps$j(__spreadValues$p({}, base()), {
|
|
|
311
311
|
gte: all.gte(),
|
|
312
312
|
between: all.between()
|
|
313
313
|
});
|
|
314
|
-
const text = () => __spreadProps$j(__spreadValues$p({}, base()), {
|
|
314
|
+
const text$1 = () => __spreadProps$j(__spreadValues$p({}, base()), {
|
|
315
315
|
contains: all.contains(),
|
|
316
316
|
containsInsensitive: all.containsInsensitive(),
|
|
317
317
|
startsWith: all.startsWith(),
|
|
@@ -330,7 +330,7 @@ const Operators = {
|
|
|
330
330
|
number: numeric(),
|
|
331
331
|
date: numeric(),
|
|
332
332
|
time: numeric(),
|
|
333
|
-
text: text(),
|
|
333
|
+
text: text$1(),
|
|
334
334
|
json: json(),
|
|
335
335
|
array: base()
|
|
336
336
|
};
|
|
@@ -1609,7 +1609,7 @@ const assignMethodsToClass = (klass, methods) => {
|
|
|
1609
1609
|
writable: true,
|
|
1610
1610
|
value(...args) {
|
|
1611
1611
|
const cloned = cloneInstance(this);
|
|
1612
|
-
return methods[name].
|
|
1612
|
+
return methods[name].apply(cloned, args);
|
|
1613
1613
|
}
|
|
1614
1614
|
});
|
|
1615
1615
|
}
|
|
@@ -3071,6 +3071,7 @@ const getColumnTypes = (types, fn, data = newTableData()) => {
|
|
|
3071
3071
|
resetTableData(data);
|
|
3072
3072
|
return fn(types);
|
|
3073
3073
|
};
|
|
3074
|
+
const text = (min, max) => new TextColumn().min(min).max(max);
|
|
3074
3075
|
const columnTypes = {
|
|
3075
3076
|
smallint: () => new SmallIntColumn(),
|
|
3076
3077
|
integer: () => new IntegerColumn(),
|
|
@@ -3085,8 +3086,8 @@ const columnTypes = {
|
|
|
3085
3086
|
money: () => new MoneyColumn(),
|
|
3086
3087
|
varchar: (limit) => new VarCharColumn(limit),
|
|
3087
3088
|
char: (limit) => new CharColumn(limit),
|
|
3088
|
-
text
|
|
3089
|
-
string:
|
|
3089
|
+
text,
|
|
3090
|
+
string: text,
|
|
3090
3091
|
bytea: () => new ByteaColumn(),
|
|
3091
3092
|
date: () => new DateColumn(),
|
|
3092
3093
|
timestamp: (precision) => new TimestampColumn(precision),
|