kysely-libsql icon indicating copy to clipboard operation
kysely-libsql copied to clipboard

Support embedded replicas

Open vicary opened this issue 1 year ago • 1 comments

Summary

  1. The default import of @libsql/client here resolves to web.js, which contains no support of the file: protocol.
  2. The requirement of manual closing when using the client option is unrealistic for most use cases, without Kysely exposing some kind of "on destroy" callback.

Suggested Solution

  1. Add a new option createClient as a callback

vicary avatar Dec 19 '24 07:12 vicary

Turns out it's unnecessary because

  1. web.js is imported because of Deno, Node is fine.
  2. Although client still makes no sense for manual closing, it should be a PR for @libsql/client instead.
  3. kysely.destroy() should not be optional because users have no reason to call it otherwise.

vicary avatar Dec 19 '24 08:12 vicary