Examples for

CockroachDB

25 examples, in learning order. PostgreSQL's grammar and types, under its own name.

Seagull generates the same code for CockroachDB as for PostgreSQL, so most pages here show the PostgreSQL files, tested against CockroachDB.

Parameters
$1 or :name
RETURNING
Supported
Go code for
database/sql, pgx
Migrations
Built in (PostgreSQL)
Driver
pgx
All about the CockroachDB dialect

Getting started

4 examples

Types and nullability

4 examples

Dynamic queries

5 examples

Shaping results

5 examples

Writing data

3 examples

Connections and transactions

3 examples

Migrations and seeds

1 examples
Show 28 not available for CockroachDB

Some ideas belong to other engines, and some need a feature CockroachDB does not have. Each one says why, and where to read it instead.