pub struct ArrowRegistration<'a> { /* private fields */ }Expand description
A scoped, owned Arrow source registered with chDB’s process-wide registry.
The reader and its C Stream stay alive until the registration is removed. Streaming queries borrow this handle mutably, so it cannot be closed or dropped while such a query is still being consumed. The raw registration methods remain available for callers managing C Data pointers themselves. Do not unregister its opaque name through another connection: core’s registry is process-wide and cannot guard against that external action.
Implementations§
Source§impl<'a> ArrowRegistration<'a>
impl<'a> ArrowRegistration<'a>
Sourcepub fn sql_expr(&self) -> String
pub fn sql_expr(&self) -> String
SQL table expression for this source, e.g. ArrowStream('...').
Sourcepub fn query(&self, sql: &str, format: OutputFormat) -> Result<QueryResult>
pub fn query(&self, sql: &str, format: OutputFormat) -> Result<QueryResult>
Run a synchronous query while the source remains registered.
Sourcepub fn query_arrow(&self, sql: &str) -> Result<ArrowReader>
pub fn query_arrow(&self, sql: &str) -> Result<ArrowReader>
Materialize an Arrow result while the source remains registered.
Sourcepub fn query_stream_arrow(&mut self, sql: &str) -> Result<ArrowQueryStream<'_>>
pub fn query_stream_arrow(&mut self, sql: &str) -> Result<ArrowQueryStream<'_>>
Run a lazy Arrow query. The registration cannot be dropped until this stream is consumed, cancelled, or dropped.
Sourcepub fn query_stream(
&mut self,
sql: &str,
format: OutputFormat,
) -> Result<QueryStream<'_>>
pub fn query_stream( &mut self, sql: &str, format: OutputFormat, ) -> Result<QueryStream<'_>>
Run a lazy text query under the same lifetime constraint.