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.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
cmake, cpp, react-native, sqlite

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.

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!

Dominant language
C
Stars
565
Forks
53
Avg merge
3d 13h
Merged PRs (30d)
28

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.

More from margelo/react-native-nitro-sqlite

All issues in margelo/react-native-nitro-sqlite

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.