react-native-nitro-sqlite 9.1.6 → 9.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/RNNitroSQLite.podspec +17 -29
  2. package/cpp/specs/HybridNitroSQLite.cpp +2 -2
  3. package/cpp/specs/HybridNitroSQLite.hpp +2 -2
  4. package/cpp/sqliteExecuteBatch.cpp +1 -1
  5. package/cpp/sqliteExecuteBatch.hpp +2 -2
  6. package/lib/commonjs/index.js +30 -21
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/commonjs/nullHandling.js +33 -0
  9. package/lib/commonjs/nullHandling.js.map +1 -0
  10. package/lib/commonjs/operations/execute.js +7 -11
  11. package/lib/commonjs/operations/execute.js.map +1 -1
  12. package/lib/commonjs/operations/executeBatch.js +34 -0
  13. package/lib/commonjs/operations/executeBatch.js.map +1 -0
  14. package/lib/commonjs/operations/session.js +3 -2
  15. package/lib/commonjs/operations/session.js.map +1 -1
  16. package/lib/commonjs/types.js +4 -0
  17. package/lib/commonjs/types.js.map +1 -1
  18. package/lib/module/index.js +5 -17
  19. package/lib/module/index.js.map +1 -1
  20. package/lib/module/nullHandling.js +25 -0
  21. package/lib/module/nullHandling.js.map +1 -0
  22. package/lib/module/operations/execute.js +5 -8
  23. package/lib/module/operations/execute.js.map +1 -1
  24. package/lib/module/operations/executeBatch.js +29 -0
  25. package/lib/module/operations/executeBatch.js.map +1 -0
  26. package/lib/module/operations/session.js +3 -2
  27. package/lib/module/operations/session.js.map +1 -1
  28. package/lib/module/types.js +6 -0
  29. package/lib/module/types.js.map +1 -1
  30. package/lib/typescript/commonjs/index.d.ts +4 -7
  31. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  32. package/lib/typescript/commonjs/nullHandling.d.ts +8 -0
  33. package/lib/typescript/commonjs/nullHandling.d.ts.map +1 -0
  34. package/lib/typescript/commonjs/operations/execute.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/operations/executeBatch.d.ts +4 -0
  36. package/lib/typescript/commonjs/operations/executeBatch.d.ts.map +1 -0
  37. package/lib/typescript/commonjs/operations/session.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/specs/NitroSQLite.nitro.d.ts +3 -3
  39. package/lib/typescript/commonjs/specs/NitroSQLite.nitro.d.ts.map +1 -1
  40. package/lib/typescript/commonjs/types.d.ts +8 -0
  41. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  42. package/lib/typescript/module/index.d.ts +4 -7
  43. package/lib/typescript/module/index.d.ts.map +1 -1
  44. package/lib/typescript/module/nullHandling.d.ts +8 -0
  45. package/lib/typescript/module/nullHandling.d.ts.map +1 -0
  46. package/lib/typescript/module/operations/execute.d.ts.map +1 -1
  47. package/lib/typescript/module/operations/executeBatch.d.ts +4 -0
  48. package/lib/typescript/module/operations/executeBatch.d.ts.map +1 -0
  49. package/lib/typescript/module/operations/session.d.ts.map +1 -1
  50. package/lib/typescript/module/specs/NitroSQLite.nitro.d.ts +3 -3
  51. package/lib/typescript/module/specs/NitroSQLite.nitro.d.ts.map +1 -1
  52. package/lib/typescript/module/types.d.ts +8 -0
  53. package/lib/typescript/module/types.d.ts.map +1 -1
  54. package/nitrogen/generated/shared/c++/HybridNitroSQLiteSpec.hpp +5 -5
  55. package/nitrogen/generated/shared/c++/{BatchQueryCommand.hpp → NativeBatchQueryCommand.hpp} +10 -10
  56. package/package.json +1 -1
  57. package/src/index.ts +9 -19
  58. package/src/nullHandling.ts +31 -0
  59. package/src/operations/execute.ts +8 -12
  60. package/src/operations/executeBatch.ts +56 -0
  61. package/src/operations/session.ts +3 -2
  62. package/src/specs/NitroSQLite.nitro.ts +6 -3
  63. package/src/types.ts +10 -0
package/src/types.ts CHANGED
@@ -36,6 +36,8 @@ export type SQLiteValue =
36
36
  | string
37
37
  | ArrayBuffer
38
38
  | SQLiteNullValue
39
+
40
+ /** Used internally to transform the query params into a native format without nullish values */
39
41
  export type NativeSQLiteQueryParams = SQLiteValue[]
40
42
 
41
43
  /**
@@ -91,6 +93,14 @@ export interface BatchQueryCommand {
91
93
  params?: SQLiteQueryParams | SQLiteQueryParams[]
92
94
  }
93
95
 
96
+ /**
97
+ * Used internally to transform the batch query commands into a native format without nullish values
98
+ */
99
+ export interface NativeBatchQueryCommand {
100
+ query: string
101
+ params?: NativeSQLiteQueryParams | NativeSQLiteQueryParams[]
102
+ }
103
+
94
104
  /**
95
105
  * status: 0 or undefined for correct execution, 1 for error
96
106
  * message: if status === 1, here you will find error description