-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[android][sqlite] Migrate to Expo Modules API (expo#23115)
- Loading branch information
1 parent
b29c181
commit 09ee958
Showing
12 changed files
with
82 additions
and
63 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
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
15 changes: 15 additions & 0 deletions
15
packages/expo-sqlite/android/src/main/java/expo/modules/sqlite/SQLExceptions.kt
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,15 @@ | ||
package expo.modules.sqlite | ||
|
||
import expo.modules.kotlin.exception.CodedException | ||
|
||
class OpenDatabaseException(name: String) : | ||
CodedException("Unable to delete database '$name' that is currently open. Close it prior to deletion.") | ||
|
||
class DatabaseNotFoundException(name: String) : | ||
CodedException("Database '$name' not found") | ||
|
||
class DeleteDatabaseException(name: String) : | ||
CodedException("Unable to delete the database file for '$name' database") | ||
|
||
class SQLiteException(message: String?, cause: Throwable?) : | ||
CodedException(SQLiteModule::class.java.simpleName, message, cause) |
11 changes: 11 additions & 0 deletions
11
packages/expo-sqlite/android/src/main/java/expo/modules/sqlite/SQLRecords.kt
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,11 @@ | ||
package expo.modules.sqlite | ||
|
||
import expo.modules.kotlin.records.Field | ||
import expo.modules.kotlin.records.Record | ||
|
||
data class Query( | ||
@Field | ||
val sql: String, | ||
@Field | ||
val args: List<Any?> | ||
) : Record |
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
11 changes: 0 additions & 11 deletions
11
packages/expo-sqlite/android/src/main/java/expo/modules/sqlite/SQLitePackage.kt
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.