margelo / margelo/react-native-nitro-sqlite
RTREE module is not activated by default
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 565
- Forks
- 53
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 18
Description
Hi,
It seems that the RTREE extension is not activated by default in react-native-nitro-sqlite.
While performing a schema migration with the following SQL command:
ALTER TABLE mytable RENAME TO mynewtablename;
I encountered the following error:
no such module: rtree
By adding manually in node_modules\react-native-nitro-sqlite\android\CMakeLists.txt:
add_definitions(
-DSQLITE_ENABLE_RTREE
)
The issue is solved, but can it be enabled by default ?
This would help ensure compatibility with databases or queries that depend on RTREE features.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with android/CMakeLists.txt and inspect how SQLite compile definitions are configured. Reproduce the ALTER TABLE migration that reports “no such module: rtree,” then verify that enabling RTREE by default allows the Android build and migration to complete without requiring a manual node_modules edit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, react-native, sqlite
- Domain
- build-system, database, mobile
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100