tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL
https://docs.turso.tech/sdk/ts/quickstart
MIT License
226 stars 32 forks source link

In memory databases seems not to be supported. #129

Closed pdenapo closed 10 months ago

pdenapo commented 10 months ago

I'm trying to create a client for a database in memory with the following code:

import { createClient } from '@libsql/client';

const client = createClient({
    url: ':memory:'
});

I get the following code

LibsqlError: URL_INVALID: The URL is not in a valid format

This feature would be useful for instance, when writing tests.

pdenapo commented 10 months ago

Many thanks, this is very useful for me! I'm submitting a pull-request for adding this to the documentation in the README

https://github.com/libsql/libsql-client-ts/pull/136