-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(op-sqlite): allow extensions to be loaded (#469)
- Loading branch information
1 parent
6580f29
commit 3a37054
Showing
13 changed files
with
742 additions
and
1,794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@powersync/op-sqlite': minor | ||
--- | ||
|
||
* Allow users to load additional sqlite extensions | ||
* Remove `getBundledPath` function as `getDylibPath` can now be used instead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
...wersync-op-sqlite/android/src/main/java/com/powersync/opsqlite/PowerSyncOpSqliteModule.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
packages/powersync-op-sqlite/android/src/newarch/PowerSyncOpSqliteSpec.kt
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
packages/powersync-op-sqlite/android/src/oldarch/PowerSyncOpSqliteSpec.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,4 @@ | ||
import { NativeModules, Platform } from 'react-native'; | ||
|
||
const LINKING_ERROR = | ||
`The package '@powersync/op-sqlite' doesn't seem to be linked. Make sure: \n\n` + | ||
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + | ||
'- You rebuilt the app after installing the package\n' + | ||
'- You are not using Expo Go\n'; | ||
|
||
const isTurboModuleEnabled = global.__turboModuleProxy != null; | ||
|
||
const PowerSyncOpSqliteModule = isTurboModuleEnabled | ||
? require('./NativePowerSyncOpSqlite').default | ||
: NativeModules.PowerSyncOpSqlite; | ||
|
||
const PowerSyncOpSqlite = PowerSyncOpSqliteModule | ||
? PowerSyncOpSqliteModule | ||
: new Proxy( | ||
{}, | ||
{ | ||
get() { | ||
throw new Error(LINKING_ERROR); | ||
} | ||
} | ||
); | ||
|
||
export function getBundlePath(): string { | ||
return PowerSyncOpSqlite.getBundlePath(); | ||
} | ||
|
||
export { OPSqliteOpenFactory, OPSQLiteOpenFactoryOptions } from './db/OPSqliteDBOpenFactory'; | ||
export { | ||
OPSqliteOpenFactory, | ||
OPSQLiteOpenFactoryOptions | ||
} from './db/OPSqliteDBOpenFactory'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.