sqlite-wasm icon indicating copy to clipboard operation
sqlite-wasm copied to clipboard

Node.js Persistence

Open jlarmstrongiv opened this issue 10 months ago • 3 comments

Continuing discussion from https://github.com/sqlite/sqlite-wasm/pull/48

Proposed solutions:

jlarmstrongiv avatar Feb 27 '25 16:02 jlarmstrongiv

Hi, about this warning:

Node.js is currently only supported for in-memory databases without persistence.

I'd like clarification. Does this mean that I can't store data into the private FS provided by OPFS? From the proposed solution that seems to be the case.

An additional question: Are there types for the Promiser api? A quick glance at index.d.ts says no as there isn't a Promiser type.

AlphabetsAlphabets avatar Jul 10 '25 11:07 AlphabetsAlphabets

I'd like clarification. Does this mean that I can't store data into the private FS provided by OPFS? From the proposed solution that seems to be the case.

Correct, in Node.js, there's no OPFS. There are other storage mechanisms like regular files, but currently this version of SQLite Wasm can't make use of them.

An additional question: Are there types for the Promiser api? A quick glance at index.d.ts says no as there isn't a Promiser type.

This is #53.

tomayac avatar Jul 10 '25 12:07 tomayac

I'd like clarification. Does this mean that I can't store data into the private FS provided by OPFS? From the proposed solution that seems to be the case.

Correct, in Node.js, there's no OPFS. There are other storage mechanisms like regular files, but currently this version of SQLite Wasm can't make use of them.

An additional question: Are there types for the Promiser api? A quick glance at index.d.ts says no as there isn't a Promiser type.

This is #53.

Thank you. For my second question the answer is no then, thanks.

AlphabetsAlphabets avatar Jul 11 '25 00:07 AlphabetsAlphabets