margelo / margelo/react-native-nitro-sqlite

RTREE module is not activated by default

Open Beginner friendly
#218 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.