(result: ResultSet)
| 37 | }; |
| 38 | |
| 39 | const asRows = <T>(result: ResultSet): readonly T[] => |
| 40 | // oxlint-disable-next-line executor/no-double-cast -- boundary: SQLite result columns are the schema contract for T; libSQL rows are narrowed once here |
| 41 | result.rows as unknown as readonly T[]; |
| 42 | |
| 43 | export const executeSql = async (client: Client, sql: string, args?: InArgs): Promise<ResultSet> => |
| 44 | client.execute(args ? { sql, args } : sql); |