data Rotor::Sql(pieces: Array[Rotor::Piece], prec: Int, column: Rotor::Column?, value: Int | Float | String | Bool | Time | Bytes | Symbol | Array[Int] | Array[Float] | Array[String] | Array[Bool] | Array[Time] | Array[Bytes] | Array[Symbol] | Nil, known: Bool, bind: Rotor::Bind?, nulls: String?, tri: String?, narrow: Bool, test: String?)

A translated expression: its pieces, its precedence (to parenthesize it where it is an operand), and what the translator knows of it: the column it is, or the value it has (known) when it is a literal or a capture, and then (bind) the capture it is made from. nulls names what makes it NULL where Quarz has nil (a nullable column, shown as written), tri what makes it NULL where Quarz has false: a comparison, include? or LIKE form of something that can be NULL, three-valued in SQL. A tri expression is kept where NULL acts as false (a condition, an operand of &&/||, a CASE WHEN's), and refused anywhere else. narrow marks what PostgreSQL types as an integer where Quarz has an Int: an Int literal, or a CASE of them. A column never is: rotor does not know the SQL type of a table it did not create, whose integer columns are left as they are (README, "Parameter types").

test names an && or || (as written) that tests the truthiness of an operand other than a Bool (email IS NOT NULL): right as a condition, but a Bool where Quarz has one of the operands, so refused as a value as tri is.

/home/runner/work/rotor/rotor/src/translate.qz:39

Methods

def to_h -> Hash[Symbol, Object]

The fields as a Hash, by name.

/home/runner/work/rotor/rotor/src/translate.qz:39

def with(*, pieces: Array[Rotor::Piece] = …, prec: Int = …, column: Rotor::Column? = …, value: Int | Float | String | Bool | Time | Bytes | Symbol | Array[Int] | Array[Float] | Array[String] | Array[Bool] | Array[Time] | Array[Bytes] | Array[Symbol] | Nil = …, known: Bool = …, bind: Rotor::Bind? = …, nulls: String? = …, tri: String? = …, narrow: Bool = …, test: String? = …) -> Rotor::Sql

A copy with the fields given replaced.

/home/runner/work/rotor/rotor/src/translate.qz:39

def pieces -> Array[Rotor::Piece]

/home/runner/work/rotor/rotor/src/translate.qz:39

def prec -> Int

/home/runner/work/rotor/rotor/src/translate.qz:39

def column -> Rotor::Column?

/home/runner/work/rotor/rotor/src/translate.qz:39

def value -> Int | Float | String | Bool | Time | Bytes | Symbol | Array[Int] | Array[Float] | Array[String] | Array[Bool] | Array[Time] | Array[Bytes] | Array[Symbol] | Nil

/home/runner/work/rotor/rotor/src/translate.qz:39

def known -> Bool

/home/runner/work/rotor/rotor/src/translate.qz:39

def bind -> Rotor::Bind?

/home/runner/work/rotor/rotor/src/translate.qz:39

def nulls -> String?

/home/runner/work/rotor/rotor/src/translate.qz:39

def tri -> String?

/home/runner/work/rotor/rotor/src/translate.qz:39

def narrow -> Bool

/home/runner/work/rotor/rotor/src/translate.qz:39

def test -> String?

/home/runner/work/rotor/rotor/src/translate.qz:39