|
Lance C/C++ Bindings
C ABI and header-only C++ RAII wrappers for the Lance columnar data format
|
#include <lance/detail/declarations.hpp>
Public Member Functions | |
| Operation (LanceOperation *operation) | |
| Operation (Operation &&) noexcept=default | |
| Operation & | operator= (Operation &&) noexcept=default |
| Operation (const Operation &)=delete | |
| Operation & | operator= (const Operation &)=delete |
| OperationKind | kind () const |
| uint64_t | fragment_count () const |
| bool | preserves_nullability () const |
| uint64_t | append_fragment_count () const |
| Number of fragments in an Append operation. | |
| Fragment | append_fragment_at (size_t index) const |
| Clone one Append fragment as an independent detached fragment. | |
| uint64_t | restore_version () const |
| Target version of a Restore operation. | |
| uint32_t | reserve_fragments_count () const |
| Reserved fragment count of a ReserveFragments operation. | |
| uint64_t | update_bases_count () const |
| Number of new base paths in an UpdateBases operation. | |
| LanceBasePathView | update_bases_at (size_t index) const |
| std::vector< BasePath > | update_bases () const |
| New base paths cloned from an UpdateBases operation. | |
| uint64_t | overwrite_fragment_count () const |
| Number of fragments in an Overwrite operation. | |
| Fragment | overwrite_fragment_at (size_t index) const |
| Clone one Overwrite fragment as an independent detached fragment. | |
| LanceSchema | overwrite_schema () const |
| Clone the in-memory schema of an Overwrite operation. | |
| bool | has_config_upsert_values () const |
| uint64_t | config_upsert_count () const |
Number of config upsert entries. Native None reports 0. | |
| std::string | config_upsert_key_at (size_t index) const |
| Borrowed config upsert key by native iteration position. | |
| std::string | config_upsert_value_at (size_t index) const |
| Borrowed config upsert value by native iteration position. | |
| bool | has_initial_bases () const |
| uint64_t | initial_base_count () const |
Number of initial base paths. Native None reports 0. | |
| LanceBasePathView | initial_base_at (size_t index) const |
| std::vector< BasePath > | initial_bases () const |
| Initial base paths cloned from an Overwrite operation. | |
| uint64_t | merge_fragment_count () const |
| Number of fragments in a Merge operation. | |
| Fragment | merge_fragment_at (size_t index) const |
| Clone one Merge fragment as an independent detached fragment. | |
| LanceSchema | merge_schema () const |
| Clone the in-memory schema of a Merge operation. | |
| bool | merge_preserves_nullability () const |
Native preserves_nullability assertion from a Merge operation. | |
| LanceSchema | project_schema () const |
| Clone the in-memory schema of a Project operation. | |
| bool | clone_is_shallow () const |
| Shallow-clone flag of a Clone operation. | |
| std::optional< std::string > | clone_ref_name () const |
| Optional native reference name of a Clone operation. | |
| uint64_t | clone_ref_version () const |
| Native reference version of a Clone operation. | |
| std::string | clone_ref_path () const |
| Borrowed native reference path of a Clone operation. | |
| std::optional< std::string > | clone_branch_name () const |
| Optional native branch name of a Clone operation. | |
| std::optional< UpdateMap > | config_updates () const |
| Optional native config updates map from an UpdateConfig operation. | |
| std::optional< UpdateMap > | table_metadata_updates () const |
| Optional native table metadata updates map. | |
| std::optional< UpdateMap > | schema_metadata_updates () const |
| Optional native schema metadata updates map. | |
| std::map< int32_t, UpdateMap > | field_metadata_updates () const |
| Per-field native metadata update maps keyed by field ID. | |
| std::vector< IndexSegmentMetadata > | create_index_new () const |
| std::vector< IndexSegmentMetadata > | create_index_removed () const |
| Removed-index metadata cloned from a CreateIndex operation. | |
| uint64_t | data_replacement_count () const |
| Number of data replacement groups. | |
| DataReplacementGroup | data_replacement_at (size_t index) const |
| Clone one data replacement group. | |
| uint64_t | data_overlay_group_count () const |
| Number of data overlay groups. | |
| DataOverlayGroup | data_overlay_group_at (size_t index) const |
| Clone one data overlay group. | |
| uint64_t | delete_updated_fragment_count () const |
| Number of updated fragments in a Delete operation. | |
| std::string | delete_updated_fragment_metadata_json (size_t index) const |
Native Fragment metadata JSON for one updated Delete fragment. | |
| uint64_t | delete_deleted_fragment_count () const |
| Number of fully deleted fragment IDs in a Delete operation. | |
| uint64_t | delete_deleted_fragment_id (size_t index) const |
| One fully deleted fragment ID from a Delete operation. | |
| std::string | delete_predicate () const |
| Delete predicate captured by the native operation. | |
| uint64_t | removed_fragment_count () const |
| Number of removed fragment IDs in an Update operation. | |
| uint64_t | removed_fragment_id (size_t index) const |
| One removed fragment ID by position. | |
| uint64_t | updated_fragment_count () const |
| Number of updated fragments in an Update operation. | |
| Fragment | updated_fragment_at (size_t index) const |
| Clone one updated fragment as an independent snapshot. | |
| uint64_t | new_fragment_count () const |
| Number of new fragments in an Update operation. | |
| Fragment | new_fragment_at (size_t index) const |
| Clone one new fragment as an independent snapshot. | |
| uint64_t | fields_modified_count () const |
| Number of modified field IDs in an Update operation. | |
| uint32_t | fields_modified (size_t index) const |
| One modified field ID by position. | |
| uint64_t | compacted_sstable_count () const |
| Number of compacted SSTable entries in an Update operation. | |
| CompactedSsTable | compacted_sstable_at (size_t index) const |
| One compacted SSTable entry by position. | |
| uint64_t | fields_for_preserving_frag_bitmap_count () const |
| Number of preserved-fragment-bitmap field IDs in an Update operation. | |
| uint32_t | fields_for_preserving_frag_bitmap (size_t index) const |
| One preserved-fragment-bitmap field ID by position. | |
| std::optional< UpdateMode > | update_mode () const |
| Native update mode, distinguishing absent from both variants. | |
| std::optional< KeyExistenceFilter > | inserted_rows_filter () const |
| Cloned inserted-rows filter, or nullopt for native None. | |
| std::optional< UpdatedFragmentOffsets > | updated_fragment_offsets () const |
| std::optional< std::string > | update_mem_wal_dir_id () const |
| uint64_t | rewrite_group_count () const |
| Number of groups in a Rewrite operation. | |
| RewriteGroup | rewrite_group_at (size_t index) const |
| Clone one Rewrite group by position. | |
| uint64_t | rewritten_index_count () const |
| Number of rewritten indices in a Rewrite operation. | |
| RewrittenIndex | rewritten_index_at (size_t index) const |
| Clone one rewritten index by position. | |
| std::optional< IndexSegmentMetadata > | frag_reuse_index () const |
| Cloned in-memory fragment-reuse index, or nullopt for native None. | |
| uint64_t | update_mem_wal_state_compacted_sstable_count () const |
| Number of flushed generation markers in an UpdateMemWalState operation. | |
| CompactedSsTable | update_mem_wal_state_compacted_sstable_at (size_t index) const |
| Copy one flushed generation marker by position. | |
| std::string | update_mem_wal_state_dir_id () const |
| const LanceOperation * | c_handle () const |
Static Public Member Functions | |
| static Operation | make_overwrite (const LanceSchema &schema, const std::vector< const Fragment * > &fragments, std::optional< std::vector< std::pair< std::string, std::string > > > config_upsert_values=std::nullopt, std::optional< std::vector< BasePath > > initial_bases=std::nullopt) |
| static Operation | make_merge (const LanceSchema &schema, const std::vector< const Fragment * > &fragments, bool preserves_nullability=false) |
| static Operation | make_clone (bool is_shallow, std::optional< std::string > ref_name, uint64_t ref_version, std::string ref_path, std::optional< std::string > branch_name) |
| static Operation | make_update_config (const UpdateConfigOptions &options) |
| static Operation | make_append (const std::vector< const Fragment * > &fragments) |
| static Operation | make_restore (uint64_t version) |
| Construct an owned native Restore operation. | |
| static Operation | make_reserve_fragments (uint32_t num_fragments) |
| Construct an owned native ReserveFragments operation. | |
| static Operation | make_update_bases (const std::vector< BasePath > &new_bases) |
| static Operation | make_delete (const std::vector< const Fragment * > &updated_fragments, const std::vector< uint64_t > &deleted_fragment_ids, const std::string &predicate) |
| static Operation | make_create_index (const std::vector< const IndexSegmentMetadata * > &new_indices, const std::vector< const IndexSegmentMetadata * > &removed_indices) |
| static Operation | make_data_replacement (const std::vector< const DataReplacementGroup * > &replacements) |
| static Operation | make_data_overlay (const std::vector< const DataOverlayGroup * > &groups) |
| static Operation | make_project (const LanceSchema &schema, bool preserves_nullability=false) |
| static Operation | make_update (const UpdateOperationSpec &spec) |
| static Operation | make_rewrite (const std::vector< const RewriteGroup * > &groups, const std::vector< const RewrittenIndex * > &rewritten_indices, const IndexSegmentMetadata *frag_reuse_index=nullptr) |
| static Operation | make_update_mem_wal_state (const std::vector< CompactedSsTable > &compacted_sstables) |
| static Operation | make_update_mem_wal_state_with_dir_id (const std::vector< CompactedSsTable > &compacted_sstables, const std::string &dir_id) |
Owned native Operation snapshot. Move-only; closing the source Transaction does not invalidate this handle.
Definition at line 1112 of file declarations.hpp.
|
explicit |
|
defaultnoexcept |
|
delete |
| Fragment lance::Operation::append_fragment_at | ( | size_t | index | ) | const |
Clone one Append fragment as an independent detached fragment.
| uint64_t lance::Operation::append_fragment_count | ( | ) | const |
Number of fragments in an Append operation.
| const LanceOperation * lance::Operation::c_handle | ( | ) | const |
| std::optional< std::string > lance::Operation::clone_branch_name | ( | ) | const |
Optional native branch name of a Clone operation.
| bool lance::Operation::clone_is_shallow | ( | ) | const |
Shallow-clone flag of a Clone operation.
| std::optional< std::string > lance::Operation::clone_ref_name | ( | ) | const |
Optional native reference name of a Clone operation.
| std::string lance::Operation::clone_ref_path | ( | ) | const |
Borrowed native reference path of a Clone operation.
| uint64_t lance::Operation::clone_ref_version | ( | ) | const |
Native reference version of a Clone operation.
| CompactedSsTable lance::Operation::compacted_sstable_at | ( | size_t | index | ) | const |
One compacted SSTable entry by position.
| uint64_t lance::Operation::compacted_sstable_count | ( | ) | const |
Number of compacted SSTable entries in an Update operation.
| std::optional< UpdateMap > lance::Operation::config_updates | ( | ) | const |
Optional native config updates map from an UpdateConfig operation.
| uint64_t lance::Operation::config_upsert_count | ( | ) | const |
Number of config upsert entries. Native None reports 0.
| std::string lance::Operation::config_upsert_key_at | ( | size_t | index | ) | const |
Borrowed config upsert key by native iteration position.
| std::string lance::Operation::config_upsert_value_at | ( | size_t | index | ) | const |
Borrowed config upsert value by native iteration position.
| std::vector< IndexSegmentMetadata > lance::Operation::create_index_new | ( | ) | const |
New-index metadata cloned from a CreateIndex operation. Each returned value is independent of this operation handle.
| std::vector< IndexSegmentMetadata > lance::Operation::create_index_removed | ( | ) | const |
Removed-index metadata cloned from a CreateIndex operation.
| DataOverlayGroup lance::Operation::data_overlay_group_at | ( | size_t | index | ) | const |
Clone one data overlay group.
| uint64_t lance::Operation::data_overlay_group_count | ( | ) | const |
Number of data overlay groups.
| DataReplacementGroup lance::Operation::data_replacement_at | ( | size_t | index | ) | const |
Clone one data replacement group.
| uint64_t lance::Operation::data_replacement_count | ( | ) | const |
Number of data replacement groups.
| uint64_t lance::Operation::delete_deleted_fragment_count | ( | ) | const |
Number of fully deleted fragment IDs in a Delete operation.
| uint64_t lance::Operation::delete_deleted_fragment_id | ( | size_t | index | ) | const |
One fully deleted fragment ID from a Delete operation.
| std::string lance::Operation::delete_predicate | ( | ) | const |
Delete predicate captured by the native operation.
| uint64_t lance::Operation::delete_updated_fragment_count | ( | ) | const |
Number of updated fragments in a Delete operation.
| std::string lance::Operation::delete_updated_fragment_metadata_json | ( | size_t | index | ) | const |
Native Fragment metadata JSON for one updated Delete fragment.
| std::map< int32_t, UpdateMap > lance::Operation::field_metadata_updates | ( | ) | const |
Per-field native metadata update maps keyed by field ID.
| uint32_t lance::Operation::fields_for_preserving_frag_bitmap | ( | size_t | index | ) | const |
One preserved-fragment-bitmap field ID by position.
| uint64_t lance::Operation::fields_for_preserving_frag_bitmap_count | ( | ) | const |
Number of preserved-fragment-bitmap field IDs in an Update operation.
| uint32_t lance::Operation::fields_modified | ( | size_t | index | ) | const |
One modified field ID by position.
| uint64_t lance::Operation::fields_modified_count | ( | ) | const |
Number of modified field IDs in an Update operation.
| std::optional< IndexSegmentMetadata > lance::Operation::frag_reuse_index | ( | ) | const |
Cloned in-memory fragment-reuse index, or nullopt for native None.
| uint64_t lance::Operation::fragment_count | ( | ) | const |
Fragment count for Append/Overwrite. Other native variants throw LANCE_ERR_NOT_SUPPORTED until their typed wrappers are added.
| bool lance::Operation::has_config_upsert_values | ( | ) | const |
Whether the Overwrite operation carries native Some config upserts. Some(empty) is distinct from None.
| bool lance::Operation::has_initial_bases | ( | ) | const |
Whether the Overwrite operation carries native Some initial bases. Some(empty) is distinct from None.
| LanceBasePathView lance::Operation::initial_base_at | ( | size_t | index | ) | const |
Borrowed initial base path from an Overwrite operation. The strings remain valid until this operation handle is closed.
| uint64_t lance::Operation::initial_base_count | ( | ) | const |
Number of initial base paths. Native None reports 0.
| std::vector< BasePath > lance::Operation::initial_bases | ( | ) | const |
Initial base paths cloned from an Overwrite operation.
| std::optional< KeyExistenceFilter > lance::Operation::inserted_rows_filter | ( | ) | const |
Cloned inserted-rows filter, or nullopt for native None.
| OperationKind lance::Operation::kind | ( | ) | const |
|
static |
Construct an owned native Append operation. Fragment handles are borrowed and their complete native metadata is copied.
|
static |
Construct an owned native Clone operation. ref_name == std::nullopt maps to native None; an engaged empty string is Some(""). branch_name follows the same mapping. Native commit owns shallow publication and deep-clone rejection.
|
static |
Construct an owned native CreateIndex operation. Metadata handles are borrowed and their complete native values are copied. Native Operation::CreateIndex owns replacement, name and coverage semantics.
|
static |
Construct an owned native DataOverlay operation. Group handles are borrowed and cloned in input order. Native commit validation remains authoritative for fragment existence, coverage and layout.
|
static |
Construct an owned native DataReplacement operation. Group handles are borrowed and copied in input order. Native commit validation remains authoritative.
|
static |
Construct an owned native Delete operation. The fragment handles are borrowed and their complete native metadata is copied. Deleted IDs and the predicate are copied. Native commit validation remains authoritative.
|
static |
Construct an owned native Merge operation. fragments is the final native fragment list. preserves_nullability is stored unchanged as the caller's assertion; native commit owns schema-change and conflict validation.
|
static |
Construct an owned native Overwrite operation from a native schema and borrowed fragment handles. Fragment metadata is copied. Native commit assigns fresh fragment IDs and rejects fragments with deletion files. config_upsert_values == std::nullopt maps to native None; an engaged empty vector maps to Some(empty). initial_bases follows the same presence mapping.
|
static |
Construct an owned native Project operation from a native schema. preserves_nullability is stored unchanged as the caller's explicit assertion that the projection does not tighten nullability; conflict and rebase semantics belong to Lance core. The schema is cloned.
|
static |
Construct an owned native ReserveFragments operation.
|
static |
Construct an owned native Restore operation.
|
static |
Construct an owned native Rewrite operation. Groups and rewritten indices are cloned from their handles. frag_reuse_index may be null for native None. It is in-memory only, so an explicit protobuf round trip drops it.
|
static |
Construct an owned native Update operation. Fragment handles are borrowed and their complete native metadata is copied. Native commit validation owns schema coverage, conflict detection and row-version behavior; no policy is applied here.
|
static |
Construct an owned native UpdateBases operation. Native commit validation owns conflict detection and zero-ID allocation.
|
static |
Construct an owned native UpdateConfig operation. Every map is cloned; native commit applies replacement and incremental semantics.
|
static |
Construct an owned native UpdateMemWalState operation from flushed generation markers. Native merge-insert validation owns shard existence, generation ordering and atomicity.
|
static |
Construct an UpdateMemWalState operation for a specific MemWAL directory. Pass an empty dir_id for a legacy MemWAL. Native commit rejects a stale or removed identifier.
| Fragment lance::Operation::merge_fragment_at | ( | size_t | index | ) | const |
Clone one Merge fragment as an independent detached fragment.
| uint64_t lance::Operation::merge_fragment_count | ( | ) | const |
Number of fragments in a Merge operation.
| bool lance::Operation::merge_preserves_nullability | ( | ) | const |
Native preserves_nullability assertion from a Merge operation.
| LanceSchema lance::Operation::merge_schema | ( | ) | const |
Clone the in-memory schema of a Merge operation.
| Fragment lance::Operation::new_fragment_at | ( | size_t | index | ) | const |
Clone one new fragment as an independent snapshot.
| uint64_t lance::Operation::new_fragment_count | ( | ) | const |
Number of new fragments in an Update operation.
| Fragment lance::Operation::overwrite_fragment_at | ( | size_t | index | ) | const |
Clone one Overwrite fragment as an independent detached fragment.
| uint64_t lance::Operation::overwrite_fragment_count | ( | ) | const |
Number of fragments in an Overwrite operation.
| LanceSchema lance::Operation::overwrite_schema | ( | ) | const |
Clone the in-memory schema of an Overwrite operation.
| bool lance::Operation::preserves_nullability | ( | ) | const |
Native preserves_nullability assertion from a Merge or Project operation. Other kinds throw LANCE_ERR_NOT_SUPPORTED.
| LanceSchema lance::Operation::project_schema | ( | ) | const |
Clone the in-memory schema of a Project operation.
| uint64_t lance::Operation::removed_fragment_count | ( | ) | const |
Number of removed fragment IDs in an Update operation.
| uint64_t lance::Operation::removed_fragment_id | ( | size_t | index | ) | const |
One removed fragment ID by position.
| uint32_t lance::Operation::reserve_fragments_count | ( | ) | const |
Reserved fragment count of a ReserveFragments operation.
| uint64_t lance::Operation::restore_version | ( | ) | const |
Target version of a Restore operation.
| RewriteGroup lance::Operation::rewrite_group_at | ( | size_t | index | ) | const |
Clone one Rewrite group by position.
| uint64_t lance::Operation::rewrite_group_count | ( | ) | const |
Number of groups in a Rewrite operation.
| RewrittenIndex lance::Operation::rewritten_index_at | ( | size_t | index | ) | const |
Clone one rewritten index by position.
| uint64_t lance::Operation::rewritten_index_count | ( | ) | const |
Number of rewritten indices in a Rewrite operation.
| std::optional< UpdateMap > lance::Operation::schema_metadata_updates | ( | ) | const |
Optional native schema metadata updates map.
| std::optional< UpdateMap > lance::Operation::table_metadata_updates | ( | ) | const |
Optional native table metadata updates map.
| std::vector< BasePath > lance::Operation::update_bases | ( | ) | const |
New base paths cloned from an UpdateBases operation.
| LanceBasePathView lance::Operation::update_bases_at | ( | size_t | index | ) | const |
Borrowed new base path from an UpdateBases operation. The strings remain valid until this operation handle is closed.
| uint64_t lance::Operation::update_bases_count | ( | ) | const |
Number of new base paths in an UpdateBases operation.
| std::optional< std::string > lance::Operation::update_mem_wal_dir_id | ( | ) | const |
MemWAL directory identifier named by an Update operation, or nullopt for native None. An engaged empty string denotes a legacy MemWAL.
| CompactedSsTable lance::Operation::update_mem_wal_state_compacted_sstable_at | ( | size_t | index | ) | const |
Copy one flushed generation marker by position.
| uint64_t lance::Operation::update_mem_wal_state_compacted_sstable_count | ( | ) | const |
Number of flushed generation markers in an UpdateMemWalState operation.
| std::string lance::Operation::update_mem_wal_state_dir_id | ( | ) | const |
MemWAL directory identifier named by an UpdateMemWalState operation. An empty string denotes the legacy _mem_wal directory.
| std::optional< UpdateMode > lance::Operation::update_mode | ( | ) | const |
Native update mode, distinguishing absent from both variants.
| Fragment lance::Operation::updated_fragment_at | ( | size_t | index | ) | const |
Clone one updated fragment as an independent snapshot.
| uint64_t lance::Operation::updated_fragment_count | ( | ) | const |
Number of updated fragments in an Update operation.
| std::optional< UpdatedFragmentOffsets > lance::Operation::updated_fragment_offsets | ( | ) | const |
Cloned updated-fragment offsets, or nullopt for native None. A present but empty value is preserved.