Skip to content

connection: add multi-level namespace paths - #137

Merged
Xuanwo merged 3 commits into
mainfrom
xuanwo/namespace-path-management
Nov 22, 2026
Merged

Xuanwo merged 3 commits into
mainfrom
xuanwo/namespace-path-management

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 22, 2026

Copy link
Copy Markdown
Member

Refs #124

Adds the multi-level namespace-path slice of #124. One shared conversion turns a borrowed const char* const* plus length into the SDK's Vec<String>; additive C entry points use it for namespace and table management.

API

  • Internal namespace_path_from_c in src/connection.rs is the single parser (pub(crate)). Zero length is the root namespace; a positive length rejects a NULL array, NULL elements and invalid UTF-8; namespace component validation stays with the SDK.
  • Additive path entry points: namespace create/drop/list/describe, drop table, rename table, drop all tables.
  • lancedb_table_names_builder_namespace sets the path on the existing builder, preserving limit/start_after pagination and builder ownership.
  • LanceDBNamespaceDescription and lancedb_free_namespace_description pass through the SDK's optional properties and context maps, preserving absent versus empty.
  • Existing single-component entry points keep their ABI and semantics and now share the same conversion.

SDK-backed scope

All namespace and table operations call the pinned lancedb v0.42.0-beta.21 connection APIs. The binding adds no local namespace semantics. #125's create/open builders and #126 DML are unchanged.

Validation

  • cargo check --all-targets
  • C ABI check against the generated declarations for host LP64 and x86_64-pc-windows-msvc (157 functions, 28 structs, 5 shared enums, self-tests pass)
  • Strict C++ syntax check of the Catch2 suite
  • New Catch2 coverage for nested dir namespace create/list/describe/drop, table management paths, the TableNamesBuilder namespace setter, zero-length root spelling, and NULL/invalid path arguments

Hosted CI runs on this head.

Fixture added 3 commits November 22, 2026 07:05
Share one borrowed C namespace path conversion across the namespace
entry points, add multi-level namespace CRUD, list and describe APIs,
table management path variants, and the TableNamesBuilder namespace
setter. Older single-component entry points keep their behavior.
Clear the new path list and describe result slots and the error slot on
entry, and publish list and description results only after the complete
conversion. Cover sentinel slots on invalid arguments and SDK failures,
and document the pinned rename capability and omitted target namespace
behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant