pqb 0.1.0 → 0.1.2
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 +10 -6
- package/dist/index.esm.js +6 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/columnSchema/columnTypes.ts +8 -4
- package/src/queryMethods/select.test.ts +104 -49
- package/src/test-utils.ts +9 -0
package/dist/index.js
CHANGED
|
@@ -1876,10 +1876,12 @@ const columnTypes = {
|
|
|
1876
1876
|
json: (schemaOrFn) => new JSONColumn(schemaOrFn),
|
|
1877
1877
|
jsonText: () => new JSONTextColumn(),
|
|
1878
1878
|
array: (item) => new ArrayColumn(item),
|
|
1879
|
-
timestamps
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1879
|
+
timestamps() {
|
|
1880
|
+
return {
|
|
1881
|
+
createdAt: this.timestamp().default(raw("now()")),
|
|
1882
|
+
updatedAt: this.timestamp().default(raw("now()"))
|
|
1883
|
+
};
|
|
1884
|
+
},
|
|
1883
1885
|
primaryKey(columns, options) {
|
|
1884
1886
|
tableData.primaryKey = { columns, options };
|
|
1885
1887
|
return emptyObject;
|