pub type ClickHouse = Builder<ClickHouseDialect>;Expand description
A ClickHouse builder.
PHP: Utopia\Query\Builder\ClickHouse.
use utopia_query::Query;
use utopia_query::builder::ClickHouse;
let statement = ClickHouse::new()
.from("events", "")
.final_()
.sample(0.1)?
.prewhere([Query::equal("type", ["click"])])
.filter([Query::greater_than("count", 5)])
.build()?;
assert_eq!(
statement.query,
"SELECT * FROM `events` FINAL SAMPLE 0.1 PREWHERE `type` IN (?) WHERE `count` > ?"
);use Utopia\Query\Builder\ClickHouse;
use Utopia\Query\Query;
echo (new ClickHouse())
->from('events')
->final()
->sample(0.1)
->prewhere([Query::equal('type', ['click'])])
->filter([Query::greaterThan('count', 5)])
->build()->query, "\n";
// SELECT * FROM `events` FINAL SAMPLE 0.1 PREWHERE `type` IN (?) WHERE `count` > ?Aliased Type§
pub struct ClickHouse { /* private fields */ }Implementations§
Source§impl ClickHouse
impl ClickHouse
Sourcepub fn apply_named_typed_bindings(&self, statement: Statement) -> Statement
pub fn apply_named_typed_bindings(&self, statement: Statement) -> Statement
statement with its ? placeholders named and typed, when named bindings are on.
PHP: applyNamedTypedBindings().