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.
Applications may encounter incompatibilities when using advanced or obscure features of a driver or ORM with partial support. If you encounter problems, please .Note that tools with 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 |
|
| Sequelize | Full | |
| Knex.js | Full | |
| Prisma | Full |
|
| TypeORM | Full | |
Python
| Driver/ORM Framework | Support level | Example apps |
|---|
| psycopg2 | Full |
|
| psycopg3 | Full | |
| asyncpg | Partial | |
| SQLAlchemy | Full |
|
| Django | Full | |
| Driver/ORM Framework | Support level | Example apps |
|---|
| pgx | Full | |
| GORM | Full | |
| pq | Full | |
| upper/db | Full | |
Java
| Driver/ORM Framework | Support level | Example apps |
|---|
| JDBC | Full |
|
| Hibernate | Full |
|
| jOOQ | Full | |
Ruby
| Driver/ORM Framework | Support level | Example apps |
|---|
| pg | Full | |
| Active Record | Full | |
| Driver/ORM Framework | Support level | Example apps |
|---|
| Npgsql | Full | |
Rust
| Driver/ORM Framework | Support level | Example apps |
|---|
| Rust-Postgres | Partial | |
See also
Reference information:
Specific tasks: