Pudu programming language
Menu
API reference

Std.Db.Query.raw

1 declaration

fn

raw: Str -> &Array[Std.Db.Driver.Value] -> Std.Db.Query.Statement

This is a callable function.

What it does

A statement written out in full, with its values beside it.

The way out. A builder that cannot express something forces a way around

it, and the way around should keep values apart rather than abandoning the

property the builder exists for — so this takes the text and the values

separately, exactly as everything else here does. Anything the language can

say goes through here: window functions, recursive traversal, a call to a

function the database defines, a statement somebody tuned by hand.

The placeholders written in the text are read and held as parts, so a

statement written this way can still be put after another one and have its

numbering come out right. Written as text and left alone, $1 in the

second of two statements would still say $1 after the first had already

used it.

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