supastash
Version:
Offline-first sync engine for Supabase in React Native using SQLite
9 lines • 636 B
TypeScript
import { CrudMethods, PayloadListResult, PayloadResult, SupastashQuery, SyncMode } from "../../../types/query.types";
/**
* Performs upsert-like logic on local DB:
* - If a row with the same ID exists, it is updated.
* - Otherwise, it is inserted.
* Returns all the rows that were upserted.
*/
export declare function upsertData<T extends boolean, R, Z>(table: string, payload: R | R[] | null, state: SupastashQuery<CrudMethods, T, R>, syncMode?: SyncMode, isSingle?: T, onConflictKeys?: string[], preserveTimestamp?: boolean): Promise<T extends true ? PayloadResult<Z> : PayloadListResult<Z>>;
//# sourceMappingURL=upsert.d.ts.map