orchid-orm 1.5.10 → 1.5.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/CHANGELOG.md +8 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/table.test.ts +5 -5
- package/src/table.ts +7 -4
- package/src/test-utils/test-tables.ts +5 -6
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as pqb from 'pqb';
|
|
2
|
-
import { BelongsToRelation, HasManyRelation, HasOneRelation, Db, Adapter, AdapterOptions, QueryLogOptions, NoPrimaryKeyOption, HasAndBelongsToManyRelation, Query, defaultsKey, EmptyObject, BaseRelation, RelationQuery, SetQueryReturnsOne, SetQueryReturnsOneOptional, SetQueryReturnsAll, ColumnTypesBase, ColumnsShape, ColumnShapeOutput, WhereResult, MergeQuery, SetQueryReturns, QueryReturnType } from 'pqb';
|
|
2
|
+
import { BelongsToRelation, HasManyRelation, HasOneRelation, Db, Adapter, AdapterOptions, QueryLogOptions, NoPrimaryKeyOption, HasAndBelongsToManyRelation, Query, defaultsKey, EmptyObject, BaseRelation, RelationQuery, SetQueryReturnsOne, SetQueryReturnsOneOptional, SetQueryReturnsAll, ColumnTypesBase, DefaultColumnTypes, ColumnsShape, ColumnShapeOutput, WhereResult, MergeQuery, SetQueryReturns, QueryReturnType } from 'pqb';
|
|
3
3
|
export { columnTypes } from 'pqb';
|
|
4
4
|
import { AppCodeUpdater } from 'rake-db';
|
|
5
5
|
|
|
@@ -142,7 +142,7 @@ declare type Table = {
|
|
|
142
142
|
noPrimaryKey?: boolean;
|
|
143
143
|
};
|
|
144
144
|
declare const createBaseTable: <CT extends ColumnTypesBase>(options?: {
|
|
145
|
-
columnTypes?: CT | undefined;
|
|
145
|
+
columnTypes?: CT | ((t: DefaultColumnTypes) => CT) | undefined;
|
|
146
146
|
}) => {
|
|
147
147
|
new (): {
|
|
148
148
|
table: string;
|
package/dist/index.js
CHANGED
|
@@ -33,9 +33,8 @@ var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
|
33
33
|
var typescript__default = /*#__PURE__*/_interopDefaultLegacy(typescript);
|
|
34
34
|
|
|
35
35
|
const createBaseTable = (options = { columnTypes: pqb.columnTypes }) => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
);
|
|
36
|
+
const ct = typeof options.columnTypes === "function" ? options.columnTypes(pqb.columnTypes) : options.columnTypes;
|
|
37
|
+
return create(ct);
|
|
39
38
|
};
|
|
40
39
|
const create = (columnTypes2) => {
|
|
41
40
|
return class BaseTable {
|