libsql-client-ts
libsql-client-ts copied to clipboard
TypeScript/JavaScript client API for libSQL
I disabled the raw error code tests in 846b2d0fc2f80fc9cb87bb1db4158857e8c7f54f for remote databases because we never set the error code for remote database errors: ``` export function mapHranaError(e: unknown): unknown {...
`Bun:` 1.0.1 OS: Ubuntu 22.04.3 LTS When trying to run drizzle-kit push:sqlite, I got this error: ``` LibsqlError: HRANA_WEBSOCKET_ERROR: unable to verify the first certificate at mapHranaError (/home/[email protected]/Desktop/projects/the-beth-stack/node_modules/drizzle-kit/index.cjs:48441:12) at #openStream...
We should default to the HTTP protocol instead.
The following code: ``` import { drizzle } from 'drizzle-orm/libsql'; import { createClient } from '@libsql/client'; const client = createClient({ url: process.env.TURSO_DB_URL as string, authToken: process.env.TURSO_DB_AUTH as string, }); export...
The `execute()` method returns `Row` objects that can be accessed either as an array or an object, which confuses `deepEquals()` in tests, for example.
We switched from better-sqlite3 to libsql, but we should now switch to the libsql promise API to avoid blocking internally.
Pull request #100 optimized the API to share the same connection, but this now breaks interleaved transactions: ``` const tx1 = await libsql.transaction('deferred') await tx1.execute(`SELECT 1`) const tx2 = await...
`createClient` should not block the caller at all, nor throw errors unrelated to the validity of the parameters it receives. An example of a thrown error can be seen in...
Client version 0.3.5-pre.10 The error below contains the relevant information, but it's difficult to understand. Also, the error code isn't populated with something meaningful (empty string). Ideally in this case,...