@taladb/react-native 0.6.1 → 0.7.3
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.
- package/android/src/main/jniLibs/arm64-v8a/libredb-0944877d0a949895.so +0 -0
- package/android/src/main/jniLibs/arm64-v8a/libtaladb_ffi.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/{libredb-6543807032a4d3d4.so → libredb-3eb5d788992b33b3.so} +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libtaladb_ffi.so +0 -0
- package/android/src/main/jniLibs/x86_64/libredb-ece86615cd326687.so +0 -0
- package/android/src/main/jniLibs/x86_64/libtaladb_ffi.so +0 -0
- package/cpp/TalaDBHostObject.cpp +14 -0
- package/cpp/taladb.h +6 -0
- package/ios/TalaDBFfi.xcframework/ios-arm64/Headers/TalaDBHostObject.cpp +14 -0
- package/ios/TalaDBFfi.xcframework/ios-arm64/Headers/taladb.h +6 -0
- package/ios/TalaDBFfi.xcframework/ios-arm64/libtaladb_ffi.a +0 -0
- package/ios/TalaDBFfi.xcframework/ios-arm64_x86_64-simulator/Headers/TalaDBHostObject.cpp +14 -0
- package/ios/TalaDBFfi.xcframework/ios-arm64_x86_64-simulator/Headers/taladb.h +6 -0
- package/ios/TalaDBFfi.xcframework/ios-arm64_x86_64-simulator/libtaladb_ffi_sim.a +0 -0
- package/package.json +1 -1
- package/android/src/main/jniLibs/arm64-v8a/libredb-5d2d0997ccb02a9b.so +0 -0
- package/android/src/main/jniLibs/x86_64/libredb-21fa12fa517068ae.so +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cpp/TalaDBHostObject.cpp
CHANGED
|
@@ -70,6 +70,7 @@ std::vector<PropNameID> TalaDBHostObject::getPropertyNames(Runtime &rt) {
|
|
|
70
70
|
"count",
|
|
71
71
|
"createIndex", "dropIndex",
|
|
72
72
|
"createFtsIndex", "dropFtsIndex",
|
|
73
|
+
"compact",
|
|
73
74
|
"close",
|
|
74
75
|
};
|
|
75
76
|
std::vector<PropNameID> result;
|
|
@@ -264,6 +265,19 @@ Value TalaDBHostObject::get(Runtime &rt, const PropNameID &propName) {
|
|
|
264
265
|
});
|
|
265
266
|
}
|
|
266
267
|
|
|
268
|
+
// ------------------------------------------------------------------
|
|
269
|
+
// compact(): void
|
|
270
|
+
// ------------------------------------------------------------------
|
|
271
|
+
if (name == "compact") {
|
|
272
|
+
return Function::createFromHostFunction(
|
|
273
|
+
rt, PropNameID::forAscii(rt, "compact"), 0,
|
|
274
|
+
[this](Runtime &rt, const Value &, const Value *, size_t) -> Value {
|
|
275
|
+
int32_t res = taladb_compact(db_);
|
|
276
|
+
if (res < 0) throw JSError(rt, "taladb_compact failed");
|
|
277
|
+
return Value::undefined();
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
267
281
|
// ------------------------------------------------------------------
|
|
268
282
|
// close(): void (synchronous — the destructor does the real work)
|
|
269
283
|
// ------------------------------------------------------------------
|
package/cpp/taladb.h
CHANGED
|
@@ -48,6 +48,12 @@ TalaDbHandle *taladb_open_with_config(const char *path, const char *config_json)
|
|
|
48
48
|
/** Flush and close the database, freeing the handle. */
|
|
49
49
|
void taladb_close(TalaDbHandle *handle);
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Compact the underlying storage file, reclaiming space freed by deletes and
|
|
53
|
+
* updates. No-op on in-memory databases. Returns 1 on success, -1 on error.
|
|
54
|
+
*/
|
|
55
|
+
int32_t taladb_compact(TalaDbHandle *handle);
|
|
56
|
+
|
|
51
57
|
/** Free a C string returned by any taladb_* function. */
|
|
52
58
|
void taladb_free_string(char *s);
|
|
53
59
|
|
|
@@ -70,6 +70,7 @@ std::vector<PropNameID> TalaDBHostObject::getPropertyNames(Runtime &rt) {
|
|
|
70
70
|
"count",
|
|
71
71
|
"createIndex", "dropIndex",
|
|
72
72
|
"createFtsIndex", "dropFtsIndex",
|
|
73
|
+
"compact",
|
|
73
74
|
"close",
|
|
74
75
|
};
|
|
75
76
|
std::vector<PropNameID> result;
|
|
@@ -264,6 +265,19 @@ Value TalaDBHostObject::get(Runtime &rt, const PropNameID &propName) {
|
|
|
264
265
|
});
|
|
265
266
|
}
|
|
266
267
|
|
|
268
|
+
// ------------------------------------------------------------------
|
|
269
|
+
// compact(): void
|
|
270
|
+
// ------------------------------------------------------------------
|
|
271
|
+
if (name == "compact") {
|
|
272
|
+
return Function::createFromHostFunction(
|
|
273
|
+
rt, PropNameID::forAscii(rt, "compact"), 0,
|
|
274
|
+
[this](Runtime &rt, const Value &, const Value *, size_t) -> Value {
|
|
275
|
+
int32_t res = taladb_compact(db_);
|
|
276
|
+
if (res < 0) throw JSError(rt, "taladb_compact failed");
|
|
277
|
+
return Value::undefined();
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
267
281
|
// ------------------------------------------------------------------
|
|
268
282
|
// close(): void (synchronous — the destructor does the real work)
|
|
269
283
|
// ------------------------------------------------------------------
|
|
@@ -48,6 +48,12 @@ TalaDbHandle *taladb_open_with_config(const char *path, const char *config_json)
|
|
|
48
48
|
/** Flush and close the database, freeing the handle. */
|
|
49
49
|
void taladb_close(TalaDbHandle *handle);
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Compact the underlying storage file, reclaiming space freed by deletes and
|
|
53
|
+
* updates. No-op on in-memory databases. Returns 1 on success, -1 on error.
|
|
54
|
+
*/
|
|
55
|
+
int32_t taladb_compact(TalaDbHandle *handle);
|
|
56
|
+
|
|
51
57
|
/** Free a C string returned by any taladb_* function. */
|
|
52
58
|
void taladb_free_string(char *s);
|
|
53
59
|
|
|
Binary file
|
|
@@ -70,6 +70,7 @@ std::vector<PropNameID> TalaDBHostObject::getPropertyNames(Runtime &rt) {
|
|
|
70
70
|
"count",
|
|
71
71
|
"createIndex", "dropIndex",
|
|
72
72
|
"createFtsIndex", "dropFtsIndex",
|
|
73
|
+
"compact",
|
|
73
74
|
"close",
|
|
74
75
|
};
|
|
75
76
|
std::vector<PropNameID> result;
|
|
@@ -264,6 +265,19 @@ Value TalaDBHostObject::get(Runtime &rt, const PropNameID &propName) {
|
|
|
264
265
|
});
|
|
265
266
|
}
|
|
266
267
|
|
|
268
|
+
// ------------------------------------------------------------------
|
|
269
|
+
// compact(): void
|
|
270
|
+
// ------------------------------------------------------------------
|
|
271
|
+
if (name == "compact") {
|
|
272
|
+
return Function::createFromHostFunction(
|
|
273
|
+
rt, PropNameID::forAscii(rt, "compact"), 0,
|
|
274
|
+
[this](Runtime &rt, const Value &, const Value *, size_t) -> Value {
|
|
275
|
+
int32_t res = taladb_compact(db_);
|
|
276
|
+
if (res < 0) throw JSError(rt, "taladb_compact failed");
|
|
277
|
+
return Value::undefined();
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
267
281
|
// ------------------------------------------------------------------
|
|
268
282
|
// close(): void (synchronous — the destructor does the real work)
|
|
269
283
|
// ------------------------------------------------------------------
|
|
@@ -48,6 +48,12 @@ TalaDbHandle *taladb_open_with_config(const char *path, const char *config_json)
|
|
|
48
48
|
/** Flush and close the database, freeing the handle. */
|
|
49
49
|
void taladb_close(TalaDbHandle *handle);
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Compact the underlying storage file, reclaiming space freed by deletes and
|
|
53
|
+
* updates. No-op on in-memory databases. Returns 1 on success, -1 on error.
|
|
54
|
+
*/
|
|
55
|
+
int32_t taladb_compact(TalaDbHandle *handle);
|
|
56
|
+
|
|
51
57
|
/** Free a C string returned by any taladb_* function. */
|
|
52
58
|
void taladb_free_string(char *s);
|
|
53
59
|
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|