Example Apps

Warning:
Cockroach Labs will stop providing Assistance Support for this version on November 18, 2022. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the Release Support Policy.

The examples in this section show you how to build simple applications using CockroachDB.

Click the links in the tables below to see simple but complete example applications for each supported language and library combination.

If you are looking to do a specific task such as connect to the database, insert data, or run multi-statement transactions, see this list of tasks.

Note:

Applications may encounter incompatibilities when using advanced or obscure features of a driver or ORM with beta-level support. If you encounter problems, please open an issue with details to help us make progress toward full support.

Note that tools with community-level support have been tested or developed by the CockroachDB community, but are not officially supported by Cockroach Labs. If you encounter problems with using these tools, please contact the maintainer of the tool with details.

JavaScript/TypeScript

Driver/ORM Framework Support level Example apps
node-postgres Full Simple CRUD
Sequelize Full Simple CRUD
Knex.js Full Simple CRUD
Prisma Full Simple CRUD
TypeORM Full Simple CRUD

Python

Driver/ORM Framework Support level Example apps
psycopg2 Full Simple CRUD
AWS Lambda
SQLAlchemy Full Simple CRUD
MovR-Flask (Global Web App)
Django Full Simple CRUD
PonyORM Full Simple CRUD

Go

Driver/ORM Framework Support level Example apps
pgx Full Simple CRUD
GORM Full Simple CRUD
pq Full Simple CRUD
upper/db Full Simple CRUD

Java

Driver/ORM Framework Support level Example apps
JDBC Full Simple CRUD
Roach Data (Spring Boot App)
Hibernate Full Simple CRUD
Roach Data (Spring Boot App)
jOOQ Full Simple CRUD

Ruby

Driver/ORM Framework Support level Example apps
pg Full Simple CRUD
ActiveRecord Full Simple CRUD

C#

Driver/ORM Framework Support level Example apps
Npgsql Beta Simple CRUD

Rust

Driver/ORM Framework Support level Example apps
Rust-Postgres Beta Simple CRUD

See also

Reference information:

Specific tasks:

YesYes NoNo