module
Prostore::Query::Q
Overview
Free-standing predicate constructors so users can build expressions
outside the named-arg where shorthand. The Builder also exposes
these as instance methods for use inside the with builder block
context emitted by the query macro.
User.where(Q.or(Q.eq(:status, "active"), Q.eq(:status, "pending")))
User.where(Q.gt(:score, 100))
User.where(Q.null?(:deleted_at))
Extended Modules
Defined in:
prostore/query/predicates.crInstance Method Summary
- #all(*predicates : AST::Predicate) : AST::Predicate
- #any(*predicates : AST::Predicate) : AST::Predicate
- #eq(field : Symbol | String, value) : AST::Predicate
- #gt(field : Symbol | String, value) : AST::Predicate
- #gte(field : Symbol | String, value) : AST::Predicate
- #in(field : Symbol | String, values : Array) : AST::Predicate
- #like(field : Symbol | String, pattern : String) : AST::Predicate
- #lt(field : Symbol | String, value) : AST::Predicate
- #lte(field : Symbol | String, value) : AST::Predicate
- #ne(field : Symbol | String, value) : AST::Predicate
- #not(predicate : AST::Predicate) : AST::Predicate
- #not_null?(field : Symbol | String) : AST::Predicate
- #null?(field : Symbol | String) : AST::Predicate