@payloadcms/drizzle 3.71.0-internal.e36f916 → 3.71.0
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/find/findMany.d.ts +1 -1
- package/dist/find/findMany.d.ts.map +1 -1
- package/dist/find/findMany.js +2 -2
- package/dist/find/findMany.js.map +1 -1
- package/dist/findGlobalVersions.d.ts.map +1 -1
- package/dist/findGlobalVersions.js +1 -2
- package/dist/findGlobalVersions.js.map +1 -1
- package/dist/findVersions.d.ts.map +1 -1
- package/dist/findVersions.js +1 -2
- package/dist/findVersions.js.map +1 -1
- package/dist/schema/buildDrizzleRelations.d.ts.map +1 -1
- package/dist/schema/buildDrizzleRelations.js +5 -3
- package/dist/schema/buildDrizzleRelations.js.map +1 -1
- package/dist/schema/buildRawSchema.d.ts.map +1 -1
- package/dist/schema/buildRawSchema.js +2 -1
- package/dist/schema/buildRawSchema.js.map +1 -1
- package/package.json +3 -3
package/dist/find/findMany.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ type Args = {
|
|
|
7
7
|
tableName: string;
|
|
8
8
|
versions?: boolean;
|
|
9
9
|
} & Omit<FindArgs, 'collection'>;
|
|
10
|
-
export declare const findMany: ({ adapter, collectionSlug, draftsEnabled, fields, joins: joinQuery, limit: limitArg, locale, page, pagination, req, select,
|
|
10
|
+
export declare const findMany: ({ adapter, collectionSlug, draftsEnabled, fields, joins: joinQuery, limit: limitArg, locale, page, pagination, req, select, sort, tableName, versions, where: whereArg, }: Args) => Promise<{
|
|
11
11
|
docs: any;
|
|
12
12
|
hasNextPage: boolean;
|
|
13
13
|
hasPrevPage: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findMany.d.ts","sourceRoot":"","sources":["../../src/find/findMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAc,MAAM,SAAS,CAAA;AAInE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AASjD,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,cAAc,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;AAEhC,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"findMany.d.ts","sourceRoot":"","sources":["../../src/find/findMany.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAc,MAAM,SAAS,CAAA;AAInE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AASjD,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,cAAc,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;AAEhC,eAAO,MAAM,QAAQ,8KAgBlB,IAAI;;;;;;;;;;;EAiKN,CAAA"}
|
package/dist/find/findMany.js
CHANGED
|
@@ -5,14 +5,14 @@ import { transform } from '../transform/read/index.js';
|
|
|
5
5
|
import { getNameFromDrizzleTable } from '../utilities/getNameFromDrizzleTable.js';
|
|
6
6
|
import { getTransaction } from '../utilities/getTransaction.js';
|
|
7
7
|
import { buildFindManyArgs } from './buildFindManyArgs.js';
|
|
8
|
-
export const findMany = async function find({ adapter, collectionSlug, draftsEnabled, fields, joins: joinQuery, limit: limitArg, locale, page = 1, pagination, req, select,
|
|
8
|
+
export const findMany = async function find({ adapter, collectionSlug, draftsEnabled, fields, joins: joinQuery, limit: limitArg, locale, page = 1, pagination, req, select, sort, tableName, versions, where: whereArg }) {
|
|
9
9
|
let limit = limitArg;
|
|
10
10
|
let totalDocs;
|
|
11
11
|
let totalPages;
|
|
12
12
|
let hasPrevPage;
|
|
13
13
|
let hasNextPage;
|
|
14
14
|
let pagingCounter;
|
|
15
|
-
const offset =
|
|
15
|
+
const offset = (page - 1) * limit;
|
|
16
16
|
if (limit === 0) {
|
|
17
17
|
pagination = false;
|
|
18
18
|
limit = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/find/findMany.ts"],"sourcesContent":["import type { FindArgs, FlattenedField, TypeWithID } from 'payload'\n\nimport { inArray } from 'drizzle-orm'\n\nimport type { DrizzleAdapter } from '../types.js'\n\nimport { buildQuery } from '../queries/buildQuery.js'\nimport { selectDistinct } from '../queries/selectDistinct.js'\nimport { transform } from '../transform/read/index.js'\nimport { getNameFromDrizzleTable } from '../utilities/getNameFromDrizzleTable.js'\nimport { getTransaction } from '../utilities/getTransaction.js'\nimport { buildFindManyArgs } from './buildFindManyArgs.js'\n\ntype Args = {\n adapter: DrizzleAdapter\n collectionSlug?: string\n fields: FlattenedField[]\n tableName: string\n versions?: boolean\n} & Omit<FindArgs, 'collection'>\n\nexport const findMany = async function find({\n adapter,\n collectionSlug,\n draftsEnabled,\n fields,\n joins: joinQuery,\n limit: limitArg,\n locale,\n page = 1,\n pagination,\n req,\n select,\n
|
|
1
|
+
{"version":3,"sources":["../../src/find/findMany.ts"],"sourcesContent":["import type { FindArgs, FlattenedField, TypeWithID } from 'payload'\n\nimport { inArray } from 'drizzle-orm'\n\nimport type { DrizzleAdapter } from '../types.js'\n\nimport { buildQuery } from '../queries/buildQuery.js'\nimport { selectDistinct } from '../queries/selectDistinct.js'\nimport { transform } from '../transform/read/index.js'\nimport { getNameFromDrizzleTable } from '../utilities/getNameFromDrizzleTable.js'\nimport { getTransaction } from '../utilities/getTransaction.js'\nimport { buildFindManyArgs } from './buildFindManyArgs.js'\n\ntype Args = {\n adapter: DrizzleAdapter\n collectionSlug?: string\n fields: FlattenedField[]\n tableName: string\n versions?: boolean\n} & Omit<FindArgs, 'collection'>\n\nexport const findMany = async function find({\n adapter,\n collectionSlug,\n draftsEnabled,\n fields,\n joins: joinQuery,\n limit: limitArg,\n locale,\n page = 1,\n pagination,\n req,\n select,\n sort,\n tableName,\n versions,\n where: whereArg,\n}: Args) {\n let limit = limitArg\n let totalDocs: number\n let totalPages: number\n let hasPrevPage: boolean\n let hasNextPage: boolean\n let pagingCounter: number\n const offset = (page - 1) * limit\n\n if (limit === 0) {\n pagination = false\n limit = undefined\n }\n\n const { joins, orderBy, selectFields, where } = buildQuery({\n adapter,\n fields,\n locale,\n sort,\n tableName,\n where: whereArg,\n })\n\n const orderedIDMap: Record<number | string, number> = {}\n let orderedIDs: (number | string)[]\n\n const findManyArgs = buildFindManyArgs({\n adapter,\n collectionSlug,\n depth: 0,\n draftsEnabled,\n fields,\n joinQuery,\n joins,\n locale,\n select,\n tableName,\n versions,\n })\n\n if (orderBy) {\n for (const key in selectFields) {\n const column = selectFields[key]\n if (!column || column.primary) {\n continue\n }\n\n if (\n !orderBy.some(\n (col) =>\n col.column.name === column.name &&\n getNameFromDrizzleTable(col.column.table) === getNameFromDrizzleTable(column.table),\n )\n ) {\n delete selectFields[key]\n }\n }\n }\n\n const db = await getTransaction(adapter, req)\n\n const selectDistinctResult = await selectDistinct({\n adapter,\n db,\n joins,\n query: ({ query }) => {\n if (orderBy) {\n query = query.orderBy(() => orderBy.map(({ column, order }) => order(column)))\n }\n return query.offset(offset).limit(limit)\n },\n selectFields,\n tableName,\n where,\n })\n\n if (selectDistinctResult) {\n if (selectDistinctResult.length === 0) {\n return {\n docs: [],\n hasNextPage: false,\n hasPrevPage: false,\n limit,\n nextPage: null,\n page: 1,\n pagingCounter: 0,\n prevPage: null,\n totalDocs: 0,\n totalPages: 0,\n }\n } else {\n // set the id in an object for sorting later\n selectDistinctResult.forEach(({ id }, i) => {\n orderedIDMap[id] = i\n })\n orderedIDs = Object.keys(orderedIDMap)\n findManyArgs.where = inArray(adapter.tables[tableName].id, orderedIDs)\n }\n } else {\n findManyArgs.limit = limit\n findManyArgs.offset = offset\n findManyArgs.orderBy = () => orderBy.map(({ column, order }) => order(column))\n\n if (where) {\n findManyArgs.where = where\n }\n }\n\n const findPromise = db.query[tableName].findMany(findManyArgs)\n\n if (pagination !== false && (orderedIDs ? orderedIDs?.length <= limit : true)) {\n totalDocs = await adapter.countDistinct({\n db,\n joins,\n tableName,\n where,\n })\n\n totalPages = typeof limit === 'number' && limit !== 0 ? Math.ceil(totalDocs / limit) : 1\n hasPrevPage = page > 1\n hasNextPage = totalPages > page\n pagingCounter = (page - 1) * limit + 1\n }\n\n const rawDocs = await findPromise\n // sort rawDocs from selectQuery\n if (Object.keys(orderedIDMap).length > 0) {\n rawDocs.sort((a, b) => orderedIDMap[a.id] - orderedIDMap[b.id])\n }\n\n if (pagination === false || !totalDocs) {\n totalDocs = rawDocs.length\n totalPages = 1\n pagingCounter = 1\n hasPrevPage = false\n hasNextPage = false\n }\n\n const docs = rawDocs.map((data: TypeWithID) => {\n return transform({\n adapter,\n config: adapter.payload.config,\n data,\n fields,\n joinQuery,\n tableName,\n })\n })\n\n return {\n docs,\n hasNextPage,\n hasPrevPage,\n limit: limitArg,\n nextPage: hasNextPage ? page + 1 : null,\n page,\n pagingCounter,\n prevPage: hasPrevPage ? page - 1 : null,\n totalDocs,\n totalPages,\n }\n}\n"],"names":["inArray","buildQuery","selectDistinct","transform","getNameFromDrizzleTable","getTransaction","buildFindManyArgs","findMany","find","adapter","collectionSlug","draftsEnabled","fields","joins","joinQuery","limit","limitArg","locale","page","pagination","req","select","sort","tableName","versions","where","whereArg","totalDocs","totalPages","hasPrevPage","hasNextPage","pagingCounter","offset","undefined","orderBy","selectFields","orderedIDMap","orderedIDs","findManyArgs","depth","key","column","primary","some","col","name","table","db","selectDistinctResult","query","map","order","length","docs","nextPage","prevPage","forEach","id","i","Object","keys","tables","findPromise","countDistinct","Math","ceil","rawDocs","a","b","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AAM,SAAS,CAAA;AASxE,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"findGlobalVersions.d.ts","sourceRoot":"","sources":["../src/findGlobalVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAyB,MAAM,SAAS,CAAA;AASxE,eAAO,MAAM,kBAAkB,EAAE,kBA4BhC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildVersionGlobalFields } from 'payload';
|
|
2
2
|
import toSnakeCase from 'to-snake-case';
|
|
3
3
|
import { findMany } from './find/findMany.js';
|
|
4
|
-
export const findGlobalVersions = async function findGlobalVersions({ global, limit, locale, page, pagination, req, select,
|
|
4
|
+
export const findGlobalVersions = async function findGlobalVersions({ global, limit, locale, page, pagination, req, select, sort: sortArg, where }) {
|
|
5
5
|
const globalConfig = this.payload.globals.config.find(({ slug })=>slug === global);
|
|
6
6
|
const sort = sortArg !== undefined && sortArg !== null ? sortArg : '-createdAt';
|
|
7
7
|
const tableName = this.tableNameMap.get(`_${toSnakeCase(globalConfig.slug)}${this.versionsSuffix}`);
|
|
@@ -15,7 +15,6 @@ export const findGlobalVersions = async function findGlobalVersions({ global, li
|
|
|
15
15
|
pagination,
|
|
16
16
|
req,
|
|
17
17
|
select,
|
|
18
|
-
skip,
|
|
19
18
|
sort,
|
|
20
19
|
tableName,
|
|
21
20
|
where
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/findGlobalVersions.ts"],"sourcesContent":["import type { FindGlobalVersions, SanitizedGlobalConfig } from 'payload'\n\nimport { buildVersionGlobalFields } from 'payload'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { findMany } from './find/findMany.js'\n\nexport const findGlobalVersions: FindGlobalVersions = async function findGlobalVersions(\n this: DrizzleAdapter,\n { global, limit, locale, page, pagination, req, select,
|
|
1
|
+
{"version":3,"sources":["../src/findGlobalVersions.ts"],"sourcesContent":["import type { FindGlobalVersions, SanitizedGlobalConfig } from 'payload'\n\nimport { buildVersionGlobalFields } from 'payload'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { findMany } from './find/findMany.js'\n\nexport const findGlobalVersions: FindGlobalVersions = async function findGlobalVersions(\n this: DrizzleAdapter,\n { global, limit, locale, page, pagination, req, select, sort: sortArg, where },\n) {\n const globalConfig: SanitizedGlobalConfig = this.payload.globals.config.find(\n ({ slug }) => slug === global,\n )\n const sort = sortArg !== undefined && sortArg !== null ? sortArg : '-createdAt'\n\n const tableName = this.tableNameMap.get(\n `_${toSnakeCase(globalConfig.slug)}${this.versionsSuffix}`,\n )\n\n const fields = buildVersionGlobalFields(this.payload.config, globalConfig, true)\n\n return findMany({\n adapter: this,\n fields,\n limit,\n locale,\n page,\n pagination,\n req,\n select,\n sort,\n tableName,\n where,\n })\n}\n"],"names":["buildVersionGlobalFields","toSnakeCase","findMany","findGlobalVersions","global","limit","locale","page","pagination","req","select","sort","sortArg","where","globalConfig","payload","globals","config","find","slug","undefined","tableName","tableNameMap","get","versionsSuffix","fields","adapter"],"mappings":"AAEA,SAASA,wBAAwB,QAAQ,UAAS;AAClD,OAAOC,iBAAiB,gBAAe;AAIvC,SAASC,QAAQ,QAAQ,qBAAoB;AAE7C,OAAO,MAAMC,qBAAyC,eAAeA,mBAEnE,EAAEC,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAEC,GAAG,EAAEC,MAAM,EAAEC,MAAMC,OAAO,EAAEC,KAAK,EAAE;IAE9E,MAAMC,eAAsC,IAAI,CAACC,OAAO,CAACC,OAAO,CAACC,MAAM,CAACC,IAAI,CAC1E,CAAC,EAAEC,IAAI,EAAE,GAAKA,SAASf;IAEzB,MAAMO,OAAOC,YAAYQ,aAAaR,YAAY,OAAOA,UAAU;IAEnE,MAAMS,YAAY,IAAI,CAACC,YAAY,CAACC,GAAG,CACrC,CAAC,CAAC,EAAEtB,YAAYa,aAAaK,IAAI,IAAI,IAAI,CAACK,cAAc,EAAE;IAG5D,MAAMC,SAASzB,yBAAyB,IAAI,CAACe,OAAO,CAACE,MAAM,EAAEH,cAAc;IAE3E,OAAOZ,SAAS;QACdwB,SAAS,IAAI;QACbD;QACApB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAU;QACAR;IACF;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../src/findVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAA6B,MAAM,SAAS,CAAA;AAStE,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"findVersions.d.ts","sourceRoot":"","sources":["../src/findVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAA6B,MAAM,SAAS,CAAA;AAStE,eAAO,MAAM,YAAY,EAAE,YA2B1B,CAAA"}
|
package/dist/findVersions.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildVersionCollectionFields } from 'payload';
|
|
2
2
|
import toSnakeCase from 'to-snake-case';
|
|
3
3
|
import { findMany } from './find/findMany.js';
|
|
4
|
-
export const findVersions = async function findVersions({ collection, limit, locale, page, pagination, req, select,
|
|
4
|
+
export const findVersions = async function findVersions({ collection, limit, locale, page, pagination, req, select, sort: sortArg, where }) {
|
|
5
5
|
const collectionConfig = this.payload.collections[collection].config;
|
|
6
6
|
const sort = sortArg !== undefined && sortArg !== null ? sortArg : collectionConfig.defaultSort;
|
|
7
7
|
const tableName = this.tableNameMap.get(`_${toSnakeCase(collectionConfig.slug)}${this.versionsSuffix}`);
|
|
@@ -16,7 +16,6 @@ export const findVersions = async function findVersions({ collection, limit, loc
|
|
|
16
16
|
pagination,
|
|
17
17
|
req,
|
|
18
18
|
select,
|
|
19
|
-
skip,
|
|
20
19
|
sort,
|
|
21
20
|
tableName,
|
|
22
21
|
where
|
package/dist/findVersions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/findVersions.ts"],"sourcesContent":["import type { FindVersions, SanitizedCollectionConfig } from 'payload'\n\nimport { buildVersionCollectionFields } from 'payload'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { findMany } from './find/findMany.js'\n\nexport const findVersions: FindVersions = async function findVersions(\n this: DrizzleAdapter,\n { collection, limit, locale, page, pagination, req, select,
|
|
1
|
+
{"version":3,"sources":["../src/findVersions.ts"],"sourcesContent":["import type { FindVersions, SanitizedCollectionConfig } from 'payload'\n\nimport { buildVersionCollectionFields } from 'payload'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { findMany } from './find/findMany.js'\n\nexport const findVersions: FindVersions = async function findVersions(\n this: DrizzleAdapter,\n { collection, limit, locale, page, pagination, req, select, sort: sortArg, where },\n) {\n const collectionConfig: SanitizedCollectionConfig = this.payload.collections[collection].config\n const sort = sortArg !== undefined && sortArg !== null ? sortArg : collectionConfig.defaultSort\n\n const tableName = this.tableNameMap.get(\n `_${toSnakeCase(collectionConfig.slug)}${this.versionsSuffix}`,\n )\n\n const fields = buildVersionCollectionFields(this.payload.config, collectionConfig, true)\n\n return findMany({\n adapter: this,\n fields,\n joins: false,\n limit,\n locale,\n page,\n pagination,\n req,\n select,\n sort,\n tableName,\n where,\n })\n}\n"],"names":["buildVersionCollectionFields","toSnakeCase","findMany","findVersions","collection","limit","locale","page","pagination","req","select","sort","sortArg","where","collectionConfig","payload","collections","config","undefined","defaultSort","tableName","tableNameMap","get","slug","versionsSuffix","fields","adapter","joins"],"mappings":"AAEA,SAASA,4BAA4B,QAAQ,UAAS;AACtD,OAAOC,iBAAiB,gBAAe;AAIvC,SAASC,QAAQ,QAAQ,qBAAoB;AAE7C,OAAO,MAAMC,eAA6B,eAAeA,aAEvD,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAEC,GAAG,EAAEC,MAAM,EAAEC,MAAMC,OAAO,EAAEC,KAAK,EAAE;IAElF,MAAMC,mBAA8C,IAAI,CAACC,OAAO,CAACC,WAAW,CAACZ,WAAW,CAACa,MAAM;IAC/F,MAAMN,OAAOC,YAAYM,aAAaN,YAAY,OAAOA,UAAUE,iBAAiBK,WAAW;IAE/F,MAAMC,YAAY,IAAI,CAACC,YAAY,CAACC,GAAG,CACrC,CAAC,CAAC,EAAErB,YAAYa,iBAAiBS,IAAI,IAAI,IAAI,CAACC,cAAc,EAAE;IAGhE,MAAMC,SAASzB,6BAA6B,IAAI,CAACe,OAAO,CAACE,MAAM,EAAEH,kBAAkB;IAEnF,OAAOZ,SAAS;QACdwB,SAAS,IAAI;QACbD;QACAE,OAAO;QACPtB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAS;QACAP;IACF;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildDrizzleRelations.d.ts","sourceRoot":"","sources":["../../src/schema/buildDrizzleRelations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,qBAAqB,gBAAiB;IAAE,OAAO,EAAE,cAAc,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"buildDrizzleRelations.d.ts","sourceRoot":"","sources":["../../src/schema/buildDrizzleRelations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,qBAAqB,gBAAiB;IAAE,OAAO,EAAE,cAAc,CAAA;CAAE,SAmC7E,CAAA"}
|
|
@@ -13,9 +13,11 @@ export const buildDrizzleRelations = ({ adapter })=>{
|
|
|
13
13
|
relationName: relation.relationName
|
|
14
14
|
});
|
|
15
15
|
} else {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
if (adapter.tables[relation.to]) {
|
|
17
|
+
result[key] = many(adapter.tables[relation.to], {
|
|
18
|
+
relationName: relation.relationName
|
|
19
|
+
});
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schema/buildDrizzleRelations.ts"],"sourcesContent":["import type { Relation } from 'drizzle-orm'\n\nimport { relations } from 'drizzle-orm'\n\nimport type { DrizzleAdapter } from '../types.js'\n\nexport const buildDrizzleRelations = ({ adapter }: { adapter: DrizzleAdapter }) => {\n for (const tableName in adapter.rawRelations) {\n const rawRelations = adapter.rawRelations[tableName]\n\n adapter.relations[`relations_${tableName}`] = relations(\n adapter.tables[tableName],\n ({ many, one }) => {\n const result: Record<string, Relation<string>> = {}\n\n for (const key in rawRelations) {\n const relation = rawRelations[key]\n\n if (relation.type === 'one') {\n result[key] = one(adapter.tables[relation.to], {\n fields: relation.fields.map(\n (field) => adapter.tables[field.table][field.name],\n ) as any,\n references: relation.references.map(\n (reference) => adapter.tables[relation.to][reference],\n ),\n relationName: relation.relationName,\n })\n } else {\n result[key] = many(adapter.tables[relation.to], {\n
|
|
1
|
+
{"version":3,"sources":["../../src/schema/buildDrizzleRelations.ts"],"sourcesContent":["import type { Relation } from 'drizzle-orm'\n\nimport { relations } from 'drizzle-orm'\n\nimport type { DrizzleAdapter } from '../types.js'\n\nexport const buildDrizzleRelations = ({ adapter }: { adapter: DrizzleAdapter }) => {\n for (const tableName in adapter.rawRelations) {\n const rawRelations = adapter.rawRelations[tableName]\n\n adapter.relations[`relations_${tableName}`] = relations(\n adapter.tables[tableName],\n ({ many, one }) => {\n const result: Record<string, Relation<string>> = {}\n\n for (const key in rawRelations) {\n const relation = rawRelations[key]\n\n if (relation.type === 'one') {\n result[key] = one(adapter.tables[relation.to], {\n fields: relation.fields.map(\n (field) => adapter.tables[field.table][field.name],\n ) as any,\n references: relation.references.map(\n (reference) => adapter.tables[relation.to][reference],\n ),\n relationName: relation.relationName,\n })\n } else {\n if (adapter.tables[relation.to]) {\n result[key] = many(adapter.tables[relation.to], {\n relationName: relation.relationName,\n })\n }\n }\n }\n\n return result\n },\n )\n }\n}\n"],"names":["relations","buildDrizzleRelations","adapter","tableName","rawRelations","tables","many","one","result","key","relation","type","to","fields","map","field","table","name","references","reference","relationName"],"mappings":"AAEA,SAASA,SAAS,QAAQ,cAAa;AAIvC,OAAO,MAAMC,wBAAwB,CAAC,EAAEC,OAAO,EAA+B;IAC5E,IAAK,MAAMC,aAAaD,QAAQE,YAAY,CAAE;QAC5C,MAAMA,eAAeF,QAAQE,YAAY,CAACD,UAAU;QAEpDD,QAAQF,SAAS,CAAC,CAAC,UAAU,EAAEG,WAAW,CAAC,GAAGH,UAC5CE,QAAQG,MAAM,CAACF,UAAU,EACzB,CAAC,EAAEG,IAAI,EAAEC,GAAG,EAAE;YACZ,MAAMC,SAA2C,CAAC;YAElD,IAAK,MAAMC,OAAOL,aAAc;gBAC9B,MAAMM,WAAWN,YAAY,CAACK,IAAI;gBAElC,IAAIC,SAASC,IAAI,KAAK,OAAO;oBAC3BH,MAAM,CAACC,IAAI,GAAGF,IAAIL,QAAQG,MAAM,CAACK,SAASE,EAAE,CAAC,EAAE;wBAC7CC,QAAQH,SAASG,MAAM,CAACC,GAAG,CACzB,CAACC,QAAUb,QAAQG,MAAM,CAACU,MAAMC,KAAK,CAAC,CAACD,MAAME,IAAI,CAAC;wBAEpDC,YAAYR,SAASQ,UAAU,CAACJ,GAAG,CACjC,CAACK,YAAcjB,QAAQG,MAAM,CAACK,SAASE,EAAE,CAAC,CAACO,UAAU;wBAEvDC,cAAcV,SAASU,YAAY;oBACrC;gBACF,OAAO;oBACL,IAAIlB,QAAQG,MAAM,CAACK,SAASE,EAAE,CAAC,EAAE;wBAC/BJ,MAAM,CAACC,IAAI,GAAGH,KAAKJ,QAAQG,MAAM,CAACK,SAASE,EAAE,CAAC,EAAE;4BAC9CQ,cAAcV,SAASU,YAAY;wBACrC;oBACF;gBACF;YACF;YAEA,OAAOZ;QACT;IAEJ;AACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildRawSchema.d.ts","sourceRoot":"","sources":["../../src/schema/buildRawSchema.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAY,WAAW,EAAE,MAAM,aAAa,CAAA;AAMxE;;GAEG;AACH,eAAO,MAAM,cAAc,8BAGxB;IACD,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;CACzB,
|
|
1
|
+
{"version":3,"file":"buildRawSchema.d.ts","sourceRoot":"","sources":["../../src/schema/buildRawSchema.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAY,WAAW,EAAE,MAAM,aAAa,CAAA;AAMxE;;GAEG;AACH,eAAO,MAAM,cAAc,8BAGxB;IACD,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;CACzB,SAoHA,CAAA"}
|
|
@@ -29,7 +29,7 @@ import { buildTable } from './build.js';
|
|
|
29
29
|
const baseIndexes = {};
|
|
30
30
|
if (collection.upload.filenameCompoundIndex) {
|
|
31
31
|
const indexName = buildIndexName({
|
|
32
|
-
name: `${tableName}
|
|
32
|
+
name: `${tableName}_filename_compound`,
|
|
33
33
|
adapter
|
|
34
34
|
});
|
|
35
35
|
baseIndexes.filename_compound_index = {
|
|
@@ -40,6 +40,7 @@ import { buildTable } from './build.js';
|
|
|
40
40
|
}
|
|
41
41
|
buildTable({
|
|
42
42
|
adapter,
|
|
43
|
+
baseIndexes,
|
|
43
44
|
blocksTableNameMap: {},
|
|
44
45
|
compoundIndexes: collection.sanitizedIndexes,
|
|
45
46
|
disableNotNull: !!collection?.versions?.drafts,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schema/buildRawSchema.ts"],"sourcesContent":["import {\n buildVersionCollectionFields,\n buildVersionCompoundIndexes,\n buildVersionGlobalFields,\n} from 'payload'\nimport { hasDraftsEnabled } from 'payload/shared'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter, RawIndex, SetColumnID } from '../types.js'\n\nimport { createTableName } from '../createTableName.js'\nimport { buildIndexName } from '../utilities/buildIndexName.js'\nimport { buildTable } from './build.js'\n\n/**\n * Builds abstract Payload SQL schema\n */\nexport const buildRawSchema = ({\n adapter,\n setColumnID,\n}: {\n adapter: DrizzleAdapter\n setColumnID: SetColumnID\n}) => {\n adapter.indexes = new Set()\n adapter.foreignKeys = new Set()\n\n adapter.payload.config.collections.forEach((collection) => {\n createTableName({\n adapter,\n config: collection,\n })\n\n if (collection.versions) {\n createTableName({\n adapter,\n config: collection,\n versions: true,\n versionsCustomName: true,\n })\n }\n })\n\n adapter.payload.config.collections.forEach((collection) => {\n const tableName = adapter.tableNameMap.get(toSnakeCase(collection.slug))\n const config = adapter.payload.config\n\n const baseIndexes: Record<string, RawIndex> = {}\n\n if (collection.upload.filenameCompoundIndex) {\n const indexName = buildIndexName({ name: `${tableName}
|
|
1
|
+
{"version":3,"sources":["../../src/schema/buildRawSchema.ts"],"sourcesContent":["import {\n buildVersionCollectionFields,\n buildVersionCompoundIndexes,\n buildVersionGlobalFields,\n} from 'payload'\nimport { hasDraftsEnabled } from 'payload/shared'\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter, RawIndex, SetColumnID } from '../types.js'\n\nimport { createTableName } from '../createTableName.js'\nimport { buildIndexName } from '../utilities/buildIndexName.js'\nimport { buildTable } from './build.js'\n\n/**\n * Builds abstract Payload SQL schema\n */\nexport const buildRawSchema = ({\n adapter,\n setColumnID,\n}: {\n adapter: DrizzleAdapter\n setColumnID: SetColumnID\n}) => {\n adapter.indexes = new Set()\n adapter.foreignKeys = new Set()\n\n adapter.payload.config.collections.forEach((collection) => {\n createTableName({\n adapter,\n config: collection,\n })\n\n if (collection.versions) {\n createTableName({\n adapter,\n config: collection,\n versions: true,\n versionsCustomName: true,\n })\n }\n })\n\n adapter.payload.config.collections.forEach((collection) => {\n const tableName = adapter.tableNameMap.get(toSnakeCase(collection.slug))\n const config = adapter.payload.config\n\n const baseIndexes: Record<string, RawIndex> = {}\n\n if (collection.upload.filenameCompoundIndex) {\n const indexName = buildIndexName({ name: `${tableName}_filename_compound`, adapter })\n\n baseIndexes.filename_compound_index = {\n name: indexName,\n on: collection.upload.filenameCompoundIndex.map((f) => f),\n unique: true,\n }\n }\n\n buildTable({\n adapter,\n baseIndexes,\n blocksTableNameMap: {},\n compoundIndexes: collection.sanitizedIndexes,\n disableNotNull: !!collection?.versions?.drafts,\n disableUnique: false,\n fields: collection.flattenedFields,\n parentIsLocalized: false,\n setColumnID,\n tableName,\n timestamps: collection.timestamps,\n versions: false,\n })\n\n if (collection.versions) {\n const versionsTableName = adapter.tableNameMap.get(\n `_${toSnakeCase(collection.slug)}${adapter.versionsSuffix}`,\n )\n const versionFields = buildVersionCollectionFields(config, collection, true)\n\n buildTable({\n adapter,\n blocksTableNameMap: {},\n compoundIndexes: buildVersionCompoundIndexes({ indexes: collection.sanitizedIndexes }),\n disableNotNull: !!collection.versions?.drafts,\n disableUnique: true,\n fields: versionFields,\n parentIsLocalized: false,\n setColumnID,\n tableName: versionsTableName,\n timestamps: true,\n versions: true,\n })\n }\n })\n\n adapter.payload.config.globals.forEach((global) => {\n const tableName = createTableName({\n adapter,\n config: global,\n })\n\n buildTable({\n adapter,\n blocksTableNameMap: {},\n disableNotNull: hasDraftsEnabled(global),\n disableUnique: false,\n fields: global.flattenedFields,\n parentIsLocalized: false,\n setColumnID,\n tableName,\n timestamps: false,\n versions: false,\n })\n\n if (global.versions) {\n const versionsTableName = createTableName({\n adapter,\n config: global,\n versions: true,\n versionsCustomName: true,\n })\n const config = adapter.payload.config\n const versionFields = buildVersionGlobalFields(config, global, true)\n\n buildTable({\n adapter,\n blocksTableNameMap: {},\n disableNotNull: !!global.versions?.drafts,\n disableUnique: true,\n fields: versionFields,\n parentIsLocalized: false,\n setColumnID,\n tableName: versionsTableName,\n timestamps: true,\n versions: true,\n })\n }\n })\n}\n"],"names":["buildVersionCollectionFields","buildVersionCompoundIndexes","buildVersionGlobalFields","hasDraftsEnabled","toSnakeCase","createTableName","buildIndexName","buildTable","buildRawSchema","adapter","setColumnID","indexes","Set","foreignKeys","payload","config","collections","forEach","collection","versions","versionsCustomName","tableName","tableNameMap","get","slug","baseIndexes","upload","filenameCompoundIndex","indexName","name","filename_compound_index","on","map","f","unique","blocksTableNameMap","compoundIndexes","sanitizedIndexes","disableNotNull","drafts","disableUnique","fields","flattenedFields","parentIsLocalized","timestamps","versionsTableName","versionsSuffix","versionFields","globals","global"],"mappings":"AAAA,SACEA,4BAA4B,EAC5BC,2BAA2B,EAC3BC,wBAAwB,QACnB,UAAS;AAChB,SAASC,gBAAgB,QAAQ,iBAAgB;AACjD,OAAOC,iBAAiB,gBAAe;AAIvC,SAASC,eAAe,QAAQ,wBAAuB;AACvD,SAASC,cAAc,QAAQ,iCAAgC;AAC/D,SAASC,UAAU,QAAQ,aAAY;AAEvC;;CAEC,GACD,OAAO,MAAMC,iBAAiB,CAAC,EAC7BC,OAAO,EACPC,WAAW,EAIZ;IACCD,QAAQE,OAAO,GAAG,IAAIC;IACtBH,QAAQI,WAAW,GAAG,IAAID;IAE1BH,QAAQK,OAAO,CAACC,MAAM,CAACC,WAAW,CAACC,OAAO,CAAC,CAACC;QAC1Cb,gBAAgB;YACdI;YACAM,QAAQG;QACV;QAEA,IAAIA,WAAWC,QAAQ,EAAE;YACvBd,gBAAgB;gBACdI;gBACAM,QAAQG;gBACRC,UAAU;gBACVC,oBAAoB;YACtB;QACF;IACF;IAEAX,QAAQK,OAAO,CAACC,MAAM,CAACC,WAAW,CAACC,OAAO,CAAC,CAACC;QAC1C,MAAMG,YAAYZ,QAAQa,YAAY,CAACC,GAAG,CAACnB,YAAYc,WAAWM,IAAI;QACtE,MAAMT,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A0B,oBAAoB,CAAC;YACrBG,gBAAgBnC,iBAAiB8C;YACjCT,eAAe;YACfC,QAAQQ,OAAOP,eAAe;YAC9BC,mBAAmB;YACnBjC;YACAW;YACAuB,YAAY;YACZzB,UAAU;QACZ;QAEA,IAAI8B,OAAO9B,QAAQ,EAAE;YACnB,MAAM0B,oBAAoBxC,gBAAgB;gBACxCI;gBACAM,QAAQkC;gBACR9B,UAAU;gBACVC,oBAAoB;YACtB;YACA,MAAML,SAASN,QAAQK,OAAO,CAACC,MAAM;YACrC,MAAMgC,gBAAgB7C,yBAAyBa,QAAQkC,QAAQ;YAE/D1C,WAAW;gBACTE;gBACA0B,oBAAoB,CAAC;gBACrBG,gBAAgB,CAAC,CAACW,OAAO9B,QAAQ,EAAEoB;gBACnCC,eAAe;gBACfC,QAAQM;gBACRJ,mBAAmB;gBACnBjC;gBACAW,WAAWwB;gBACXD,YAAY;gBACZzB,UAAU;YACZ;QACF;IACF;AACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/drizzle",
|
|
3
|
-
"version": "3.71.0
|
|
3
|
+
"version": "3.71.0",
|
|
4
4
|
"description": "A library of shared functions used by different payload database adapters",
|
|
5
5
|
"homepage": "https://payloadcms.com",
|
|
6
6
|
"repository": {
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"@types/pg": "8.10.2",
|
|
61
61
|
"@types/to-snake-case": "1.0.0",
|
|
62
62
|
"@payloadcms/eslint-config": "3.28.0",
|
|
63
|
-
"payload": "3.71.0
|
|
63
|
+
"payload": "3.71.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"payload": "3.71.0
|
|
66
|
+
"payload": "3.71.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "pnpm build:swc && pnpm build:types",
|