(result: ResultSet)
| 75 | }; |
| 76 | |
| 77 | const asRows = <T>(result: ResultSet): readonly T[] => |
| 78 | // oxlint-disable-next-line executor/no-double-cast -- boundary: SQLite result columns are the schema contract for T; libSQL rows are narrowed once here |
| 79 | result.rows as unknown as readonly T[]; |
| 80 | |
| 81 | export const executeSql = async (client: Client, sql: string, args?: InArgs): Promise<ResultSet> => |
| 82 | client.execute(args ? { sql, args } : sql); |