pub struct ClickHouseExecutor { /* private fields */ }Expand description
ClickHouse column-store executor using the ClickHouse HTTP interface.
Implementations§
Source§impl ClickHouseExecutor
impl ClickHouseExecutor
Sourcepub fn new(config: ClickHouseConfig) -> Self
pub fn new(config: ClickHouseConfig) -> Self
Construct from config.
GAP 20 fix: the HTTP client is built once with configurable connect and
query timeouts. Credentials are sent as X-ClickHouse-* headers (not URL
query params that appear in access logs).
GAP 39: When UDB_CH_DEPLOY_MODE=cloud, the URL must use https://
and the client is built with .https_only(true) to prevent credential
leakage over plaintext HTTP.
pub fn kind(&self) -> BackendKind
pub fn name(&self) -> &str
Sourcepub fn from_env() -> Option<Self>
pub fn from_env() -> Option<Self>
Construct from environment variables. Returns None when
UDB_COLUMN_DSN / UDB_COLUMN_HTTP_URL are absent.
Sourcepub async fn select_rows(&self, sql: &str) -> Result<Vec<Json>, String>
pub async fn select_rows(&self, sql: &str) -> Result<Vec<Json>, String>
Execute a SELECT and return rows as a Vec<Json>.
Uses JSONCompact output format.
Sourcepub async fn execute_ddl(&self, sql: &str) -> Result<(), String>
pub async fn execute_ddl(&self, sql: &str) -> Result<(), String>
Execute a DDL or DML statement (no result rows expected).
Trait Implementations§
Source§impl BackendContextEnforcer for ClickHouseExecutor
impl BackendContextEnforcer for ClickHouseExecutor
Source§fn backend_label(&self) -> &str
fn backend_label(&self) -> &str
Backend label (canonical lowercase:
"postgres", "mysql", …).Source§fn enforce(&self, ctx: &AppliedContext) -> ContextEffect
fn enforce(&self, ctx: &AppliedContext) -> ContextEffect
Apply the context and report the effect. Implementations either
emit SQL session variables (SQL backends), prepend filter
fragments (document backends), or produce a key prefix (KV /
object stores). Read more
Source§impl BackendExecutor for ClickHouseExecutor
impl BackendExecutor for ClickHouseExecutor
Source§impl BackendHealth for ClickHouseExecutor
impl BackendHealth for ClickHouseExecutor
Source§impl Clone for ClickHouseExecutor
impl Clone for ClickHouseExecutor
Source§fn clone(&self) -> ClickHouseExecutor
fn clone(&self) -> ClickHouseExecutor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClickHouseExecutor
impl Debug for ClickHouseExecutor
Source§impl ObjectExecutor for ClickHouseExecutor
impl ObjectExecutor for ClickHouseExecutor
async fn get_object(&self, _request_json: &str) -> Result<Vec<u8>, Status>
async fn put_object( &self, _request_json: &str, _bytes: Vec<u8>, ) -> Result<String, Status>
async fn get_object_stream( &self, request_json: &str, ) -> Result<ExecutorByteStream, Status>
Source§async fn put_object_stream(
&self,
request_json: &str,
stream: ExecutorByteStream,
) -> Result<String, Status>
async fn put_object_stream( &self, request_json: &str, stream: ExecutorByteStream, ) -> Result<String, Status>
Streaming upload (A.6). The default collects the byte stream into one
buffer and delegates to
ObjectExecutor::put_object, so backends that
cannot stream keep working unchanged. Real object stores (S3/MinIO, …)
override this to forward bytes to the provider without buffering the
whole object in UDB.Source§impl QueryExecutor for ClickHouseExecutor
impl QueryExecutor for ClickHouseExecutor
Auto Trait Implementations§
impl !RefUnwindSafe for ClickHouseExecutor
impl !UnwindSafe for ClickHouseExecutor
impl Freeze for ClickHouseExecutor
impl Send for ClickHouseExecutor
impl Sync for ClickHouseExecutor
impl Unpin for ClickHouseExecutor
impl UnsafeUnpin for ClickHouseExecutor
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.