pub fn log2<'a, V, E>(
expr: E,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Double, E::Nullable, E::Aggregate>Expand description
LOG2 - returns the base-2 logarithm of a number.
Available in SQLite when compiled with SQLITE_ENABLE_MATH_FUNCTIONS.
Returns a dialect-aware double type, preserves nullability.
ยงExample
use drizzle_core::expr::log2;
// SELECT LOG2(users.value)
let log_base_2 = log2(users.value);