tursodatabase / libsql-client-ts

TypeScript/JavaScript client API for libSQL

Home Page:https://docs.turso.tech/sdk/ts/quickstart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Question: in memory in browser.

PorcoRosso85 opened this issue · comments

Hi.
I appreciate that libSQL is now faithfully reproducing sqlite's API.
https://www.sqlite.org/inmemorydb.html

Requirement is to query to in memory database on browser using sql.

I am aware that the in-memory function asks for a url, and that url points to a local or remote physical database.
From reading the documentation, I do not believe that there is currently a feature to create an in-memory table in the browser, is this understanding correct?

Is there already a roadmap drawn up for this feature to be added in the future?

Thank you.

I will update my perception and also update my question.

In light of the fact that libSQL can perform queries against url locations,
I am now aware that libSQL already has the ability to generate a database in memory from query results, regardless of the client platform to query.

Correct?
If correct, how to query sql from browser to remote url?

import { createClient } from "@libsql/client/web";

@PorcoRosso85 I just merged @libsql/client-wasm package, which may allow you to do this. I didn't test it with a browser yet, though.

Thanks for your info.
I'll try.

@PorcoRosso85 I have tested this in the browser and works fine.