Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
e996e15
add yalc to gitignore
Sep 1, 2024
86bd024
add nitro-modules deps
Sep 1, 2024
397007c
add nitro.json
Sep 1, 2024
5302e24
implement nitro spec and restructure
Sep 1, 2024
bf79fd9
fix: nitro.json
Sep 1, 2024
2bc63f5
rename nitro spec interface
Sep 1, 2024
66c10da
first (partial) nitrogen specs
Sep 1, 2024
d37f1aa
full nitrogen specs (with string instead of any)
Sep 1, 2024
db3118c
more nitrogen files
Sep 1, 2024
a8c04f6
update nitrogen files
Sep 1, 2024
d7933a7
fix: naming clash
Sep 1, 2024
da4243c
remove generic parameter
Sep 1, 2024
b981870
add nitro-modules dep to example
Sep 1, 2024
301f7ae
chore: update ruby and gems
Sep 1, 2024
61012d4
update example Podfile
Sep 1, 2024
e904cec
fix: XCode 12 error
Sep 1, 2024
28f1a61
use extra SelectQueryResult HybridObject
Sep 1, 2024
053e016
fix: ios build
Sep 1, 2024
7729a54
implement first native hybrid function
Sep 2, 2024
de77eec
upgrade to RN 0.75.2
Sep 2, 2024
6b70ea7
disable typeORM stuff
Sep 2, 2024
06716a6
upgrade JDK version and gradle settings
Sep 2, 2024
d104b11
migrate codebase to RN0.75.2
Sep 2, 2024
0af5d40
remove yarn version dependency
Sep 2, 2024
e9238f4
update pods
Sep 2, 2024
ec78618
fix: TurboModule import
Sep 4, 2024
93588da
add more scripts
Sep 4, 2024
315dab1
load nitrogen in podspec
Sep 4, 2024
fe8200a
add Onload
Sep 4, 2024
ac03163
move specs
Sep 4, 2024
888820a
remove rn @types
Sep 4, 2024
1b229ac
fix lint
Sep 4, 2024
be94a8f
rename podspec
Sep 4, 2024
bf7ba4c
fix: ts
Sep 4, 2024
70cce45
fix: ts
Sep 4, 2024
638fb8e
remove unnecessary JSI files
Sep 5, 2024
71765f8
fix: CPP headers not found
Sep 5, 2024
8c32239
fix: onload and spec initialization
Sep 5, 2024
74a29bd
update specs
Sep 5, 2024
5078cfa
rename delete function
Sep 5, 2024
6a548da
fix: OnLoad and use generated specs
Sep 5, 2024
9a2585c
update generated files
Sep 5, 2024
3d75e25
rename internal delete function to drop to avoid keyword clash
Sep 5, 2024
0548315
update specs
Sep 6, 2024
cc4a75d
fix: specs
Sep 6, 2024
5f732ba
udpate specs
Sep 6, 2024
9ecfa76
implement nitro functions
Sep 6, 2024
84f8246
update specs
Sep 6, 2024
1e8b539
update specs
Sep 6, 2024
92bbe92
fix: wrong type
Sep 6, 2024
9b6fea8
updat ecpp
Sep 6, 2024
95e5e28
update specs
Sep 8, 2024
411c272
update specs
Sep 8, 2024
426eb3c
new implementation
Sep 8, 2024
8e7b407
update Podfile
Sep 8, 2024
855ab34
further implement nitro module
Sep 9, 2024
51d0064
update specs
Sep 9, 2024
bcc95f5
fix: inherit from abstract class
Sep 9, 2024
21c845e
fix: make iOS build
Sep 9, 2024
7a1dedd
fix: deps
Sep 9, 2024
a99f020
update specs
Sep 10, 2024
5e85ba7
update nitrogen files
Sep 10, 2024
fdf55de
rename type in C++
Sep 10, 2024
d37a717
disable tests temporarily
Sep 10, 2024
ff55b4b
update specs
Sep 10, 2024
7fe3b5a
restructure
Sep 10, 2024
3a563d1
update spec
Sep 10, 2024
18c9fa8
fix: ios build
Sep 10, 2024
c3b337a
update specs
Sep 11, 2024
26049df
change ColumnMetadata to TableMetadata
Sep 11, 2024
6eca091
add format-cpp script
Sep 11, 2024
f05b96f
re-structure JS code
Sep 11, 2024
f7d17e6
fix: tests
Sep 11, 2024
a8533d4
update specs
Sep 11, 2024
00fa0af
fix: simplify cpp and add ColumnMetadata hybrid object
Sep 11, 2024
c9152a5
add clang format script
Sep 11, 2024
4435d71
simplify spec
Sep 11, 2024
f4b0340
fix: spec update
Sep 11, 2024
d2d7d07
restructure types
Sep 11, 2024
464d71f
fix: missing return statement
Sep 11, 2024
993bcd5
enable new arch
Sep 11, 2024
2897ba8
fix: tests
Sep 11, 2024
761f7a4
update rn safe area context lib
Sep 11, 2024
4fd4b04
update nitro
Sep 11, 2024
8ed7787
add comment on how to get startup function in cpp
Sep 11, 2024
5ccd99f
add default hybrid object constructors
Sep 11, 2024
b83e43c
fix: HybridObject default constructor
Sep 11, 2024
14dc2d8
fix: import
Sep 11, 2024
b84413d
update nitro
chrispader Sep 13, 2024
307bb7c
add nitro autolinking
chrispader Sep 13, 2024
f05ed1f
re-structure javascript files
chrispader Sep 13, 2024
b51d7c2
fix: cpp
chrispader Sep 13, 2024
da62169
fix: ios
chrispader Sep 13, 2024
c94bae3
fix: bootup
chrispader Sep 13, 2024
76a9253
add clang-format config
chrispader Sep 13, 2024
c02e7d9
cpp format
chrispader Sep 13, 2024
4220e58
restructure cpp code
chrispader Sep 13, 2024
7fb39b2
update specs
chrispader Sep 13, 2024
dbb93f1
update spec
chrispader Sep 13, 2024
b9e48f8
update cpp
chrispader Sep 13, 2024
9041017
fix: cpp
chrispader Sep 13, 2024
78e91d3
improve exception handling
chrispader Sep 14, 2024
b85d6c1
rename
chrispader Sep 14, 2024
e33dfff
rename types
chrispader Sep 14, 2024
73a2e3f
fix: cpp
chrispader Sep 14, 2024
fc9b608
fix: user table type
chrispader Sep 14, 2024
1865c93
finish iOS
chrispader Sep 14, 2024
e48445e
remove console.log
chrispader Sep 15, 2024
9eac220
update bootstrap script
chrispader Sep 15, 2024
668e689
Merge branch 'main' into nitro
chrispader Sep 15, 2024
4cf29d1
fix: pods
chrispader Sep 15, 2024
1537ec9
Merge branch 'main' into nitro
chrispader Sep 15, 2024
e307a56
fix tests and typeORM and restructure js code
chrispader Sep 16, 2024
b955315
fix: tests
chrispader Sep 16, 2024
61dff0a
update specs
chrispader Sep 16, 2024
1f82195
Nitro migration for Android (#59)
chrispader Oct 2, 2024
8ed8af3
feat: add visionOS support (#53)
okwasniewski Sep 20, 2024
0a89a99
Merge branch 'main' into nitro
chrispader Oct 2, 2024
9667c93
fix: import
chrispader Oct 2, 2024
45e5c31
fix: load OnLoad TurboModule only on Android
chrispader Oct 2, 2024
fdc436f
fix: typescript build
chrispader Oct 3, 2024
ad3eeae
simplify npm setup
chrispader Oct 3, 2024
1fa3b52
Merge branch 'main' into nitro
chrispader Oct 4, 2024
dc46984
Remove ignored files
chrispader Oct 4, 2024
d636227
update Podfile.lock
chrispader Oct 4, 2024
5cfe53b
update build.gradle
chrispader Oct 4, 2024
3ceb56e
Merge branch 'main' into nitro
chrispader Oct 4, 2024
03800e1
Rename everything
chrispader Oct 4, 2024
1372e54
Merge branch 'main' into nitro
chrispader Oct 14, 2024
fbc7330
chore: include podspec file
chrispader Oct 14, 2024
d83ce8e
chore: include nitrogen files in package
chrispader Oct 14, 2024
a58e9ac
update nitro
chrispader Oct 14, 2024
2683477
fix: TS errors
chrispader Oct 14, 2024
39558b1
chore: update nitro specs
chrispader Oct 14, 2024
5d95e6b
Merge branch 'main' into nitro
chrispader Oct 14, 2024
47524ab
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 14, 2024
131aedb
fix: turbomodule specs
chrispader Oct 14, 2024
ebbbfa8
fix: turbomodule specs
chrispader Oct 14, 2024
8fa290d
fix: import
chrispader Oct 14, 2024
834c8df
resolve dependency cycle
chrispader Oct 16, 2024
a7fbdaa
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 16, 2024
88a24ee
fix: require cycle
chrispader Oct 16, 2024
3a8cf8c
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 16, 2024
f418710
fix: further resolve dependency cycle
chrispader Oct 16, 2024
517d679
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 16, 2024
11ec70b
Merge branch 'main' into nitro
chrispader Oct 16, 2024
d75bec1
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 16, 2024
796d042
fix: NULL x string comparison crash
chrispader Oct 16, 2024
feba1f1
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 16, 2024
00f7450
fix: improve string comparison
chrispader Oct 16, 2024
9571e51
fix: improve string comparison
chrispader Oct 16, 2024
0d4a535
fix: inline mapSQLiteTypeToColumnType
chrispader Oct 16, 2024
890fdcd
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 16, 2024
e8389fb
fix: null check
chrispader Oct 16, 2024
959f650
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 16, 2024
dfee311
feat: add ios performance mode
chrispader Oct 17, 2024
ef68ce3
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 17, 2024
37b6228
Merge branch 'main' into nitro
chrispader Oct 18, 2024
9e1229c
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 18, 2024
09363d1
prepare packages for Nitro NPM publish
chrispader Oct 18, 2024
3493c20
chore: add @chrispader to FUNDING.yml
chrispader Oct 18, 2024
e030ec1
update pods
chrispader Oct 18, 2024
2f007e4
chore: release 8.2.1-nitro.1
chrispader Oct 18, 2024
46cbac8
update nitro-modules in example
chrispader Oct 25, 2024
8c8f5f6
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 25, 2024
dacf029
chore: update nitrogen
chrispader Oct 25, 2024
0d48277
update specs
chrispader Oct 25, 2024
1be6414
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 25, 2024
c1d8752
chore(deps): add nitro-modules dev dependency
chrispader Oct 25, 2024
679ecf1
chore: add "src/main/cpp" to Cmake include directories
chrispader Oct 25, 2024
935ccf6
Merge branch 'main' into nitro
chrispader Oct 25, 2024
c465b24
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Oct 25, 2024
4204beb
chore: release 8.2.2-nitro.1
chrispader Oct 25, 2024
a93d6a6
chore(deps): fix remove quick sqlite dep
chrispader Nov 5, 2024
863d86f
fix: lint and ts config
chrispader Nov 5, 2024
6f19678
fix: lint and ts errors
chrispader Nov 5, 2024
910063b
fix: lint and ts config
chrispader Nov 5, 2024
99d0e42
fix: lint and ts errors
chrispader Nov 5, 2024
ba9a6e3
chore: fix bootstrap script
chrispader Nov 5, 2024
cef2c9a
chore: fix bootstrap script
chrispader Nov 5, 2024
0bb9784
chore: TS outDir and builder bob config
chrispader Nov 5, 2024
6161d79
Merge branch 'main' into nitro
chrispader Nov 13, 2024
4a13a74
fix: ts and lint
chrispader Nov 13, 2024
e3413c6
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Nov 13, 2024
4b68cea
more renamings
chrispader Nov 13, 2024
765c54b
fix: pods
chrispader Nov 13, 2024
e79fc6d
fix: wrong dependency
chrispader Nov 13, 2024
a2064a9
update bun.lockb
chrispader Nov 13, 2024
a1b14fa
simplify CMakeLists
chrispader Nov 13, 2024
dc72c40
fix: missing )
chrispader Nov 13, 2024
31fee9f
add "doNotStrip" to package build.gradle
chrispader Nov 13, 2024
1776179
Merge branch 'main' into nitro
chrispader Nov 13, 2024
250e90d
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Nov 13, 2024
ebca8b1
Merge branch 'main' into nitro
chrispader Nov 13, 2024
2dd1458
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Nov 13, 2024
8c2789a
rename
chrispader Nov 13, 2024
7afb7f9
fix: nitro.json
chrispader Nov 13, 2024
20570b2
fix: nitrogen autolinking files
chrispader Nov 13, 2024
53616e2
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Nov 13, 2024
de3cd32
fix: podspec
chrispader Nov 13, 2024
1009fdb
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Nov 13, 2024
112703b
update pods
chrispader Nov 13, 2024
96e6af4
fix: Podfile.lock
chrispader Nov 13, 2024
28c6664
Merge branch 'nitro' into rename-to-nitro-sqlite
chrispader Nov 13, 2024
6b31c37
fix: oldarch build
chrispader Nov 13, 2024
0663f85
fix: newarch build
chrispader Nov 13, 2024
d286dbb
Merge branch 'main' into rename-to-nitro-sqlite
chrispader Nov 13, 2024
8b8c47c
fix: remove quick sqlite files
chrispader Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: [mrousavy]
github: [mrousavy, chrispader]
2 changes: 1 addition & 1 deletion .github/workflows/build-android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: example/android/app/build/outputs/apk/release/app-release.apk
asset_name: "QuickSQLiteExample-${{ github.event.release.tag_name }}.apk"
asset_name: "NitroSQLiteExample-${{ github.event.release.tag_name }}.apk"
asset_content_type: application/vnd.android.package-archive

# Gradle cache doesn't like daemons
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ jobs:
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace QuickSQLiteExample.xcworkspace \
-scheme QuickSQLiteExample \
-workspace NitroSQLiteExample.xcworkspace \
-scheme NitroSQLiteExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 16' \
Expand Down Expand Up @@ -114,8 +114,8 @@ jobs:
run: "set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace QuickSQLiteExample.xcworkspace \
-scheme QuickSQLiteExample \
-workspace NitroSQLiteExample.xcworkspace \
-scheme NitroSQLiteExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 16' \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ jobs:
- name: Run ESLint CI in example/
working-directory: example
run: bun lint-ci
- name: Run ESLint CI in react-native-quick-sqlite
- name: Run ESLint CI in react-native-nitro-sqlite
working-directory: package
run: bun lint-ci

- name: Run ESLint with auto-fix in example/
working-directory: example
run: bun lint
- name: Run ESLint with auto-fix in react-native-quick-sqlite
- name: Run ESLint with auto-fix in react-native-nitro-sqlite
working-directory: package
run: bun lint

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Remember to add tests for your change if possible. Run the unit tests by:
bun test
```

To edit the Objective-C files, open `example/ios/SequelExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-quick-sqlite`.
To edit the Objective-C files, open `example/ios/SequelExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-nitro-sqlite`.

To edit the Kotlin files, open `example/android` in Android studio and find the source files at `rnquicksqlite` under `Android`.
To edit the Kotlin files, open `example/android` in Android studio and find the source files at `rnnitrosqlite` under `Android`.

### Commit message convention

Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![screenshot](https://raw.githubusercontent.com/margelo/react-native-quick-sqlite/main/header2.png)
![screenshot](https://raw.githubusercontent.com/margelo/react-native-nitro-sqlite/main/header2.png)

<div align="center">
<pre align="center">
bun add react-native-quick-sqlite
bun add react-native-nitro-sqlite
npx pod-install</pre>
<a align="center" href="https://github.com/mrousavy?tab=followers">
<img src="https://img.shields.io/github/followers/mrousavy?label=Follow%20%40mrousavy&style=social" />
Expand All @@ -14,7 +14,7 @@
</div>
<br />

Quick SQLite embeds the latest version of SQLite and provides a low-level JSI-backed API to execute SQL queries.
Nitro SQLite embeds the latest version of SQLite and provides a low-level JSI-backed API to execute SQL queries.

Performance metrics are intentionally not presented, [anecdotic testimonies](https://dev.to/craftzdog/a-performant-way-to-use-pouchdb7-on-react-native-in-2022-24ej) suggest anywhere between 2x and 5x speed improvement. On small queries you might not notice a difference with the old bridge but as you send large data to JS the speed increase is considerable.

Expand All @@ -25,7 +25,7 @@ TypeORM is officially supported, however, there is currently a parsing issue wit
## API

```typescript
import {open} from 'react-native-quick-sqlite'
import {open} from 'react-native-nitro-sqlite'

const db = open('myDb.sqlite')

Expand Down Expand Up @@ -54,7 +54,7 @@ db = {
The basic query is **synchronous**, it will block rendering on large operations, further below you will find async versions.

```typescript
import { open } from 'react-native-quick-sqlite';
import { open } from 'react-native-nitro-sqlite';

try {
const db = open('myDb.sqlite');
Expand Down Expand Up @@ -83,7 +83,7 @@ Throwing an error inside the callback will ROLLBACK the transaction.
If you want to execute a large set of commands as fast as possible you should use the `executeBatch` method, it wraps all the commands in a transaction and has less overhead.

```typescript
await QuickSQLite.transaction('myDatabase', (tx) => {
await NitroSQLite.transaction('myDatabase', (tx) => {
const { status } = tx.execute(
'UPDATE sometable SET somecolumn = ? where somekey = ?',
[0, 1]
Expand Down Expand Up @@ -117,7 +117,7 @@ const commands = [
[('INSERT INTO TEST (id) VALUES (?)', [[3], [4], [5], [6]])],
];

const res = QuickSQLite.executeSqlBatch('myDatabase', commands);
const res = NitroSQLite.executeSqlBatch('myDatabase', commands);

console.log(`Batch affected ${result.rowsAffected} rows`);
```
Expand All @@ -130,7 +130,7 @@ This can be done by testing the returned data directly, but in some cases may no
SQLite datatypes. When fetching data directly from tables or views linked to table columns, SQLite can identify the table declared types:

```typescript
let { metadata } = QuickSQLite.executeSql(
let { metadata } = NitroSQLite.executeSql(
'myDatabase',
'SELECT int_column_1, bol_column_2 FROM sometable'
);
Expand All @@ -148,7 +148,7 @@ metadata.forEach((column) => {
You might have too much SQL to process and it will cause your application to freeze. There are async versions for some of the operations. This will offload the SQLite processing to a different thread.

```ts
QuickSQLite.executeAsync(
NitroSQLite.executeAsync(
'myDatabase',
'SELECT * FROM "User";',
[]).then(({rows}) => {
Expand All @@ -170,15 +170,15 @@ SQLite has a limit for attached databases: A default of 10, and a global max of
References: [Attach](https://www.sqlite.org/lang_attach.html) - [Detach](https://www.sqlite.org/lang_detach.html)

```ts
QuickSQLite.attach('mainDatabase', 'statistics', 'stats', '../databases');
NitroSQLite.attach('mainDatabase', 'statistics', 'stats', '../databases');

const res = QuickSQLite.executeSql(
const res = NitroSQLite.executeSql(
'mainDatabase',
'SELECT * FROM some_table_from_mainschema a INNER JOIN stats.some_table b on a.id_column = b.id_column'
);

// You can detach databases at any moment
QuickSQLite.detach('mainDatabase', 'stats');
NitroSQLite.detach('mainDatabase', 'stats');
if (!detachResult.status) {
// Database de-attached
}
Expand All @@ -189,7 +189,7 @@ if (!detachResult.status) {
If you have a plain SQL file, you can load it directly, with low memory consumption.

```typescript
const { rowsAffected, commands } = QuickSQLite.loadFile(
const { rowsAffected, commands } = NitroSQLite.loadFile(
'myDatabase',
'/absolute/path/to/file.sql'
);
Expand All @@ -198,7 +198,7 @@ const { rowsAffected, commands } = QuickSQLite.loadFile(
Or use the async version which will load the file in another native thread

```typescript
QuickSQLite.loadFileAsync('myDatabase', '/absolute/path/to/file.sql').then(
NitroSQLite.loadFileAsync('myDatabase', '/absolute/path/to/file.sql').then(
(res) => {
const { rowsAffected, commands } = res;
}
Expand All @@ -210,7 +210,7 @@ QuickSQLite.loadFileAsync('myDatabase', '/absolute/path/to/file.sql').then(
On iOS you can use the embedded SQLite, when running `pod-install` add an environment flag:

```
QUICK_SQLITE_USE_PHONE_VERSION=1 npx pod-install
Nitro_SQLITE_USE_PHONE_VERSION=1 npx pod-install
```

On Android, it is not possible to link (using C++) the embedded SQLite. It is also a bad idea due to vendor changes, old android bugs, etc. Unfortunately, this means this library will add some megabytes to your app size.
Expand Down Expand Up @@ -240,7 +240,7 @@ bun patch-package --exclude 'nothing' typeorm

Now every time you install your node_modules that line will be added.

Next, we need to trick TypeORM to resolve the dependency of `react-native-sqlite-storage` to `react-native-quick-sqlite`, on your `babel.config.js` add the following:
Next, we need to trick TypeORM to resolve the dependency of `react-native-sqlite-storage` to `react-native-nitro-sqlite`, on your `babel.config.js` add the following:

```js
plugins: [
Expand All @@ -250,7 +250,7 @@ plugins: [
'module-resolver',
{
alias: {
"react-native-sqlite-storage": "react-native-quick-sqlite"
"react-native-sqlite-storage": "react-native-nitro-sqlite"
},
},
],
Expand All @@ -266,7 +266,7 @@ bun add babel-plugin-module-resolver
Finally, you will now be able to start the app without any metro/babel errors (you will also need to follow the instructions on how to setup TypeORM), now we can feed the driver into TypeORM:

```ts
import { typeORMDriver } from 'react-native-quick-sqlite'
import { typeORMDriver } from 'react-native-nitro-sqlite'

datasource = new DataSource({
type: 'react-native',
Expand All @@ -280,7 +280,7 @@ datasource = new DataSource({

# Loading existing DBs

The library creates/opens databases by appending the passed name plus, the [documents directory on iOS](https://github.com/margelo/react-native-quick-sqlite/blob/733e876d98896f5efc80f989ae38120f16533a66/ios/QuickSQLite.mm#L34-L35) and the [files directory on Android](https://github.com/margelo/react-native-quick-sqlite/blob/main/android/src/main/java/com/margelo/rnquicksqlite/QuickSQLiteBridge.java#L16), this differs from other SQL libraries (some place it in a `www` folder, some in androids `databases` folder, etc.).
The library creates/opens databases by appending the passed name plus, the [documents directory on iOS](https://github.com/margelo/react-native-nitro-sqlite/blob/733e876d98896f5efc80f989ae38120f16533a66/ios/NitroSQLite.mm#L34-L35) and the [files directory on Android](https://github.com/margelo/react-native-nitro-sqlite/blob/main/android/src/main/java/com/margelo/rnnitrosqlite/NitroSQLiteBridge.java#L16), this differs from other SQL libraries (some place it in a `www` folder, some in androids `databases` folder, etc.).

If you have an existing database file you want to load you can navigate from these directories using dot notation. e.g. `../www/myDb.sqlite`. Note that on iOS the file system is sand-boxed, so you cannot access files/directories outside your app bundle directories.

Expand All @@ -297,7 +297,7 @@ Add a `post_install` block to your `<PROJECT_ROOT>/ios/Podfile` like so:
```ruby
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "react-native-quick-sqlite" then
if target.name == "react-native-nitro-sqlite" then
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'SQLITE_ENABLE_FTS5=1'
end
Expand All @@ -314,7 +314,7 @@ For example, you could add `SQLITE_ENABLE_FTS5=1` to `GCC_PREPROCESSOR_DEFINITIO
You can specify flags via `<PROJECT_ROOT>/android/gradle.properties` like so:

```
quickSqliteFlags="<SQLITE_FLAGS>"
nitroSqliteFlags="<SQLITE_FLAGS>"
```

## Additional configuration
Expand All @@ -323,15 +323,15 @@ quickSqliteFlags="<SQLITE_FLAGS>"

On iOS, the SQLite database can be placed in an app group, in order to make it accessible from other apps in that app group. E.g. for sharing capabilities.

To use an app group, add the app group ID as the value for the `RNQuickSQLite_AppGroup` key in your project's `Info.plist` file. You'll also need to configure the app group in your project settings. (Xcode -> Project Settings -> Signing & Capabilities -> Add Capability -> App Groups)
To use an app group, add the app group ID as the value for the `RNNitroSQLite_AppGroup` key in your project's `Info.plist` file. You'll also need to configure the app group in your project settings. (Xcode -> Project Settings -> Signing & Capabilities -> Add Capability -> App Groups)

## Community Discord

[Join the Margelo Community Discord](https://discord.gg/6CSHz2qAvA) to chat about react-native-quick-sqlite or other Margelo libraries.
[Join the Margelo Community Discord](https://discord.gg/6CSHz2qAvA) to chat about react-native-nitro-sqlite or other Margelo libraries.

## Oscar

react-native-quick-sqlite was originally created by [Oscar Franco](https://github.com/ospfranco). Thanks Oscar!
react-native-nitro-sqlite was originally created by [Oscar Franco](https://github.com/ospfranco). Thanks Oscar!

## License

Expand Down
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "com.margelo.rnquicksqlite.example"
namespace "com.margelo.rnnitrosqlite.example"
defaultConfig {
applicationId "com.margelo.rnquicksqlite.example"
applicationId "com.margelo.rnnitrosqlite.example"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.margelo.rnquicksqlite.example
package com.margelo.rnnitrosqlite.example

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
Expand All @@ -11,7 +11,7 @@ class MainActivity : ReactActivity() {
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "QuickSQLiteExample"
override fun getMainComponentName(): String = "NitroSQLiteExample"

/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.margelo.rnquicksqlite.example;
package com.margelo.rnnitrosqlite.example;

import android.app.Application
import com.facebook.react.PackageList
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">QuickSQLiteExample</string>
<string name="app_name">NitroSQLiteExample</string>
</resources>
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement { includeBuild("../../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'QuickSQLiteExample'
rootProject.name = 'NitroSQLiteExample'
include ':app'
includeBuild('../../node_modules/@react-native/gradle-plugin')
12 changes: 6 additions & 6 deletions example/app.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "QuickSQLiteExample",
"displayName": "QuickSQLite Example",
"name": "NitroSQLiteExample",
"displayName": "NitroSQLite Example",
"components": [
{
"appKey": "QuickSQLiteExample",
"displayName": "QuickSQLite Example"
"appKey": "NitroSQLiteExample",
"displayName": "NitroSQLite Example"
}
],
"resources": {
Expand All @@ -15,9 +15,9 @@
"windows": ["dist/assets", "dist/main.windows.bundle"]
},
"android": {
"package": "com.margelo.rnquicksqlite.example"
"package": "com.margelo.rnnitrosqlite.example"
},
"ios": {
"bundleIdentifier": "com.margelo.rnquicksqlite.example"
"bundleIdentifier": "com.margelo.rnnitrosqlite.example"
}
}
2 changes: 1 addition & 1 deletion example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
alias: {
[pak.name]: path.join(__dirname, '../package', pak.source),
stream: 'stream-browserify',
'react-native-sqlite-storage': 'react-native-quick-sqlite',
'react-native-sqlite-storage': 'react-native-nitro-sqlite',
},
},
],
Expand Down
Loading
Loading