Pudu programming language
Menu
API reference

Std.Db.Query.on

1 declaration

fn

on: &Std.Db.Query.Statement -> &Std.Db.Schema.Column[T] -> Std.Db.Schema.Comparison -> &T -> Std.Db.Query.Statement where T: Bindable

This is a callable function.

What it does

A condition on a column, with the column and the comparison both values.

This is the form worth using. The column is a name the compiler knows, so

the editor offers it and writing one that does not exist is refused where

it is written rather than when the statement runs. The value is checked

against what the column holds, so comparing text to a number does not

compile. And nothing here takes a name or an operator as text, so there is

no spelling for either to arrive wrong in.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Names inside [ ] are type arguments, such as the item type held by a collection.

Back to Std.Db.QuerySearch related declarations