tndrle / node-sqlite3-wasm

WebAssembly port of SQLite3 for Node.js with file system access
MIT License
55 stars 8 forks source link

Question: Does the SQLite3 needs to be installed on target PC? And what about pragmas? #12

Closed apikee closed 1 year ago

apikee commented 1 year ago

Hello, just to make sure - does the SQLite3 needs to be installed on target PC? As I understand, the goal of this library is to make it unnecessary, hence the WASM module. But just in case, I'm asking. And are all pragmas supported? WAL mode etc?

Thank you

tndrle commented 1 year ago

Hi, there is no need to install SQLite separately on the target system. node-sqlite3-wasm currently compiles the SQLite3 sources with the following options (see Makefile):

SQLITE_OMIT_DEPRECATED
SQLITE_OMIT_LOAD_EXTENSION
SQLITE_OMIT_UTF16
SQLITE_OMIT_GET_TABLE
SQLITE_OMIT_PROGRESS_CALLBACK
SQLITE_OMIT_SHARED_CACHE
SQLITE_OMIT_TCL_VARIABLE
SQLITE_OMIT_DESERIALIZE
SQLITE_DISABLE_LFS
SQLITE_THREADSAFE=2
SQLITE_ENABLE_COLUMN_METADATA
SQLITE_ENABLE_MATH_FUNCTIONS
SQLITE_ENABLE_STAT4
SQLITE_ENABLE_UPDATE_DELETE_LIMIT
SQLITE_DEFAULT_FOREIGN_KEYS=1
SQLITE_DEFAULT_MEMSTATUS=0
SQLITE_DQS=0
SQLITE_TEMP_STORE=3
SQLITE_OS_OTHER=1

This defines the availability of pragmas and other functionality.