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

/home/runner/work/rotor/rotor/src/cache.qz:51

def self.kind(v: Object?) -> Rotor::Kind

The kind of v.

/home/runner/work/rotor/rotor/src/cache.qz:92

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.

/home/runner/work/rotor/rotor/src/cache.qz:102

def self.hold?(guards: Array[Rotor::Guard], captures: Array[Object]) -> Bool

Whether the kinds guards saw are those of captures.

/home/runner/work/rotor/rotor/src/cache.qz:118

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.

/home/runner/work/rotor/rotor/src/cache.qz:124

def self.fill_sql(s: Rotor::Sql, captures: Array[Object]) -> Rotor::Sql

s filled (fill).

/home/runner/work/rotor/rotor/src/cache.qz:136

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.

/home/runner/work/rotor/rotor/src/cache.qz:148

def self.pattern(v: String, name: String) -> String

The LIKE pattern of s.name(v) (start_with? and the others): v escaped.

/home/runner/work/rotor/rotor/src/cache.qz:180

def self.to_float(s: Rotor::Sql, i: Int) -> Rotor::Sql

s (an Int's parameter or literal) as a Float.

/home/runner/work/rotor/rotor/src/cache.qz:190

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

/home/runner/work/rotor/rotor/src/cache.qz:201