pub struct ReplDataApi { /* private fields */ }Expand description
REPL data access API
Implementations§
Source§impl ReplDataApi
impl ReplDataApi
Sourcepub async fn new(
config: ReplDataConfig,
platform: Arc<Platform>,
core_config: Config,
schema_manager: Arc<SchemaManager>,
) -> Result<Self>
pub async fn new( config: ReplDataConfig, platform: Arc<Platform>, core_config: Config, schema_manager: Arc<SchemaManager>, ) -> Result<Self>
Create a new REPL data API
Sourcepub async fn initialize(&self, data_dir: &Path) -> Result<TableDiscovery>
pub async fn initialize(&self, data_dir: &Path) -> Result<TableDiscovery>
Initialize the API with a data directory
Sourcepub async fn use_keyspace(&self, keyspace: &str) -> Result<()>
pub async fn use_keyspace(&self, keyspace: &str) -> Result<()>
Set the current keyspace
Sourcepub async fn current_keyspace(&self) -> Option<String>
pub async fn current_keyspace(&self) -> Option<String>
Get the current keyspace
Sourcepub async fn select(
&self,
table: &str,
columns: Option<Vec<String>>,
where_clause: Option<String>,
limit: Option<usize>,
) -> Result<ReplQueryResult>
pub async fn select( &self, table: &str, columns: Option<Vec<String>>, where_clause: Option<String>, limit: Option<usize>, ) -> Result<ReplQueryResult>
Execute a SELECT query
Sourcepub async fn list_keyspaces(&self) -> Result<Vec<String>>
pub async fn list_keyspaces(&self) -> Result<Vec<String>>
List all available keyspaces
Sourcepub async fn list_tables(&self, keyspace: Option<&str>) -> Result<TableListing>
pub async fn list_tables(&self, keyspace: Option<&str>) -> Result<TableListing>
List tables in the current or specified keyspace
Sourcepub async fn describe_table(
&self,
table: &str,
keyspace: Option<&str>,
) -> Result<TableSchema>
pub async fn describe_table( &self, table: &str, keyspace: Option<&str>, ) -> Result<TableSchema>
Describe a table schema
Sourcepub async fn get_system_info(&self) -> Result<SystemInfo>
pub async fn get_system_info(&self) -> Result<SystemInfo>
Get system information and statistics
Sourcepub async fn update_context(&self, updates: QueryContextUpdate) -> Result<()>
pub async fn update_context(&self, updates: QueryContextUpdate) -> Result<()>
Update query context settings
Sourcepub async fn get_context(&self) -> QueryContext
pub async fn get_context(&self) -> QueryContext
Get current query context
Sourcepub async fn clear_caches(&self) -> Result<()>
pub async fn clear_caches(&self) -> Result<()>
Clear all caches
Auto Trait Implementations§
impl !RefUnwindSafe for ReplDataApi
impl !UnwindSafe for ReplDataApi
impl Freeze for ReplDataApi
impl Send for ReplDataApi
impl Sync for ReplDataApi
impl Unpin for ReplDataApi
impl UnsafeUnpin for ReplDataApi
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more