module Rotor::Binds
The values of Binds, from a block's captures.
/home/runner/work/rotor/rotor/src/cache.qz:48
Class methods
def self.value(b: Rotor::Bind, captures: Array[Object]) -> Object?
The value b reads of captures (a model's column read as the
model reads it: Rotor::NotLoadedError when it was not fetched).
def self.kind(v: Object?) -> Rotor::Kind
The kind of v.
def self.item_class(xs: Array[Object?]) -> Type[Object]?
The class of an array's items but its nils: nil for none, Float
for Ints and Floats, Object for other mixtures.
def self.hold?(guards: Array[Rotor::Guard], captures: Array[Object]) -> Bool
Whether the kinds guards saw are those of captures.
def self.fill(pieces: Array[Rotor::Piece], captures: Array[Object]) -> Array[Rotor::Piece]
pieces with each Rotor::Piece::Bound piece the parameter of its value in
captures.
def self.fill_sql(s: Rotor::Sql, captures: Array[Object]) -> Rotor::Sql
s filled (fill).
def self.items(xs: Array[Object?]) -> Array[Int] | Array[Float] | Array[String] | Array[Bool] | Array[Time] | Array[Bytes] | Array[Symbol]
An array of one class's values (no nils) as a parameter: pg sends it as one PostgreSQL array.
def self.pattern(v: String, name: String) -> String
The LIKE pattern of s.name(v) (start_with? and the others):
v escaped.
def self.to_float(s: Rotor::Sql, i: Int) -> Rotor::Sql
def self.parameter(v: Object?) -> Int | Float | String | Bool | Time | Bytes | Symbol | Array[Int] | Array[Float] | Array[String] | Array[Bool] | Array[Time] | Array[Bytes] | Array[Symbol] | Nil
v as a statement's parameter: one of its classes (ArgumentError
for another; a value the guards admitted is one).