Module query

Search:
Group by:

This module is a pruning of the db_common module that is in the standard library.

Types

SqlQuery = distinct string
An SQL query string.   Source Edit

Templates

template sql(query: string; args: varargs[string, `$`]): SqlQuery
Constructs a SqlQuery from the string query. This is supposed to be used as a raw-string-literal modifier:
sql"update user set counter = counter + 1"

or:

sql("update user set counter = counter + 1 where id = ?", "1")

If assertions are turned off, it does nothing. If assertions are turned on, later versions will check the string for valid syntax.

  Source Edit