Skip to content

Literal

Wyatt Greenway edited this page Dec 13, 2022 · 3 revisions

class Literal extends LiteralBase 📜

This literal type simply defines a pure "literal". It will represent any "raw" value you want to insert directly into any query. This can be useful for custom database operations, math, or anything else you need in "raw" form in the database.

Notes:

  • Caution should be taken if using this for values. Values defined by this literal won't ever be escaped.

method Literal::constructor(
    literal: any,
    options?: object,
): Literal
📜

Construct a pure vanilla "literal" for the underlying database.

Arguments:

  • literal: any

    The literal value you want to stringify for the underlying database query engine.

  • options?: object

    Connection, literal, and operation specific options.

Return value: Literal



Clone this wiki locally