MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / parse_binop

Function parse_binop

crates/sql-parser/src/parser/mod.rs:318–328  ·  view source on GitHub ↗

Parse a scalar binary operator

(op: BinaryOperator)

Source from the content-addressed store, hash-verified

316
317/// Parse a scalar binary operator
318pub(crate) fn parse_binop(op: BinaryOperator) -> SqlParseResult<BinOp> {
319 match op {
320 BinaryOperator::Eq => Ok(BinOp::Eq),
321 BinaryOperator::NotEq => Ok(BinOp::Ne),
322 BinaryOperator::Lt => Ok(BinOp::Lt),
323 BinaryOperator::LtEq => Ok(BinOp::Lte),
324 BinaryOperator::Gt => Ok(BinOp::Gt),
325 BinaryOperator::GtEq => Ok(BinOp::Gte),
326 _ => Err(SqlUnsupported::BinOp(op).into()),
327 }
328}
329
330/// Parse a literal expression
331pub(crate) fn parse_literal(value: Value) -> SqlParseResult<SqlLiteral> {

Callers 1

parse_exprFunction · 0.85

Calls 3

BinOpEnum · 0.85
OkFunction · 0.50
ErrFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…