@peerbit/native-backbone 0.2.9 → 0.2.11
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/README.md +55 -20
- package/dist/src/index.d.ts +61 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +948 -74
- package/dist/src/index.js.map +1 -1
- package/dist/wasm/README.md +55 -20
- package/dist/wasm/native_backbone.d.ts +124 -79
- package/dist/wasm/native_backbone.js +297 -0
- package/dist/wasm/native_backbone_bg.wasm +0 -0
- package/dist/wasm/native_backbone_bg.wasm.d.ts +90 -79
- package/package.json +2 -2
- package/src/append_tx/committed_latest.rs +10 -5
- package/src/append_tx/committed_no_next.rs +6 -3
- package/src/append_tx/facts.rs +427 -1
- package/src/append_tx/mod.rs +51 -18
- package/src/append_tx/storage.rs +12 -2
- package/src/index.ts +1418 -227
- package/src/shared_log_plan.rs +30 -0
|
@@ -1717,6 +1717,30 @@ export class NativeLogIndex {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
return takeFromExternrefTable0(ret[0]);
|
|
1719
1719
|
}
|
|
1720
|
+
/**
|
|
1721
|
+
* @param {NativeEntryV0PlainBuilder} builder
|
|
1722
|
+
* @param {NativeLogBlockStore} block_store
|
|
1723
|
+
* @param {bigint} wall_time
|
|
1724
|
+
* @param {number} logical
|
|
1725
|
+
* @param {string} gid
|
|
1726
|
+
* @param {Array<any>} next
|
|
1727
|
+
* @param {number} entry_type
|
|
1728
|
+
* @param {any} meta_data
|
|
1729
|
+
* @param {Uint8Array} payload_data
|
|
1730
|
+
* @param {number} trim_length_to
|
|
1731
|
+
* @returns {Array<any>}
|
|
1732
|
+
*/
|
|
1733
|
+
prepare_entry_v0_plain_entry_commit_facts_trim_refs_and_put_with_builder(builder, block_store, wall_time, logical, gid, next, entry_type, meta_data, payload_data, trim_length_to) {
|
|
1734
|
+
_assertClass(builder, NativeEntryV0PlainBuilder);
|
|
1735
|
+
_assertClass(block_store, NativeLogBlockStore);
|
|
1736
|
+
const ptr0 = passStringToWasm0(gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1737
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1738
|
+
const ret = wasm.nativelogindex_prepare_entry_v0_plain_entry_commit_facts_trim_refs_and_put_with_builder(this.__wbg_ptr, builder.__wbg_ptr, block_store.__wbg_ptr, wall_time, logical, ptr0, len0, next, entry_type, meta_data, payload_data, trim_length_to);
|
|
1739
|
+
if (ret[2]) {
|
|
1740
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1741
|
+
}
|
|
1742
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1743
|
+
}
|
|
1720
1744
|
/**
|
|
1721
1745
|
* @param {NativeEntryV0PlainBuilder} builder
|
|
1722
1746
|
* @param {NativeLogBlockStore} block_store
|
|
@@ -1785,6 +1809,29 @@ export class NativeLogIndex {
|
|
|
1785
1809
|
}
|
|
1786
1810
|
return takeFromExternrefTable0(ret[0]);
|
|
1787
1811
|
}
|
|
1812
|
+
/**
|
|
1813
|
+
* @param {NativeEntryV0PlainBuilder} builder
|
|
1814
|
+
* @param {NativeLogBlockStore} block_store
|
|
1815
|
+
* @param {bigint} wall_time
|
|
1816
|
+
* @param {number} logical
|
|
1817
|
+
* @param {string} gid
|
|
1818
|
+
* @param {number} entry_type
|
|
1819
|
+
* @param {any} meta_data
|
|
1820
|
+
* @param {Uint8Array} payload_data
|
|
1821
|
+
* @param {number} trim_length_to
|
|
1822
|
+
* @returns {Array<any>}
|
|
1823
|
+
*/
|
|
1824
|
+
prepare_entry_v0_plain_entry_commit_no_next_facts_trim_refs_and_put_with_builder(builder, block_store, wall_time, logical, gid, entry_type, meta_data, payload_data, trim_length_to) {
|
|
1825
|
+
_assertClass(builder, NativeEntryV0PlainBuilder);
|
|
1826
|
+
_assertClass(block_store, NativeLogBlockStore);
|
|
1827
|
+
const ptr0 = passStringToWasm0(gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1828
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1829
|
+
const ret = wasm.nativelogindex_prepare_entry_v0_plain_entry_commit_no_next_facts_trim_refs_and_put_with_builder(this.__wbg_ptr, builder.__wbg_ptr, block_store.__wbg_ptr, wall_time, logical, ptr0, len0, entry_type, meta_data, payload_data, trim_length_to);
|
|
1830
|
+
if (ret[2]) {
|
|
1831
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1832
|
+
}
|
|
1833
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1834
|
+
}
|
|
1788
1835
|
/**
|
|
1789
1836
|
* @param {NativeEntryV0PlainBuilder} builder
|
|
1790
1837
|
* @param {bigint} wall_time
|
|
@@ -3225,6 +3272,29 @@ export class NativePeerbitBackbone {
|
|
|
3225
3272
|
}
|
|
3226
3273
|
return takeFromExternrefTable0(ret[0]);
|
|
3227
3274
|
}
|
|
3275
|
+
/**
|
|
3276
|
+
* @param {number} replicas
|
|
3277
|
+
* @param {number} role_age_ms
|
|
3278
|
+
* @param {string} now
|
|
3279
|
+
* @param {any} peer_filter
|
|
3280
|
+
* @param {boolean} expand_peer_filter
|
|
3281
|
+
* @param {string} self_hash
|
|
3282
|
+
* @param {boolean} include_self
|
|
3283
|
+
* @param {boolean} full_replica_fallback
|
|
3284
|
+
* @param {boolean} include_strict_full_replica
|
|
3285
|
+
* @returns {any}
|
|
3286
|
+
*/
|
|
3287
|
+
get_routing_full_replica_leaders(replicas, role_age_ms, now, peer_filter, expand_peer_filter, self_hash, include_self, full_replica_fallback, include_strict_full_replica) {
|
|
3288
|
+
const ptr0 = passStringToWasm0(now, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3289
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3290
|
+
const ptr1 = passStringToWasm0(self_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3291
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3292
|
+
const ret = wasm.nativepeerbitbackbone_get_routing_full_replica_leaders(this.__wbg_ptr, replicas, role_age_ms, ptr0, len0, peer_filter, expand_peer_filter, ptr1, len1, include_self, full_replica_fallback, include_strict_full_replica);
|
|
3293
|
+
if (ret[2]) {
|
|
3294
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3295
|
+
}
|
|
3296
|
+
return takeFromExternrefTable0(ret[0]);
|
|
3297
|
+
}
|
|
3228
3298
|
/**
|
|
3229
3299
|
* @param {string} hash
|
|
3230
3300
|
* @returns {Array<any>}
|
|
@@ -5630,6 +5700,28 @@ export class NativePeerbitBackbone {
|
|
|
5630
5700
|
}
|
|
5631
5701
|
return takeFromExternrefTable0(ret[0]);
|
|
5632
5702
|
}
|
|
5703
|
+
/**
|
|
5704
|
+
* Compact counterpart to `prepare_plain_entry_commit_facts`. This is an
|
|
5705
|
+
* additive export so older native bundles retain their frozen row shape.
|
|
5706
|
+
* @param {bigint} wall_time
|
|
5707
|
+
* @param {number} logical
|
|
5708
|
+
* @param {string} gid
|
|
5709
|
+
* @param {Array<any>} next
|
|
5710
|
+
* @param {number} entry_type
|
|
5711
|
+
* @param {any} meta_data
|
|
5712
|
+
* @param {Uint8Array} payload_data
|
|
5713
|
+
* @param {number} trim_length_to
|
|
5714
|
+
* @returns {Array<any>}
|
|
5715
|
+
*/
|
|
5716
|
+
prepare_plain_entry_commit_facts_trim_refs(wall_time, logical, gid, next, entry_type, meta_data, payload_data, trim_length_to) {
|
|
5717
|
+
const ptr0 = passStringToWasm0(gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5718
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5719
|
+
const ret = wasm.nativepeerbitbackbone_prepare_plain_entry_commit_facts_trim_refs(this.__wbg_ptr, wall_time, logical, ptr0, len0, next, entry_type, meta_data, payload_data, trim_length_to);
|
|
5720
|
+
if (ret[2]) {
|
|
5721
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5722
|
+
}
|
|
5723
|
+
return takeFromExternrefTable0(ret[0]);
|
|
5724
|
+
}
|
|
5633
5725
|
/**
|
|
5634
5726
|
* @param {bigint} wall_time
|
|
5635
5727
|
* @param {number} logical
|
|
@@ -5657,6 +5749,35 @@ export class NativePeerbitBackbone {
|
|
|
5657
5749
|
}
|
|
5658
5750
|
return takeFromExternrefTable0(ret[0]);
|
|
5659
5751
|
}
|
|
5752
|
+
/**
|
|
5753
|
+
* Cached-plan counterpart to
|
|
5754
|
+
* `prepare_plain_entry_commit_latest_facts_document_index_trim_refs`.
|
|
5755
|
+
* @param {bigint} wall_time
|
|
5756
|
+
* @param {number} logical
|
|
5757
|
+
* @param {string} fallback_gid
|
|
5758
|
+
* @param {number} entry_type
|
|
5759
|
+
* @param {any} meta_data
|
|
5760
|
+
* @param {Uint8Array} payload_data
|
|
5761
|
+
* @param {any} trim_length_to
|
|
5762
|
+
* @param {string} document_key
|
|
5763
|
+
* @param {number} document_byte_element_index_limit
|
|
5764
|
+
* @param {boolean} document_delete_trimmed_heads
|
|
5765
|
+
* @param {number} document_projection_plan_id
|
|
5766
|
+
* @param {any} document_projection_encoded_document
|
|
5767
|
+
* @param {any} document_projection_signer
|
|
5768
|
+
* @returns {Array<any>}
|
|
5769
|
+
*/
|
|
5770
|
+
prepare_plain_entry_commit_latest_facts_document_index_cached_plan_trim_refs(wall_time, logical, fallback_gid, entry_type, meta_data, payload_data, trim_length_to, document_key, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan_id, document_projection_encoded_document, document_projection_signer) {
|
|
5771
|
+
const ptr0 = passStringToWasm0(fallback_gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5772
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5773
|
+
const ptr1 = passStringToWasm0(document_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5774
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5775
|
+
const ret = wasm.nativepeerbitbackbone_prepare_plain_entry_commit_latest_facts_document_index_cached_plan_trim_refs(this.__wbg_ptr, wall_time, logical, ptr0, len0, entry_type, meta_data, payload_data, trim_length_to, ptr1, len1, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan_id, document_projection_encoded_document, document_projection_signer);
|
|
5776
|
+
if (ret[2]) {
|
|
5777
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5778
|
+
}
|
|
5779
|
+
return takeFromExternrefTable0(ret[0]);
|
|
5780
|
+
}
|
|
5660
5781
|
/**
|
|
5661
5782
|
* @param {bigint} wall_time
|
|
5662
5783
|
* @param {number} logical
|
|
@@ -5687,6 +5808,38 @@ export class NativePeerbitBackbone {
|
|
|
5687
5808
|
}
|
|
5688
5809
|
return takeFromExternrefTable0(ret[0]);
|
|
5689
5810
|
}
|
|
5811
|
+
/**
|
|
5812
|
+
* Additive trim-ref counterpart to the latest-context document-index
|
|
5813
|
+
* append. Gids are returned parallel to the existing trimmed hashes.
|
|
5814
|
+
* @param {bigint} wall_time
|
|
5815
|
+
* @param {number} logical
|
|
5816
|
+
* @param {string} fallback_gid
|
|
5817
|
+
* @param {number} entry_type
|
|
5818
|
+
* @param {any} meta_data
|
|
5819
|
+
* @param {Uint8Array} payload_data
|
|
5820
|
+
* @param {any} trim_length_to
|
|
5821
|
+
* @param {string} document_key
|
|
5822
|
+
* @param {Uint8Array} document_value_prefix_bytes
|
|
5823
|
+
* @param {number} document_byte_element_index_limit
|
|
5824
|
+
* @param {boolean} document_delete_trimmed_heads
|
|
5825
|
+
* @param {any} document_projection_plan
|
|
5826
|
+
* @param {any} document_projection_encoded_document
|
|
5827
|
+
* @param {any} document_projection_signer
|
|
5828
|
+
* @returns {Array<any>}
|
|
5829
|
+
*/
|
|
5830
|
+
prepare_plain_entry_commit_latest_facts_document_index_trim_refs(wall_time, logical, fallback_gid, entry_type, meta_data, payload_data, trim_length_to, document_key, document_value_prefix_bytes, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan, document_projection_encoded_document, document_projection_signer) {
|
|
5831
|
+
const ptr0 = passStringToWasm0(fallback_gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5832
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5833
|
+
const ptr1 = passStringToWasm0(document_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5834
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5835
|
+
const ptr2 = passArray8ToWasm0(document_value_prefix_bytes, wasm.__wbindgen_malloc);
|
|
5836
|
+
const len2 = WASM_VECTOR_LEN;
|
|
5837
|
+
const ret = wasm.nativepeerbitbackbone_prepare_plain_entry_commit_latest_facts_document_index_trim_refs(this.__wbg_ptr, wall_time, logical, ptr0, len0, entry_type, meta_data, payload_data, trim_length_to, ptr1, len1, ptr2, len2, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan, document_projection_encoded_document, document_projection_signer);
|
|
5838
|
+
if (ret[2]) {
|
|
5839
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5840
|
+
}
|
|
5841
|
+
return takeFromExternrefTable0(ret[0]);
|
|
5842
|
+
}
|
|
5690
5843
|
/**
|
|
5691
5844
|
* @param {bigint} wall_time
|
|
5692
5845
|
* @param {number} logical
|
|
@@ -5803,6 +5956,68 @@ export class NativePeerbitBackbone {
|
|
|
5803
5956
|
}
|
|
5804
5957
|
return takeFromExternrefTable0(ret[0]);
|
|
5805
5958
|
}
|
|
5959
|
+
/**
|
|
5960
|
+
* Additive trim-ref counterpart to the cached-plan compact append.
|
|
5961
|
+
* @param {bigint} wall_time
|
|
5962
|
+
* @param {number} logical
|
|
5963
|
+
* @param {string} gid
|
|
5964
|
+
* @param {number} entry_type
|
|
5965
|
+
* @param {any} meta_data
|
|
5966
|
+
* @param {Uint8Array} payload_data
|
|
5967
|
+
* @param {number} trim_length_to
|
|
5968
|
+
* @param {string} document_key
|
|
5969
|
+
* @param {string} document_existing_created
|
|
5970
|
+
* @param {number} document_byte_element_index_limit
|
|
5971
|
+
* @param {boolean} document_delete_trimmed_heads
|
|
5972
|
+
* @param {number} document_projection_plan_id
|
|
5973
|
+
* @param {any} document_projection_encoded_document
|
|
5974
|
+
* @param {any} document_projection_signer
|
|
5975
|
+
* @returns {Array<any>}
|
|
5976
|
+
*/
|
|
5977
|
+
prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact_trim_refs(wall_time, logical, gid, entry_type, meta_data, payload_data, trim_length_to, document_key, document_existing_created, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan_id, document_projection_encoded_document, document_projection_signer) {
|
|
5978
|
+
const ptr0 = passStringToWasm0(gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5979
|
+
const len0 = WASM_VECTOR_LEN;
|
|
5980
|
+
const ptr1 = passStringToWasm0(document_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5981
|
+
const len1 = WASM_VECTOR_LEN;
|
|
5982
|
+
const ptr2 = passStringToWasm0(document_existing_created, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
5983
|
+
const len2 = WASM_VECTOR_LEN;
|
|
5984
|
+
const ret = wasm.nativepeerbitbackbone_prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact_trim_refs(this.__wbg_ptr, wall_time, logical, ptr0, len0, entry_type, meta_data, payload_data, trim_length_to, ptr1, len1, ptr2, len2, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan_id, document_projection_encoded_document, document_projection_signer);
|
|
5985
|
+
if (ret[2]) {
|
|
5986
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
5987
|
+
}
|
|
5988
|
+
return takeFromExternrefTable0(ret[0]);
|
|
5989
|
+
}
|
|
5990
|
+
/**
|
|
5991
|
+
* Additive trim-ref counterpart to the cached-plan compact append that
|
|
5992
|
+
* reuses the plain payload bytes for the document-index put.
|
|
5993
|
+
* @param {bigint} wall_time
|
|
5994
|
+
* @param {number} logical
|
|
5995
|
+
* @param {string} gid
|
|
5996
|
+
* @param {number} entry_type
|
|
5997
|
+
* @param {any} meta_data
|
|
5998
|
+
* @param {Uint8Array} payload_data
|
|
5999
|
+
* @param {number} trim_length_to
|
|
6000
|
+
* @param {string} document_key
|
|
6001
|
+
* @param {string} document_existing_created
|
|
6002
|
+
* @param {number} document_byte_element_index_limit
|
|
6003
|
+
* @param {boolean} document_delete_trimmed_heads
|
|
6004
|
+
* @param {number} document_projection_plan_id
|
|
6005
|
+
* @param {any} document_projection_signer
|
|
6006
|
+
* @returns {Array<any>}
|
|
6007
|
+
*/
|
|
6008
|
+
prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact_trim_refs_plain_put_payload(wall_time, logical, gid, entry_type, meta_data, payload_data, trim_length_to, document_key, document_existing_created, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan_id, document_projection_signer) {
|
|
6009
|
+
const ptr0 = passStringToWasm0(gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6010
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6011
|
+
const ptr1 = passStringToWasm0(document_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6012
|
+
const len1 = WASM_VECTOR_LEN;
|
|
6013
|
+
const ptr2 = passStringToWasm0(document_existing_created, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6014
|
+
const len2 = WASM_VECTOR_LEN;
|
|
6015
|
+
const ret = wasm.nativepeerbitbackbone_prepare_plain_entry_commit_no_next_facts_document_index_cached_plan_compact_trim_refs_plain_put_payload(this.__wbg_ptr, wall_time, logical, ptr0, len0, entry_type, meta_data, payload_data, trim_length_to, ptr1, len1, ptr2, len2, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan_id, document_projection_signer);
|
|
6016
|
+
if (ret[2]) {
|
|
6017
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
6018
|
+
}
|
|
6019
|
+
return takeFromExternrefTable0(ret[0]);
|
|
6020
|
+
}
|
|
5806
6021
|
/**
|
|
5807
6022
|
* @param {bigint} wall_time
|
|
5808
6023
|
* @param {number} logical
|
|
@@ -5898,6 +6113,41 @@ export class NativePeerbitBackbone {
|
|
|
5898
6113
|
}
|
|
5899
6114
|
return takeFromExternrefTable0(ret[0]);
|
|
5900
6115
|
}
|
|
6116
|
+
/**
|
|
6117
|
+
* Additive trim-ref counterpart to the compact inline document-index
|
|
6118
|
+
* append. The hash-only export above retains its frozen row layout.
|
|
6119
|
+
* @param {bigint} wall_time
|
|
6120
|
+
* @param {number} logical
|
|
6121
|
+
* @param {string} gid
|
|
6122
|
+
* @param {number} entry_type
|
|
6123
|
+
* @param {any} meta_data
|
|
6124
|
+
* @param {Uint8Array} payload_data
|
|
6125
|
+
* @param {number} trim_length_to
|
|
6126
|
+
* @param {string} document_key
|
|
6127
|
+
* @param {Uint8Array} document_value_prefix_bytes
|
|
6128
|
+
* @param {string} document_existing_created
|
|
6129
|
+
* @param {number} document_byte_element_index_limit
|
|
6130
|
+
* @param {boolean} document_delete_trimmed_heads
|
|
6131
|
+
* @param {any} document_projection_plan
|
|
6132
|
+
* @param {any} document_projection_encoded_document
|
|
6133
|
+
* @param {any} document_projection_signer
|
|
6134
|
+
* @returns {Array<any>}
|
|
6135
|
+
*/
|
|
6136
|
+
prepare_plain_entry_commit_no_next_facts_document_index_compact_trim_refs(wall_time, logical, gid, entry_type, meta_data, payload_data, trim_length_to, document_key, document_value_prefix_bytes, document_existing_created, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan, document_projection_encoded_document, document_projection_signer) {
|
|
6137
|
+
const ptr0 = passStringToWasm0(gid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6138
|
+
const len0 = WASM_VECTOR_LEN;
|
|
6139
|
+
const ptr1 = passStringToWasm0(document_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6140
|
+
const len1 = WASM_VECTOR_LEN;
|
|
6141
|
+
const ptr2 = passArray8ToWasm0(document_value_prefix_bytes, wasm.__wbindgen_malloc);
|
|
6142
|
+
const len2 = WASM_VECTOR_LEN;
|
|
6143
|
+
const ptr3 = passStringToWasm0(document_existing_created, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
6144
|
+
const len3 = WASM_VECTOR_LEN;
|
|
6145
|
+
const ret = wasm.nativepeerbitbackbone_prepare_plain_entry_commit_no_next_facts_document_index_compact_trim_refs(this.__wbg_ptr, wall_time, logical, ptr0, len0, entry_type, meta_data, payload_data, trim_length_to, ptr1, len1, ptr2, len2, ptr3, len3, document_byte_element_index_limit, document_delete_trimmed_heads, document_projection_plan, document_projection_encoded_document, document_projection_signer);
|
|
6146
|
+
if (ret[2]) {
|
|
6147
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
6148
|
+
}
|
|
6149
|
+
return takeFromExternrefTable0(ret[0]);
|
|
6150
|
+
}
|
|
5901
6151
|
/**
|
|
5902
6152
|
* @param {bigint} wall_time
|
|
5903
6153
|
* @param {number} logical
|
|
@@ -6850,6 +7100,29 @@ export class NativeRangePlanner {
|
|
|
6850
7100
|
}
|
|
6851
7101
|
return takeFromExternrefTable0(ret[0]);
|
|
6852
7102
|
}
|
|
7103
|
+
/**
|
|
7104
|
+
* @param {number} replicas
|
|
7105
|
+
* @param {number} role_age_ms
|
|
7106
|
+
* @param {string} now
|
|
7107
|
+
* @param {any} peer_filter
|
|
7108
|
+
* @param {boolean} expand_peer_filter
|
|
7109
|
+
* @param {string} self_hash
|
|
7110
|
+
* @param {boolean} include_self
|
|
7111
|
+
* @param {boolean} full_replica_fallback
|
|
7112
|
+
* @param {boolean} include_strict_full_replica
|
|
7113
|
+
* @returns {any}
|
|
7114
|
+
*/
|
|
7115
|
+
get_routing_full_replica_leaders(replicas, role_age_ms, now, peer_filter, expand_peer_filter, self_hash, include_self, full_replica_fallback, include_strict_full_replica) {
|
|
7116
|
+
const ptr0 = passStringToWasm0(now, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7117
|
+
const len0 = WASM_VECTOR_LEN;
|
|
7118
|
+
const ptr1 = passStringToWasm0(self_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7119
|
+
const len1 = WASM_VECTOR_LEN;
|
|
7120
|
+
const ret = wasm.nativerangeplanner_get_routing_full_replica_leaders(this.__wbg_ptr, replicas, role_age_ms, ptr0, len0, peer_filter, expand_peer_filter, ptr1, len1, include_self, full_replica_fallback, include_strict_full_replica);
|
|
7121
|
+
if (ret[2]) {
|
|
7122
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
7123
|
+
}
|
|
7124
|
+
return takeFromExternrefTable0(ret[0]);
|
|
7125
|
+
}
|
|
6853
7126
|
/**
|
|
6854
7127
|
* @param {Array<any>} cursors
|
|
6855
7128
|
* @param {number} role_age_ms
|
|
@@ -6906,6 +7179,30 @@ export class NativeRangePlanner {
|
|
|
6906
7179
|
NativeRangePlannerFinalization.register(this, this.__wbg_ptr, this);
|
|
6907
7180
|
return this;
|
|
6908
7181
|
}
|
|
7182
|
+
/**
|
|
7183
|
+
* @param {Array<any>} gids
|
|
7184
|
+
* @param {Array<any>} replica_counts
|
|
7185
|
+
* @param {number} role_age_ms
|
|
7186
|
+
* @param {string} now
|
|
7187
|
+
* @param {any} peer_filter
|
|
7188
|
+
* @param {boolean} expand_peer_filter
|
|
7189
|
+
* @param {string} self_hash
|
|
7190
|
+
* @param {boolean} include_self
|
|
7191
|
+
* @param {boolean} full_replica_fallback
|
|
7192
|
+
* @param {boolean} include_strict_full_replica
|
|
7193
|
+
* @returns {Array<any>}
|
|
7194
|
+
*/
|
|
7195
|
+
plan_leader_samples_for_gids_batch(gids, replica_counts, role_age_ms, now, peer_filter, expand_peer_filter, self_hash, include_self, full_replica_fallback, include_strict_full_replica) {
|
|
7196
|
+
const ptr0 = passStringToWasm0(now, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7197
|
+
const len0 = WASM_VECTOR_LEN;
|
|
7198
|
+
const ptr1 = passStringToWasm0(self_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
7199
|
+
const len1 = WASM_VECTOR_LEN;
|
|
7200
|
+
const ret = wasm.nativerangeplanner_plan_leader_samples_for_gids_batch(this.__wbg_ptr, gids, replica_counts, role_age_ms, ptr0, len0, peer_filter, expand_peer_filter, ptr1, len1, include_self, full_replica_fallback, include_strict_full_replica);
|
|
7201
|
+
if (ret[2]) {
|
|
7202
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
7203
|
+
}
|
|
7204
|
+
return takeFromExternrefTable0(ret[0]);
|
|
7205
|
+
}
|
|
6909
7206
|
/**
|
|
6910
7207
|
* @param {string} gid
|
|
6911
7208
|
* @param {number} replicas
|
|
Binary file
|