Skip to content

Reference ​

Every export of zapatos/db, the generated utility types, and every option of the generator: its signature, the SQL it writes, its effect on the type. Dry and complete, for looking things up.

  • SQL template

    sql is the tagged template every query in pgcast is built from, the shortcuts included.

  • Select

    The read shortcuts: select(), selectOne() and selectExactlyOne() for rows, count(), sum(), avg(), min() and max() for one number.

  • Writes

    The shortcuts that write: insert(), upsert(), update(), deletes() and truncate().

  • Conditions

    db.conditions holds the tests, comparisons and operators you give as the value of a Whereable's key, each a sql fragment with that column on its left.

  • Transactions

    transaction() and its seven shortcuts, one per isolation level: the SQL they send, their retries and the types of the client they give.

  • Configuration

    What zapatos/db lets you set while your code runs: setConfig() and each option of Config, the listeners, the opt-ins and their warning codes.

  • Generator

    The generator reads your database's catalog and writes the types of zapatos/schema.