{"version":3,"sources":["../src/upsert.ts"],"sourcesContent":["import type { Upsert } from 'payload'\n\nimport type { DrizzleAdapter } from './types.js'\n\nexport const upsert: Upsert = async function upsert(\n this: DrizzleAdapter,\n { collection, data, joins, locale, req, returning, select, where },\n) {\n return this.updateOne({\n collection,\n data,\n joins,\n locale,\n options: { upsert: true },\n req,\n returning,\n select,\n where,\n })\n}\n"],"names":["upsert","collection","data","joins","locale","req","returning","select","where","updateOne","options"],"mappings":"AAIA,OAAO,MAAMA,SAAiB,eAAeA,OAE3C,EAAEC,UAAU,EAAEC,IAAI,EAAEC,KAAK,EAAEC,MAAM,EAAEC,GAAG,EAAEC,SAAS,EAAEC,MAAM,EAAEC,KAAK,EAAE;IAElE,OAAO,IAAI,CAACC,SAAS,CAAC;QACpBR;QACAC;QACAC;QACAC;QACAM,SAAS;YAAEV,QAAQ;QAAK;QACxBK;QACAC;QACAC;QACAC;IACF;AACF,EAAC"}