iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iceberg::SessionCatalog Class Referenceabstract

Factory interface for creating context-bound catalog views. More...

#include <session_catalog.h>

Inheritance diagram for iceberg::SessionCatalog:
iceberg::rest::RestCatalog

Public Member Functions

virtual std::string_view name () const =0
 Catalog name.
 
virtual Result< std::shared_ptr< Catalog > > AsCatalog ()=0
 Return a Catalog view bound to the catalog's default session.
 
virtual Result< std::shared_ptr< Catalog > > WithContext (SessionContext context)=0
 Return a Catalog view bound to the supplied session context.
 

Detailed Description

Factory interface for creating context-bound catalog views.

SessionCatalog is not a replacement for Catalog and does not duplicate table or namespace operations. It is a small root interface for catalogs that can bind the standard Catalog API to a SessionContext.

Call AsCatalog() for the catalog's default session, or WithContext() when the caller has an explicit session identity, properties, or credentials.

Member Function Documentation

◆ AsCatalog()

virtual Result< std::shared_ptr< Catalog > > iceberg::SessionCatalog::AsCatalog ( )
pure virtual

Return a Catalog view bound to the catalog's default session.

Implementations may cache and return the same default catalog view on repeated calls.

Implemented in iceberg::rest::RestCatalog.

◆ name()

virtual std::string_view iceberg::SessionCatalog::name ( ) const
pure virtual

Catalog name.

Implemented in iceberg::rest::RestCatalog.

◆ WithContext()

virtual Result< std::shared_ptr< Catalog > > iceberg::SessionCatalog::WithContext ( SessionContext  context)
pure virtual

Return a Catalog view bound to the supplied session context.

Implementations should reject invalid contexts, such as an empty SessionContext::session_id. Returned catalog views use the normal Catalog interface for all table and namespace operations.

Implemented in iceberg::rest::RestCatalog.


The documentation for this class was generated from the following files: