Skip to content

libsqlproxy@0.1.0

Choose a tag to compare

@remorses remorses released this 23 Mar 07:59
· 953 commits to main since this release

Initial release.

  1. Expose SQLite databases via the libSQL remote protocol (Hrana v2) — connect any tool that speaks libSQL (TablePlus, Drizzle Studio, @libsql/client, Prisma) to a local or Cloudflare-hosted SQLite database over HTTP:

    const client = createClient({
      url: 'https://libsql.example.com',
      authToken: 'my-do-id:my-secret',
    })
    await client.execute('SELECT * FROM users')
  2. Cloudflare Durable Object support — expose your DO's embedded SQLite to data explorers like Drizzle Studio and TablePlus. One-liner in the DO, proxy in the Worker:

    export class MyDO extends DurableObject {
      hranaHandler = createLibsqlHandler(durableObjectExecutor(this.ctx.storage))
    }

    Auth: Bearer namespace:secret — namespace identifies the DO, secret is shared.

  3. Node.js adapter — createLibsqlNodeHandler(handler, { auth: { bearer }, maxBodyBytes }) wraps for http.createServer().

  4. Custom SQL driver — implement LibsqlExecutor with executeSql / execRaw. Sync and async both supported.

  5. Full Hrana v2 protocol — execute, batch (ok/error/not/and/or), sequence, describe, store_sql, close_sql, close. Unpredictable batons, 120s stream eviction, 10 MB body limit.