pub struct ExternalTable {
pub name: String,
pub data: Block,
}Expand description
External table for JOIN operations
External tables allow passing temporary in-memory data to queries for JOINs without creating actual tables in ClickHouse.
§Example
// Create a block with temporary data
let mut block = Block::new();
// ... populate block with data ...
// Create external table
let ext_table = ExternalTable {
name: "temp_table".to_string(),
data: block,
};
// Use in query with JOIN
let query = "SELECT * FROM my_table JOIN temp_table ON my_table.id = temp_table.id";
// client.select_with_external_data(query, vec![ext_table]).await?;Fields§
§name: StringName of the temporary table (used in SQL query)
data: BlockData block containing the table data
Implementations§
Trait Implementations§
Source§impl Clone for ExternalTable
impl Clone for ExternalTable
Source§fn clone(&self) -> ExternalTable
fn clone(&self) -> ExternalTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExternalTable
impl !RefUnwindSafe for ExternalTable
impl Send for ExternalTable
impl Sync for ExternalTable
impl Unpin for ExternalTable
impl !UnwindSafe for ExternalTable
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