module

Prostore::Query::Q

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))

Instance methods

all(*predicates : AST::Predicate) : AST::Predicate
Source
any(*predicates : AST::Predicate) : AST::Predicate
Source
eq(field : Symbol | String, value) : AST::Predicate
Source
gt(field : Symbol | String, value) : AST::Predicate
Source
gte(field : Symbol | String, value) : AST::Predicate
Source
in(field : Symbol | String, values : Array) : AST::Predicate
Source
like(field : Symbol | String, pattern : String) : AST::Predicate
Source
lt(field : Symbol | String, value) : AST::Predicate
Source
lte(field : Symbol | String, value) : AST::Predicate
Source
ne(field : Symbol | String, value) : AST::Predicate
Source
not(predicate : AST::Predicate) : AST::Predicate
Source
not_null?(field : Symbol | String) : AST::Predicate
Source
null?(field : Symbol | String) : AST::Predicate
Source