@payloadcms/db-postgres 0.1.0-beta.6 → 0.1.0-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connect.d.ts +3 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/create.d.ts +3 -0
- package/dist/create.d.ts.map +1 -0
- package/dist/create.js +1 -1
- package/dist/createGlobal.d.ts +5 -0
- package/dist/createGlobal.d.ts.map +1 -0
- package/dist/createGlobalVersion.d.ts +6 -0
- package/dist/createGlobalVersion.d.ts.map +1 -0
- package/dist/createMigration.d.ts +3 -0
- package/dist/createMigration.d.ts.map +1 -0
- package/dist/createVersion.d.ts +5 -0
- package/dist/createVersion.d.ts.map +1 -0
- package/dist/deleteMany.d.ts +3 -0
- package/dist/deleteMany.d.ts.map +1 -0
- package/dist/deleteOne.d.ts +3 -0
- package/dist/deleteOne.d.ts.map +1 -0
- package/dist/deleteVersions.d.ts +3 -0
- package/dist/deleteVersions.d.ts.map +1 -0
- package/dist/destroy.d.ts +3 -0
- package/dist/destroy.d.ts.map +1 -0
- package/dist/find/buildFindManyArgs.d.ts +13 -0
- package/dist/find/buildFindManyArgs.d.ts.map +1 -0
- package/dist/find/chainMethods.d.ts +15 -0
- package/dist/find/chainMethods.d.ts.map +1 -0
- package/dist/find/findMany.d.ts +22 -0
- package/dist/find/findMany.d.ts.map +1 -0
- package/dist/find/traverseFields.d.ts +16 -0
- package/dist/find/traverseFields.d.ts.map +1 -0
- package/dist/find.d.ts +3 -0
- package/dist/find.d.ts.map +1 -0
- package/dist/findGlobal.d.ts +3 -0
- package/dist/findGlobal.d.ts.map +1 -0
- package/dist/findGlobalVersions.d.ts +3 -0
- package/dist/findGlobalVersions.d.ts.map +1 -0
- package/dist/findOne.d.ts +5 -0
- package/dist/findOne.d.ts.map +1 -0
- package/dist/findVersions.d.ts +3 -0
- package/dist/findVersions.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/init.d.ts +3 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/migrate.d.ts +3 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrateStatus.d.ts +3 -0
- package/dist/migrateStatus.d.ts.map +1 -0
- package/dist/queries/buildAndOrConditions.d.ts +17 -0
- package/dist/queries/buildAndOrConditions.d.ts.map +1 -0
- package/dist/queries/buildQuery.d.ts +30 -0
- package/dist/queries/buildQuery.d.ts.map +1 -0
- package/dist/queries/createJSONQuery/convertPathToJSONTraversal.d.ts +2 -0
- package/dist/queries/createJSONQuery/convertPathToJSONTraversal.d.ts.map +1 -0
- package/dist/queries/createJSONQuery/formatJSONPathSegment.d.ts +2 -0
- package/dist/queries/createJSONQuery/formatJSONPathSegment.d.ts.map +1 -0
- package/dist/queries/createJSONQuery/index.d.ts +10 -0
- package/dist/queries/createJSONQuery/index.d.ts.map +1 -0
- package/dist/queries/getTableColumnFromPath.d.ts +40 -0
- package/dist/queries/getTableColumnFromPath.d.ts.map +1 -0
- package/dist/queries/operatorMap.d.ts +18 -0
- package/dist/queries/operatorMap.d.ts.map +1 -0
- package/dist/queries/parseParams.d.ts +17 -0
- package/dist/queries/parseParams.d.ts.map +1 -0
- package/dist/queries/sanitizeQueryValue.d.ts +12 -0
- package/dist/queries/sanitizeQueryValue.d.ts.map +1 -0
- package/dist/queryDrafts.d.ts +3 -0
- package/dist/queryDrafts.d.ts.map +1 -0
- package/dist/reference.d.ts +2 -0
- package/dist/reference.d.ts.map +1 -0
- package/dist/schema/build.d.ts +22 -0
- package/dist/schema/build.d.ts.map +1 -0
- package/dist/schema/createIndex.d.ts +11 -0
- package/dist/schema/createIndex.d.ts.map +1 -0
- package/dist/schema/parentIDColumnMap.d.ts +7 -0
- package/dist/schema/parentIDColumnMap.d.ts.map +1 -0
- package/dist/schema/traverseFields.d.ts +32 -0
- package/dist/schema/traverseFields.d.ts.map +1 -0
- package/dist/schema/validateExistingBlockIsIdentical.d.ts +11 -0
- package/dist/schema/validateExistingBlockIsIdentical.d.ts.map +1 -0
- package/dist/transactions/beginTransaction.d.ts +3 -0
- package/dist/transactions/beginTransaction.d.ts.map +1 -0
- package/dist/transactions/commitTransaction.d.ts +3 -0
- package/dist/transactions/commitTransaction.d.ts.map +1 -0
- package/dist/transactions/rollbackTransaction.d.ts +3 -0
- package/dist/transactions/rollbackTransaction.d.ts.map +1 -0
- package/dist/transform/read/hasManyNumber.d.ts +10 -0
- package/dist/transform/read/hasManyNumber.d.ts.map +1 -0
- package/dist/transform/read/index.d.ts +12 -0
- package/dist/transform/read/index.d.ts.map +1 -0
- package/dist/transform/read/relationship.d.ts +10 -0
- package/dist/transform/read/relationship.d.ts.map +1 -0
- package/dist/transform/read/traverseFields.d.ts +44 -0
- package/dist/transform/read/traverseFields.d.ts.map +1 -0
- package/dist/transform/write/array.d.ts +22 -0
- package/dist/transform/write/array.d.ts.map +1 -0
- package/dist/transform/write/blocks.d.ts +21 -0
- package/dist/transform/write/blocks.d.ts.map +1 -0
- package/dist/transform/write/index.d.ts +11 -0
- package/dist/transform/write/index.d.ts.map +1 -0
- package/dist/transform/write/numbers.d.ts +8 -0
- package/dist/transform/write/numbers.d.ts.map +1 -0
- package/dist/transform/write/relationships.d.ts +10 -0
- package/dist/transform/write/relationships.d.ts.map +1 -0
- package/dist/transform/write/selects.d.ts +7 -0
- package/dist/transform/write/selects.d.ts.map +1 -0
- package/dist/transform/write/traverseFields.d.ts +46 -0
- package/dist/transform/write/traverseFields.d.ts.map +1 -0
- package/dist/transform/write/types.d.ts +41 -0
- package/dist/transform/write/types.d.ts.map +1 -0
- package/dist/types.d.ts +67 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/update.d.ts +3 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/updateGlobal.d.ts +5 -0
- package/dist/updateGlobal.d.ts.map +1 -0
- package/dist/updateGlobalVersion.d.ts +6 -0
- package/dist/updateGlobalVersion.d.ts.map +1 -0
- package/dist/updateVersion.d.ts +5 -0
- package/dist/updateVersion.d.ts.map +1 -0
- package/dist/upsertRow/deleteExistingArrayRows.d.ts +10 -0
- package/dist/upsertRow/deleteExistingArrayRows.d.ts.map +1 -0
- package/dist/upsertRow/deleteExistingRowsByPath.d.ts +14 -0
- package/dist/upsertRow/deleteExistingRowsByPath.d.ts.map +1 -0
- package/dist/upsertRow/index.d.ts +4 -0
- package/dist/upsertRow/index.d.ts.map +1 -0
- package/dist/upsertRow/insertArrays.d.ts +13 -0
- package/dist/upsertRow/insertArrays.d.ts.map +1 -0
- package/dist/upsertRow/types.d.ts +26 -0
- package/dist/upsertRow/types.d.ts.map +1 -0
- package/dist/utilities/appendPrefixToKeys.d.ts +2 -0
- package/dist/utilities/appendPrefixToKeys.d.ts.map +1 -0
- package/dist/utilities/createBlocksMap.d.ts +5 -0
- package/dist/utilities/createBlocksMap.d.ts.map +1 -0
- package/dist/utilities/createMigrationTable.d.ts +3 -0
- package/dist/utilities/createMigrationTable.d.ts.map +1 -0
- package/dist/utilities/createRelationshipMap.d.ts +2 -0
- package/dist/utilities/createRelationshipMap.d.ts.map +1 -0
- package/dist/utilities/hasLocalesTable.d.ts +3 -0
- package/dist/utilities/hasLocalesTable.d.ts.map +1 -0
- package/dist/utilities/isArrayOfRows.d.ts +2 -0
- package/dist/utilities/isArrayOfRows.d.ts.map +1 -0
- package/dist/utilities/migrationTableExists.d.ts +3 -0
- package/dist/utilities/migrationTableExists.d.ts.map +1 -0
- package/dist/webpack.d.ts +3 -0
- package/dist/webpack.d.ts.map +1 -0
- package/package.json +2 -2
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAU/C,eAAO,MAAM,OAAO,EAAE,OA4ErB,CAAA"}
|
package/dist/create.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../src/create.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAQ9C,eAAO,MAAM,MAAM,EAAE,MAiBpB,CAAA"}
|
package/dist/create.js
CHANGED
@@ -29,4 +29,4 @@ const create = async function create({ collection: collectionSlug, data, req })
|
|
29
29
|
return result;
|
30
30
|
};
|
31
31
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jcmVhdGUudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBDcmVhdGUgfSBmcm9tICdwYXlsb2FkL2RhdGFiYXNlJ1xuXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBQb3N0Z3Jlc0FkYXB0ZXIgfSBmcm9tICcuL3R5cGVzJ1xuXG5pbXBvcnQgeyB1cHNlcnRSb3cgfSBmcm9tICcuL3Vwc2VydFJvdydcblxuZXhwb3J0IGNvbnN0IGNyZWF0ZTogQ3JlYXRlID0gYXN5bmMgZnVuY3Rpb24gY3JlYXRlKFxuICB0aGlzOiBQb3N0Z3Jlc0FkYXB0ZXIsXG4gIHsgY29sbGVjdGlvbjogY29sbGVjdGlvblNsdWcsIGRhdGEsIHJlcSB9LFxuKSB7XG4gIGNvbnN0IGRiID0gdGhpcy5zZXNzaW9uc1tyZXEudHJhbnNhY3Rpb25JRF0/LmRiIHx8IHRoaXMuZHJpenpsZVxuICBjb25zdCBjb2xsZWN0aW9uID0gdGhpcy5wYXlsb2FkLmNvbGxlY3Rpb25zW2NvbGxlY3Rpb25TbHVnXS5jb25maWdcblxuICBjb25zdCByZXN1bHQgPSBhd2FpdCB1cHNlcnRSb3coe1xuICAgIGFkYXB0ZXI6IHRoaXMsXG4gICAgZGF0YSxcbiAgICBkYixcbiAgICBmaWVsZHM6IGNvbGxlY3Rpb24uZmllbGRzLFxuICAgIG9wZXJhdGlvbjogJ2NyZWF0ZScsXG4gICAgdGFibGVOYW1lOiB0b1NuYWtlQ2FzZShjb2xsZWN0aW9uU2x1ZyksXG4gIH0pXG5cbiAgcmV0dXJuIHJlc3VsdFxufVxuIl0sIm5hbWVzIjpbImNyZWF0ZSIsImNvbGxlY3Rpb24iLCJjb2xsZWN0aW9uU2x1ZyIsImRhdGEiLCJyZXEiLCJkYiIsInNlc3Npb25zIiwidHJhbnNhY3Rpb25JRCIsImRyaXp6bGUiLCJwYXlsb2FkIiwiY29sbGVjdGlvbnMiLCJjb25maWciLCJyZXN1bHQiLCJ1cHNlcnRSb3ciLCJhZGFwdGVyIiwiZmllbGRzIiwib3BlcmF0aW9uIiwidGFibGVOYW1lIiwidG9TbmFrZUNhc2UiXSwibWFwcGluZ3MiOiI7Ozs7K0JBUWFBOzs7ZUFBQUE7OztvRUFOVzsyQkFJRTs7Ozs7O0FBRW5CLE1BQU1BLFNBQWlCLGVBQWVBLE9BRTNDLEVBQUVDLFlBQVlDLGNBQWMsRUFBRUMsSUFBSSxFQUFFQyxHQUFHLEVBQUU7SUFFekMsTUFBTUMsS0FBSyxJQUFJLENBQUNDLFFBQVEsQ0FBQ0YsSUFBSUcsYUFBYSxDQUFDLEVBQUVGLE1BQU0sSUFBSSxDQUFDRyxPQUFPO0lBQy9ELE1BQU1QLGFBQWEsSUFBSSxDQUFDUSxPQUFPLENBQUNDLFdBQVcsQ0FBQ1IsZUFBZSxDQUFDUyxNQUFNO0lBRWxFLE1BQU1DLFNBQVMsTUFBTUMsSUFBQUEsb0JBQVMsRUFBQztRQUM3QkMsU0FBUyxJQUFJO1FBQ2JYO1FBQ0FFO1FBQ0FVLFFBQVFkLFdBQVdjLE1BQU07UUFDekJDLFdBQVc7UUFDWEMsV0FBV0MsSUFBQUEsb0JBQVcsRUFBQ2hCO0lBQ3pCO0lBRUEsT0FBT1U7QUFDVCJ9
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { CreateGlobalArgs } from 'payload/database';
|
2
|
+
import type { TypeWithID } from 'payload/types';
|
3
|
+
import type { PostgresAdapter } from './types';
|
4
|
+
export declare function createGlobal<T extends TypeWithID>(this: PostgresAdapter, { data, req, slug }: CreateGlobalArgs): Promise<T>;
|
5
|
+
//# sourceMappingURL=createGlobal.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createGlobal.d.ts","sourceRoot":"","sources":["../src/createGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAA;AAI/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,YAAY,CAAC,CAAC,SAAS,UAAU,EACrD,IAAI,EAAE,eAAe,EACrB,EAAE,IAAI,EAAE,GAA0B,EAAE,IAAI,EAAE,EAAE,gBAAgB,GAC3D,OAAO,CAAC,CAAC,CAAC,CAcZ"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { TypeWithVersion } from 'payload/database';
|
2
|
+
import type { TypeWithID } from 'payload/types';
|
3
|
+
import { type CreateGlobalVersionArgs } from 'payload/database';
|
4
|
+
import type { PostgresAdapter } from './types';
|
5
|
+
export declare function createGlobalVersion<T extends TypeWithID>(this: PostgresAdapter, { autosave, globalSlug, req, versionData }: CreateGlobalVersionArgs): Promise<TypeWithVersion<T>>;
|
6
|
+
//# sourceMappingURL=createGlobalVersion.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createGlobalVersion.d.ts","sourceRoot":"","sources":["../src/createGlobalVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAA;AAG/D,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAI/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,mBAAmB,CAAC,CAAC,SAAS,UAAU,EAC5D,IAAI,EAAE,eAAe,EACrB,EAAE,QAAQ,EAAE,UAAU,EAAE,GAA0B,EAAE,WAAW,EAAE,EAAE,uBAAuB,+BA+B3F"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../src/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAqDvD,eAAO,MAAM,eAAe,EAAE,eAmD7B,CAAA"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { CreateVersionArgs, TypeWithVersion } from 'payload/database';
|
2
|
+
import type { TypeWithID } from 'payload/types';
|
3
|
+
import type { PostgresAdapter } from './types';
|
4
|
+
export declare function createVersion<T extends TypeWithID>(this: PostgresAdapter, { autosave, collectionSlug, parent, req, versionData, }: CreateVersionArgs<T>): Promise<TypeWithVersion<T>>;
|
5
|
+
//# sourceMappingURL=createVersion.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createVersion.d.ts","sourceRoot":"","sources":["../src/createVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EAAkB,UAAU,EAAE,MAAM,eAAe,CAAA;AAM/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,aAAa,CAAC,CAAC,SAAS,UAAU,EACtD,IAAI,EAAE,eAAe,EACrB,EACE,QAAQ,EACR,cAAc,EACd,MAAM,EACN,GAA0B,EAC1B,WAAW,GACZ,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BAqCxB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deleteMany.d.ts","sourceRoot":"","sources":["../src/deleteMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAUlD,eAAO,MAAM,UAAU,EAAE,UA6BxB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deleteOne.d.ts","sourceRoot":"","sources":["../src/deleteOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAWjD,eAAO,MAAM,SAAS,EAAE,SAmCvB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deleteVersions.d.ts","sourceRoot":"","sources":["../src/deleteVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAWtD,eAAO,MAAM,cAAc,EAAE,cAiC5B,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"destroy.d.ts","sourceRoot":"","sources":["../src/destroy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,eAAO,MAAM,OAAO,EAAE,OAGrB,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { DBQueryConfig } from 'drizzle-orm';
|
2
|
+
import type { Field } from 'payload/types';
|
3
|
+
import type { PostgresAdapter } from '../types';
|
4
|
+
type BuildFindQueryArgs = {
|
5
|
+
adapter: PostgresAdapter;
|
6
|
+
depth: number;
|
7
|
+
fields: Field[];
|
8
|
+
tableName: string;
|
9
|
+
};
|
10
|
+
export type Result = DBQueryConfig<'many', true, any, any>;
|
11
|
+
export declare const buildFindManyArgs: ({ adapter, depth, fields, tableName, }: BuildFindQueryArgs) => Record<string, unknown>;
|
12
|
+
export {};
|
13
|
+
//# sourceMappingURL=buildFindManyArgs.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"buildFindManyArgs.d.ts","sourceRoot":"","sources":["../../src/find/buildFindManyArgs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI/C,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAI1D,eAAO,MAAM,iBAAiB,2CAK3B,kBAAkB,KAAG,OAAO,MAAM,EAAE,OAAO,CAiD7C,CAAA"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export type ChainedMethods = {
|
2
|
+
args: unknown[];
|
3
|
+
method: string;
|
4
|
+
}[];
|
5
|
+
/**
|
6
|
+
* Call and returning methods that would normally be chained together but cannot be because of control logic
|
7
|
+
* @param methods
|
8
|
+
* @param query
|
9
|
+
*/
|
10
|
+
declare const chainMethods: ({ methods, query }: {
|
11
|
+
methods: any;
|
12
|
+
query: any;
|
13
|
+
}) => Promise<unknown>;
|
14
|
+
export { chainMethods };
|
15
|
+
//# sourceMappingURL=chainMethods.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chainMethods.d.ts","sourceRoot":"","sources":["../../src/find/chainMethods.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,EAAE,CAAA;AAEH;;;;GAIG;AACH,QAAA,MAAM,YAAY;;;MAAyB,QAAQ,OAAO,CAIzD,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import type { FindArgs } from 'payload/database';
|
2
|
+
import type { Field } from 'payload/types';
|
3
|
+
import type { PostgresAdapter } from '../types';
|
4
|
+
type Args = Omit<FindArgs, 'collection'> & {
|
5
|
+
adapter: PostgresAdapter;
|
6
|
+
fields: Field[];
|
7
|
+
tableName: string;
|
8
|
+
};
|
9
|
+
export declare const findMany: ({ adapter, fields, limit: limitArg, locale, page, pagination, req, skip, sort, tableName, where: whereArg, }: Args) => Promise<{
|
10
|
+
docs: any;
|
11
|
+
hasNextPage: boolean;
|
12
|
+
hasPrevPage: boolean;
|
13
|
+
limit: number;
|
14
|
+
nextPage: number;
|
15
|
+
page: number;
|
16
|
+
pagingCounter: number;
|
17
|
+
prevPage: number;
|
18
|
+
totalDocs: number;
|
19
|
+
totalPages: number;
|
20
|
+
}>;
|
21
|
+
export {};
|
22
|
+
//# sourceMappingURL=findMany.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"findMany.d.ts","sourceRoot":"","sources":["../../src/find/findMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAA8B,MAAM,eAAe,CAAA;AAItE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ/C,KAAK,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG;IACzC,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,QAAQ,iHAYlB,IAAI;;;;;;;;;;;EAuKN,CAAA"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Field } from 'payload/types';
|
2
|
+
import type { PostgresAdapter } from '../types';
|
3
|
+
type TraverseFieldArgs = {
|
4
|
+
_locales: Record<string, unknown>;
|
5
|
+
adapter: PostgresAdapter;
|
6
|
+
currentArgs: Record<string, unknown>;
|
7
|
+
currentTableName: string;
|
8
|
+
depth?: number;
|
9
|
+
fields: Field[];
|
10
|
+
path: string;
|
11
|
+
topLevelArgs: Record<string, unknown>;
|
12
|
+
topLevelTableName: string;
|
13
|
+
};
|
14
|
+
export declare const traverseFields: ({ _locales, adapter, currentArgs, currentTableName, depth, fields, path, topLevelArgs, topLevelTableName, }: TraverseFieldArgs) => Record<string, unknown>;
|
15
|
+
export {};
|
16
|
+
//# sourceMappingURL=traverseFields.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/find/traverseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAK1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG/C,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,OAAO,EAAE,eAAe,CAAA;IACxB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC,gBAAgB,EAAE,MAAM,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,cAAc,gHAUxB,iBAAiB,4BA0GnB,CAAA"}
|
package/dist/find.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../src/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAS5C,eAAO,MAAM,IAAI,EAAE,IA4BlB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"findGlobal.d.ts","sourceRoot":"","sources":["../src/findGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAQlD,eAAO,MAAM,UAAU,EAAE,UA0BxB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"findGlobalVersions.d.ts","sourceRoot":"","sources":["../src/findGlobalVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAU1D,eAAO,MAAM,kBAAkB,EAAE,kBAmChC,CAAA"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { FindOneArgs } from 'payload/database';
|
2
|
+
import type { TypeWithID } from 'payload/types';
|
3
|
+
import type { PostgresAdapter } from './types';
|
4
|
+
export declare function findOne<T extends TypeWithID>(this: PostgresAdapter, { collection, locale, req, where: incomingWhere }: FindOneArgs): Promise<T>;
|
5
|
+
//# sourceMappingURL=findOne.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"findOne.d.ts","sourceRoot":"","sources":["../src/findOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAA6C,UAAU,EAAE,MAAM,eAAe,CAAA;AAI1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,wBAAsB,OAAO,CAAC,CAAC,SAAS,UAAU,EAChD,IAAI,EAAE,eAAe,EACrB,EAAE,UAAU,EAAE,MAAM,EAAE,GAA0B,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,WAAW,GACpF,OAAO,CAAC,CAAC,CAAC,CAiCZ"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../src/findVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAUpD,eAAO,MAAM,YAAY,EAAE,YAiC1B,CAAA"}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAmB,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3E,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AA8B7D,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,qBAAqB,CAmDjE"}
|
package/dist/init.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,IAAI,EAAE,IAiElB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../src/migrate.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,wBAAsB,OAAO,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAiElE"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrateStatus.d.ts","sourceRoot":"","sources":["../src/migrateStatus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAsB,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCxE"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { SQL } from 'drizzle-orm';
|
2
|
+
import type { Field, Where } from 'payload/types';
|
3
|
+
import type { GenericColumn, PostgresAdapter } from '../types';
|
4
|
+
import type { BuildQueryJoinAliases, BuildQueryJoins } from './buildQuery';
|
5
|
+
export declare function buildAndOrConditions({ adapter, fields, joinAliases, joins, locale, selectFields, tableName, where, }: {
|
6
|
+
adapter: PostgresAdapter;
|
7
|
+
collectionSlug?: string;
|
8
|
+
fields: Field[];
|
9
|
+
globalSlug?: string;
|
10
|
+
joinAliases: BuildQueryJoinAliases;
|
11
|
+
joins: BuildQueryJoins;
|
12
|
+
locale?: string;
|
13
|
+
selectFields: Record<string, GenericColumn>;
|
14
|
+
tableName: string;
|
15
|
+
where: Where[];
|
16
|
+
}): Promise<SQL[]>;
|
17
|
+
//# sourceMappingURL=buildAndOrConditions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"buildAndOrConditions.d.ts","sourceRoot":"","sources":["../../src/queries/buildAndOrConditions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI1E,wBAAsB,oBAAoB,CAAC,EACzC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE;IACD,OAAO,EAAE,eAAe,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,EAAE,CAAA;CACf,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAyBjB"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import type { SQL } from 'drizzle-orm';
|
2
|
+
import type { Field, Where } from 'payload/types';
|
3
|
+
import { asc, desc } from 'drizzle-orm';
|
4
|
+
import type { GenericColumn, GenericTable, PostgresAdapter } from '../types';
|
5
|
+
export type BuildQueryJoins = Record<string, SQL>;
|
6
|
+
export type BuildQueryJoinAliases = {
|
7
|
+
condition: SQL;
|
8
|
+
table: GenericTable;
|
9
|
+
}[];
|
10
|
+
type BuildQueryArgs = {
|
11
|
+
adapter: PostgresAdapter;
|
12
|
+
fields: Field[];
|
13
|
+
locale?: string;
|
14
|
+
sort?: string;
|
15
|
+
tableName: string;
|
16
|
+
where: Where;
|
17
|
+
};
|
18
|
+
type Result = {
|
19
|
+
joinAliases: BuildQueryJoinAliases;
|
20
|
+
joins: BuildQueryJoins;
|
21
|
+
orderBy: {
|
22
|
+
column: GenericColumn;
|
23
|
+
order: typeof asc | typeof desc;
|
24
|
+
};
|
25
|
+
selectFields: Record<string, GenericColumn>;
|
26
|
+
where: SQL;
|
27
|
+
};
|
28
|
+
declare const buildQuery: ({ adapter, fields, locale, sort, tableName, where: incomingWhere, }: BuildQueryArgs) => Promise<Result>;
|
29
|
+
export default buildQuery;
|
30
|
+
//# sourceMappingURL=buildQuery.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"buildQuery.d.ts","sourceRoot":"","sources":["../../src/queries/buildQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAK5E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,GAAG,CAAA;IACd,KAAK,EAAE,YAAY,CAAA;CACpB,EAAE,CAAA;AAEH,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,OAAO,EAAE;QACP,MAAM,EAAE,aAAa,CAAA;QACrB,KAAK,EAAE,OAAO,GAAG,GAAG,OAAO,IAAI,CAAA;KAChC,CAAA;IACD,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,KAAK,EAAE,GAAG,CAAA;CACX,CAAA;AACD,QAAA,MAAM,UAAU,wEAOb,cAAc,KAAG,QAAQ,MAAM,CAyEjC,CAAA;AAED,eAAe,UAAU,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"convertPathToJSONTraversal.d.ts","sourceRoot":"","sources":["../../../src/queries/createJSONQuery/convertPathToJSONTraversal.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,qBAAsB,MAAM,EAAE,WAUpE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"formatJSONPathSegment.d.ts","sourceRoot":"","sources":["../../../src/queries/createJSONQuery/formatJSONPathSegment.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,YAAa,MAAM,WAEpD,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
type Args = {
|
2
|
+
operator: string;
|
3
|
+
pathSegments: string[];
|
4
|
+
treatAsArray?: string[];
|
5
|
+
treatRootAsArray?: boolean;
|
6
|
+
value: unknown;
|
7
|
+
};
|
8
|
+
export declare const createJSONQuery: ({ operator, pathSegments, treatAsArray, treatRootAsArray, value, }: Args) => string;
|
9
|
+
export {};
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/queries/createJSONQuery/index.ts"],"names":[],"mappings":"AAmDA,KAAK,IAAI,GAAG;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAED,eAAO,MAAM,eAAe,uEAMzB,IAAI,KAAG,MAqBT,CAAA"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import type { SQL } from 'drizzle-orm';
|
2
|
+
import type { Field, FieldAffectingData, TabAsField } from 'payload/types';
|
3
|
+
import type { GenericColumn, GenericTable, PostgresAdapter } from '../types';
|
4
|
+
import type { BuildQueryJoinAliases, BuildQueryJoins } from './buildQuery';
|
5
|
+
type Constraint = {
|
6
|
+
columnName: string;
|
7
|
+
table: GenericTable;
|
8
|
+
value: unknown;
|
9
|
+
};
|
10
|
+
type TableColumn = {
|
11
|
+
columnName?: string;
|
12
|
+
constraints: Constraint[];
|
13
|
+
field: FieldAffectingData;
|
14
|
+
getNotNullColumnByValue?: (val: unknown) => string;
|
15
|
+
pathSegments?: string[];
|
16
|
+
rawColumn?: SQL;
|
17
|
+
table: GenericTable;
|
18
|
+
};
|
19
|
+
type Args = {
|
20
|
+
adapter: PostgresAdapter;
|
21
|
+
aliasTable?: GenericTable;
|
22
|
+
collectionPath: string;
|
23
|
+
columnPrefix?: string;
|
24
|
+
constraints?: Constraint[];
|
25
|
+
fields: (Field | TabAsField)[];
|
26
|
+
joinAliases: BuildQueryJoinAliases;
|
27
|
+
joins: BuildQueryJoins;
|
28
|
+
locale?: string;
|
29
|
+
pathSegments: string[];
|
30
|
+
selectFields: Record<string, GenericColumn>;
|
31
|
+
tableName: string;
|
32
|
+
};
|
33
|
+
/**
|
34
|
+
* Transforms path to table and column name
|
35
|
+
* Adds tables to `join`
|
36
|
+
* @returns TableColumn
|
37
|
+
*/
|
38
|
+
export declare const getTableColumnFromPath: ({ adapter, aliasTable, collectionPath, columnPrefix, constraints, fields, joinAliases, joins, locale: incomingLocale, pathSegments: incomingSegments, selectFields, tableName, }: Args) => TableColumn;
|
39
|
+
export {};
|
40
|
+
//# sourceMappingURL=getTableColumnFromPath.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getTableColumnFromPath.d.ts","sourceRoot":"","sources":["../../src/queries/getTableColumnFromPath.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAU1E,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE1E,KAAK,UAAU,GAAG;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAED,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB,KAAK,EAAE,kBAAkB,CAAA;IACzB,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,CAAA;IAClD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,KAAK,EAAE,YAAY,CAAA;CACpB,CAAA;AAED,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,UAAU,CAAC,EAAE,YAAY,CAAA;IACzB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AACD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,qLAahC,IAAI,KAAG,WAgWT,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { and, ilike, inArray, isNotNull, isNull, notInArray, or } from 'drizzle-orm';
|
2
|
+
export declare const operatorMap: {
|
3
|
+
and: typeof and;
|
4
|
+
contains: typeof ilike;
|
5
|
+
equals: import("drizzle-orm").BinaryOperator;
|
6
|
+
exists: typeof isNotNull;
|
7
|
+
greater_than: import("drizzle-orm").BinaryOperator;
|
8
|
+
greater_than_equal: import("drizzle-orm").BinaryOperator;
|
9
|
+
in: typeof inArray;
|
10
|
+
isNull: typeof isNull;
|
11
|
+
less_than: import("drizzle-orm").BinaryOperator;
|
12
|
+
less_than_equal: import("drizzle-orm").BinaryOperator;
|
13
|
+
like: typeof ilike;
|
14
|
+
not_equals: import("drizzle-orm").BinaryOperator;
|
15
|
+
not_in: typeof notInArray;
|
16
|
+
or: typeof or;
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=operatorMap.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"operatorMap.d.ts","sourceRoot":"","sources":["../../src/queries/operatorMap.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EAIH,KAAK,EACL,OAAO,EACP,SAAS,EACT,MAAM,EAIN,UAAU,EACV,EAAE,EACH,MAAM,aAAa,CAAA;AAEpB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;CAoBvB,CAAA"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { SQL } from 'drizzle-orm';
|
2
|
+
import type { Field, Where } from 'payload/types';
|
3
|
+
import type { GenericColumn, PostgresAdapter } from '../types';
|
4
|
+
import type { BuildQueryJoinAliases, BuildQueryJoins } from './buildQuery';
|
5
|
+
type Args = {
|
6
|
+
adapter: PostgresAdapter;
|
7
|
+
fields: Field[];
|
8
|
+
joinAliases: BuildQueryJoinAliases;
|
9
|
+
joins: BuildQueryJoins;
|
10
|
+
locale: string;
|
11
|
+
selectFields: Record<string, GenericColumn>;
|
12
|
+
tableName: string;
|
13
|
+
where: Where;
|
14
|
+
};
|
15
|
+
export declare function parseParams({ adapter, fields, joinAliases, joins, locale, selectFields, tableName, where, }: Args): Promise<SQL>;
|
16
|
+
export {};
|
17
|
+
//# sourceMappingURL=parseParams.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parseParams.d.ts","sourceRoot":"","sources":["../../src/queries/parseParams.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAY,KAAK,EAAE,MAAM,eAAe,CAAA;AAM3D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAS1E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,qBAAqB,CAAA;IAClC,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,wBAAsB,WAAW,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,KAAK,GACN,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAkJrB"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { type Field, type TabAsField } from 'payload/types';
|
2
|
+
type SanitizeQueryValueArgs = {
|
3
|
+
field: Field | TabAsField;
|
4
|
+
operator: string;
|
5
|
+
val: any;
|
6
|
+
};
|
7
|
+
export declare const sanitizeQueryValue: ({ field, operator: operatorArg, val, }: SanitizeQueryValueArgs) => {
|
8
|
+
operator: string;
|
9
|
+
value: unknown;
|
10
|
+
};
|
11
|
+
export {};
|
12
|
+
//# sourceMappingURL=sanitizeQueryValue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sanitizeQueryValue.d.ts","sourceRoot":"","sources":["../../src/queries/sanitizeQueryValue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,UAAU,EAAoB,MAAM,eAAe,CAAA;AAG7E,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,GAAG,CAAA;CACT,CAAA;AAED,eAAO,MAAM,kBAAkB,2CAI5B,sBAAsB;cAAe,MAAM;WAAS,OAAO;CA6D7D,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"queryDrafts.d.ts","sourceRoot":"","sources":["../src/queryDrafts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,kBAAkB,CAAA;AAMnE,eAAO,MAAM,WAAW,EAAE,WA2CzB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import type { IndexBuilder, PgColumnBuilder, UniqueConstraintBuilder } from 'drizzle-orm/pg-core';
|
2
|
+
import type { Field } from 'payload/types';
|
3
|
+
import type { GenericColumns, PostgresAdapter } from '../types';
|
4
|
+
type Args = {
|
5
|
+
adapter: PostgresAdapter;
|
6
|
+
baseColumns?: Record<string, PgColumnBuilder>;
|
7
|
+
baseExtraConfig?: Record<string, (cols: GenericColumns) => IndexBuilder | UniqueConstraintBuilder>;
|
8
|
+
buildRelationships?: boolean;
|
9
|
+
disableUnique: boolean;
|
10
|
+
fields: Field[];
|
11
|
+
rootRelationsToBuild?: Map<string, string>;
|
12
|
+
rootTableIDColType?: string;
|
13
|
+
rootTableName?: string;
|
14
|
+
tableName: string;
|
15
|
+
timestamps?: boolean;
|
16
|
+
};
|
17
|
+
type Result = {
|
18
|
+
relationsToBuild: Map<string, string>;
|
19
|
+
};
|
20
|
+
export declare const buildTable: ({ adapter, baseColumns, baseExtraConfig, buildRelationships, disableUnique, fields, rootRelationsToBuild, rootTableIDColType, rootTableName, tableName, timestamps, }: Args) => Result;
|
21
|
+
export {};
|
22
|
+
//# sourceMappingURL=build.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/schema/build.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAgB1C,OAAO,KAAK,EAAE,cAAc,EAAgB,eAAe,EAAE,MAAM,UAAU,CAAA;AAK7E,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,GAAG,uBAAuB,CAAC,CAAA;IAClG,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,EAAE,OAAO,CAAA;IACtB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,UAAU,0KAYpB,IAAI,KAAG,MA6QT,CAAA"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { GenericColumn } from '../types';
|
2
|
+
type CreateIndexArgs = {
|
3
|
+
columnName: string;
|
4
|
+
name: string;
|
5
|
+
unique?: boolean;
|
6
|
+
};
|
7
|
+
export declare const createIndex: ({ name, columnName, unique }: CreateIndexArgs) => (table: {
|
8
|
+
[x: string]: GenericColumn;
|
9
|
+
}) => import("drizzle-orm/pg-core").IndexBuilder;
|
10
|
+
export {};
|
11
|
+
//# sourceMappingURL=createIndex.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createIndex.d.ts","sourceRoot":"","sources":["../../src/schema/createIndex.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,WAAW,iCAAkC,eAAe;;gDAKxE,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parentIDColumnMap.d.ts","sourceRoot":"","sources":["../../src/schema/parentIDColumnMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE/D,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAA"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import type { IndexBuilder, PgColumnBuilder } from 'drizzle-orm/pg-core';
|
2
|
+
import type { Field, TabAsField } from 'payload/types';
|
3
|
+
import type { GenericColumns, PostgresAdapter } from '../types';
|
4
|
+
type Args = {
|
5
|
+
adapter: PostgresAdapter;
|
6
|
+
buildRelationships: boolean;
|
7
|
+
columnPrefix?: string;
|
8
|
+
columns: Record<string, PgColumnBuilder>;
|
9
|
+
disableUnique?: boolean;
|
10
|
+
fieldPrefix?: string;
|
11
|
+
fields: (Field | TabAsField)[];
|
12
|
+
forceLocalized?: boolean;
|
13
|
+
indexes: Record<string, (cols: GenericColumns) => IndexBuilder>;
|
14
|
+
localesColumns: Record<string, PgColumnBuilder>;
|
15
|
+
localesIndexes: Record<string, (cols: GenericColumns) => IndexBuilder>;
|
16
|
+
newTableName: string;
|
17
|
+
parentTableName: string;
|
18
|
+
relationsToBuild: Map<string, string>;
|
19
|
+
relationships: Set<string>;
|
20
|
+
rootRelationsToBuild?: Map<string, string>;
|
21
|
+
rootTableIDColType: string;
|
22
|
+
rootTableName: string;
|
23
|
+
};
|
24
|
+
type Result = {
|
25
|
+
hasLocalizedField: boolean;
|
26
|
+
hasLocalizedManyNumberField: boolean;
|
27
|
+
hasLocalizedRelationshipField: boolean;
|
28
|
+
hasManyNumberField: 'index' | boolean;
|
29
|
+
};
|
30
|
+
export declare const traverseFields: ({ adapter, buildRelationships, columnPrefix, columns, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, }: Args) => Result;
|
31
|
+
export {};
|
32
|
+
//# sourceMappingURL=traverseFields.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/schema/traverseFields.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAA2B,MAAM,qBAAqB,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAqBtD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ/D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IACxC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,CAAC,CAAA;IAC/D,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC/C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,CAAC,CAAA;IACtE,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,iBAAiB,EAAE,OAAO,CAAA;IAC1B,2BAA2B,EAAE,OAAO,CAAA;IACpC,6BAA6B,EAAE,OAAO,CAAA;IACtC,kBAAkB,EAAE,OAAO,GAAG,OAAO,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,cAAc,kRAmBxB,IAAI,KAAG,MAgeT,CAAA"}
|