Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5,967 changes: 3,464 additions & 2,503 deletions cpp/sqlite3.c

Large diffs are not rendered by default.

200 changes: 166 additions & 34 deletions cpp/sqlite3.h

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions example/ios/_xcode.env

This file was deleted.

4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"run:ios:unused": "xcodebuild -workspace ios/OPSQLiteExample.xcworkspace -scheme release -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16 Pro' clean build",
"run:ios": "react-native run-ios --scheme='release' --no-packager",
"start": "react-native start",
"pods": "cd ios && bundle exec pod install",
"pods": "cd ios && bundle exec pod install && rm -f .xcode.env.local",
"pods:nuke": "cd ios && rm -rf Pods && rm -rf Podfile.lock && bundle exec pod install",
"run:android:release": "cd android && ./gradlew assembleRelease && adb install -r app/build/outputs/apk/release/app-release.apk && adb shell am start -n com.op.sqlite.example/.MainActivity",
"build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
Expand Down Expand Up @@ -72,7 +72,7 @@
"fts5": true,
"rtree": true,
"crsqlite": false,
"sqliteVec": true,
"sqliteVec": false,
"sqliteFlags": "-DSQLITE_TEMP_STORE=2",
"performanceMode": true,
"tokenizers": [
Expand Down
5 changes: 3 additions & 2 deletions example/src/tests/dbsetup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const expectedVersion = isLibsql()
? '3.45.1'
: isSQLCipher()
? '3.46.1'
: '3.47.2';
: '3.49.1';
const flavor = isLibsql() ? 'libsql' : isSQLCipher() ? 'sqlcipher' : 'sqlite';

// const expectedSqliteVecVersion = 'v0.1.2-alpha.7';

Expand All @@ -41,7 +42,7 @@ export function dbSetupTests() {
// Using the embedded version, you can never be sure which version is used
// It will change from OS version to version
if (!isIOSEmbeeded()) {
it(`Should match the sqlite expected version ${expectedVersion}`, async () => {
it(`Should match the sqlite flavor ${flavor} expected version ${expectedVersion}`, async () => {
let db = open({
name: 'versionTest.sqlite',
encryptionKey: 'test',
Expand Down
9 changes: 5 additions & 4 deletions scripts/gen-sqlcipher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ rm -f ./cpp/sqlcipher/sqlite3.h
# You need to clone the repo on the parent folder first
cd ../sqlcipher

# You need to install openssl via homebrew. Don't worry it is not really linked against the version you install, it's only needed to generate the header
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I/opt/homebrew/include" LDFLAGS=-L/opt/homebrew/lib/
# Add the include directory for OpenSSL headers
./configure --with-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown -I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib/ -lcrypto"

make

make sqlite3.c

cp sqlite3.c ../op-sqlite/cpp/sqlcipher/sqlcipher.c
cp sqlite3.h ../op-sqlite/cpp/sqlcipher/sqlcipher.h
# Fix the path - it should be opsqlite not op-sqlite
cp sqlite3.c ../opsqlite/cpp/sqlcipher/sqlite3.c
cp sqlite3.h ../opsqlite/cpp/sqlcipher/sqlite3.h
Loading