diff --git a/src/runtime/adapters/libsql.ts b/src/runtime/adapters/libsql.ts index 6c0be2885..43def4f5b 100644 --- a/src/runtime/adapters/libsql.ts +++ b/src/runtime/adapters/libsql.ts @@ -12,13 +12,15 @@ export default createDatabaseAdapter<{ url: string, authToken: string }>((opts) return { async all(sql: string, params?: Array): Promise { + const now = Date.now() const res = await client.execute({ sql, args: params || [] }) - + console.log(`[all] ${res.rows.length} rows in ${Date.now() - now}ms`) return res.rows as T[] }, async first(sql: string, params?: Array) { + const now = Date.now() const res = await client.execute({ sql, args: params || [] }) - + console.log(`[first] ${JSON.stringify(res.rows[0])} in ${Date.now() - now}ms`) return res.rows[0] as T }, async exec(sql: string): Promise {