import * as SQLite from 'expo-sqlite'; type Casts = Record; interface Clauses { select: string; joins: Array<{ type: 'INNER' | 'LEFT' | 'RIGHT'; table: string; firstKey: string; secondKey: string; }>; where: Array<{ column: string; operator: string; value?: any; }>; orderBy: { column: string; direction: string; } | null; limit: number | null; withRelations: string[]; } type ModelAttributes = Record; interface SQLResult { insertId?: number; rowsAffected: number; rows: { _array: ModelAttributes[]; length: number; item: (index: number) => ModelAttributes; }; } export declare class Model { static db: SQLite.SQLiteDatabase; static tableName: string; static casts: Casts; static withTimestamps: boolean; static createdAtColumn: string; static updatedAtColumn: string; clauses: Clauses; [key: string]: any; constructor(attributes?: ModelAttributes); static get(): Promise; static table(this: new () => T, name: string): T; static select(this: new () => T, fields?: string | string[]): T; static join(this: new () => T, type: 'INNER' | 'LEFT' | 'RIGHT', table: string, firstKey: string, secondKey: string): T; static where(this: new () => T, column: string, operatorOrValue: any, value?: any): T; static orderBy(this: new () => T, column: string, direction?: 'ASC' | 'DESC'): T; static limit(this: new () => T, number: number): T; static with(this: new () => T, relation: string): T; static find(id: number | string): Promise; static insert(data: Record): Promise; static seed(data: Array>): Promise; seed(data: Array>): Promise; static executeSql(sql: string, params?: any[]): Promise; static castAttribute(key: keyof Casts, value: any): any; static prepareAttributeForStorage(key: keyof Casts, value: any): any; table(name: string): this; select(fields?: string | string[]): this; join(type: 'INNER' | 'LEFT' | 'RIGHT', table: string, firstKey: string, secondKey: string): this; where(column: string, operatorOrValue: any, value?: any): this; orderBy(column: string, direction?: 'ASC' | 'DESC'): this; limit(number: number): this; with(relation: string): this; find(id: number | string): Promise; save(): Promise; delete(): Promise; getSql(): { query: string; params: Array; }; get(): Promise; first(): Promise; update(attributes: Partial): Promise; cleanObject(object: T): T; hasOne(relatedModel: T, foreignKey?: string, localKey?: string): Promise; hasMany(relatedModel: T, foreignKey?: string, localKey?: string): Promise; belongsTo(relatedModel: T, foreignKey: string, otherKey?: string): Promise; belongsToMany(this: T, relatedModel: T, joinTableName?: string, // This can be optional if the default naming convention is to be used foreignKey?: string, // This can be optional and inferred from the table names otherKey?: string): Promise; } export {};