export class Model { static table = '' async update(updater: (record: this) => void | Promise): Promise { await updater(this) return this } async destroyPermanently(): Promise { return } } export class Database { constructor(_config: { adapter: unknown; modelClasses: Array unknown> }) {} async write(action: () => Promise): Promise { return action() } get(_tableName: string): any { return { query: (..._queryParts: unknown[]) => ({ fetch: async () => [] as T[], extend: () => ({ fetch: async () => [] as T[], observe: () => ({ subscribe: () => undefined }), }), observe: () => ({ subscribe: () => undefined }), }), create: async (_builder: (record: T) => void | Promise) => ({} as T), } } } export const Q: any = { where: () => undefined, take: () => undefined, skip: () => undefined, sortBy: () => undefined, oneOf: () => undefined, like: () => undefined, gte: () => undefined, lte: () => undefined, sanitizeLikeString: (value: string) => value, desc: undefined, } export function appSchema(input: unknown): any { return input } export function tableSchema(input: unknown): any { return input } export function field(_name: string): any { return () => undefined } export function date(_name: string): any { return () => undefined } export default class SQLiteAdapter { constructor(_config: { schema: unknown; dbName: string; jsi?: boolean; onSetUpError?: (err: unknown) => void }) {} }