Rocket.Chat.ReactNative/patches/@nozbe+watermelondb+0.23.0....

69 lines
3.0 KiB
Diff

diff --git a/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/Database.kt b/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/Database.kt
index 802f137..cfcac91 100644
--- a/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/Database.kt
+++ b/node_modules/@nozbe/watermelondb/native/android/src/main/java/com/nozbe/watermelondb/Database.kt
@@ -8,7 +8,7 @@ import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteQuery
import java.io.File
-class Database(private val name: String, private val context: Context) {
+public class Database(private val name: String, private val context: Context) {
private val db: SQLiteDatabase by lazy {
SQLiteDatabase.openOrCreateDatabase(
@@ -44,7 +44,7 @@ class Database(private val name: String, private val context: Context) {
fun delete(query: SQL, args: QueryArgs) = db.execSQL(query, args)
- fun rawQuery(sql: SQL, args: QueryArgs = emptyArray()): Cursor {
+ public fun rawQuery(sql: SQL, args: QueryArgs = emptyArray()): Cursor {
// HACK: db.rawQuery only supports String args, and there's no clean way AFAIK to construct
// a query with arbitrary args (like with execSQL). However, we can misuse cursor factory
// to get the reference of a SQLiteQuery before it's executed
diff --git a/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/Database.swift b/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/Database.swift
index b4d7151..429e318 100644
--- a/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/Database.swift
+++ b/node_modules/@nozbe/watermelondb/native/ios/WatermelonDB/Database.swift
@@ -1,15 +1,15 @@
import Foundation
import SQLite3
-class Database {
- typealias SQL = String
- typealias TableName = String
- typealias QueryArgs = [Any]
+public class Database {
+ public typealias SQL = String
+ public typealias TableName = String
+ public typealias QueryArgs = [Any]
private let fmdb: FMDatabase
private let path: String
- init(path: String) {
+ public init(path: String) {
self.path = path
fmdb = FMDatabase(path: path)
open()
@@ -54,7 +54,7 @@ class Database {
}
}
- func queryRaw(_ query: SQL, _ args: QueryArgs = []) throws -> AnyIterator<FMResultSet> {
+ public func queryRaw(_ query: SQL, _ args: QueryArgs = []) throws -> AnyIterator<FMResultSet> {
let resultSet = try fmdb.executeQuery(query, values: args)
return AnyIterator {
diff --git a/node_modules/@nozbe/watermelondb/native/shared/DatabasePlatform.h b/node_modules/@nozbe/watermelondb/native/shared/DatabasePlatform.h
index 6814d5f..fecded8 100644
--- a/node_modules/@nozbe/watermelondb/native/shared/DatabasePlatform.h
+++ b/node_modules/@nozbe/watermelondb/native/shared/DatabasePlatform.h
@@ -1,6 +1,7 @@
#pragma once
#include <string>
+#include <functional>
namespace watermelondb {
namespace platform {