UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

8 lines (7 loc) 262 B
//#region src/services/import/key-exists.ts async function keyExists(trx, collection, pkField, value) { const result = await trx.select(pkField).from(collection).where({ [pkField]: value }).first(); return Boolean(result); } //#endregion export { keyExists };