WiseLibs / better-sqlite3

The fastest and simplest library for SQLite3 in Node.js.
MIT License
5.23k stars 390 forks source link

fix: support SpatiaLite extension #1137

Closed merceyz closed 4 months ago

merceyz commented 5 months ago

According to https://github.com/WiseLibs/better-sqlite3/issues/230#issuecomment-467917417 SQLITE_OMIT_GET_TABLE is set to reduce the binary size, by 4224 bytes in my test, but it causes the SpatiaLite extension to segfault the process.

This PR removes SQLITE_OMIT_GET_TABLE to support SpatiaLite.

Loading mod_spatialite works without this PR but SELECT InitSpatialMetaData() doesn't.

Ref https://github.com/WiseLibs/better-sqlite3/issues/520

mceachen commented 5 months ago

@JoshuaWise when you have a chance, can you check this out please?