@taladb/react-native 0.11.3 → 0.11.5

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.
@@ -6,38 +6,38 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>BinaryPath</key>
9
- <string>libtaladb_ffi_sim.a</string>
9
+ <string>libtaladb_ffi.a</string>
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64_x86_64-simulator</string>
13
+ <string>ios-arm64</string>
14
14
  <key>LibraryPath</key>
15
- <string>libtaladb_ffi_sim.a</string>
15
+ <string>libtaladb_ffi.a</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
- <string>x86_64</string>
20
19
  </array>
21
20
  <key>SupportedPlatform</key>
22
21
  <string>ios</string>
23
- <key>SupportedPlatformVariant</key>
24
- <string>simulator</string>
25
22
  </dict>
26
23
  <dict>
27
24
  <key>BinaryPath</key>
28
- <string>libtaladb_ffi.a</string>
25
+ <string>libtaladb_ffi_sim.a</string>
29
26
  <key>HeadersPath</key>
30
27
  <string>Headers</string>
31
28
  <key>LibraryIdentifier</key>
32
- <string>ios-arm64</string>
29
+ <string>ios-arm64_x86_64-simulator</string>
33
30
  <key>LibraryPath</key>
34
- <string>libtaladb_ffi.a</string>
31
+ <string>libtaladb_ffi_sim.a</string>
35
32
  <key>SupportedArchitectures</key>
36
33
  <array>
37
34
  <string>arm64</string>
35
+ <string>x86_64</string>
38
36
  </array>
39
37
  <key>SupportedPlatform</key>
40
38
  <string>ios</string>
39
+ <key>SupportedPlatformVariant</key>
40
+ <string>simulator</string>
41
41
  </dict>
42
42
  </array>
43
43
  <key>CFBundlePackageType</key>
@@ -643,6 +643,24 @@ Value TalaDBHostObject::get(Runtime &rt, const PropNameID &propName) {
643
643
  });
644
644
  }
645
645
 
646
+ // ------------------------------------------------------------------
647
+ // rebuildVectorIndexes(): void
648
+ //
649
+ // Warms every HNSW graph in the database. The graphs are memory-only, so
650
+ // without this findNearest silently degrades to an exact linear scan for
651
+ // the whole process lifetime. Scans every indexed vector — call it once at
652
+ // startup, off the first frame.
653
+ // ------------------------------------------------------------------
654
+ if (name == "rebuildVectorIndexes") {
655
+ return Function::createFromHostFunction(
656
+ rt, PropNameID::forAscii(rt, "rebuildVectorIndexes"), 0,
657
+ [this](Runtime &rt, const Value &, const Value *, size_t) -> Value {
658
+ int32_t res = taladb_rebuild_hnsw_indexes(db_);
659
+ if (res < 0) throw ffiError(rt, "taladb_rebuild_hnsw_indexes failed");
660
+ return Value::undefined();
661
+ });
662
+ }
663
+
646
664
  // ------------------------------------------------------------------
647
665
  // findNearest(collection, field, query, topK, filter?): { document, score }[]
648
666
  // query — Float32Array (preferred, zero-copy) or number[]
@@ -799,7 +817,7 @@ Value TalaDBHostObject::get(Runtime &rt, const PropNameID &propName) {
799
817
  if (name == "close") {
800
818
  return Function::createFromHostFunction(
801
819
  rt, PropNameID::forAscii(rt, "close"), 0,
802
- [this](Runtime &rt, const Value &, const Value *, size_t) -> Value {
820
+ [this](Runtime &, const Value &, const Value *, size_t) -> Value {
803
821
  if (db_) {
804
822
  taladb_close(db_);
805
823
  db_ = nullptr;