Overview of drivers

Stay organized with collections Save and categorize content based on your preferences.

Google supports open-source Cloud Spanner drivers for several popular object-relational mapping libraries (ORMs) and frameworks. These drivers allow the use of Spanner databases through APIs defined by those frameworks.

The following tables list all the open-source ORMs and drivers that are supported for Spanner and the features that each one supports. There is one table for each supported SQL dialect.

Google Standard SQL drivers and ORMs

Feature database/sql Spanner JDBC Hibernate Spring Data R2DBC* Entity Framework Active Record SQLAlchemy Django NHibernate
Language Go Java Java Java Java C# Ruby Python Python C#
Statement hints
Mutations
Batch DML
Batch DDL
Stale reads
Interleaved tables
Partitioned DML
Session labeling
Request priority
JSON type
Request tagging
Google SQL dialect
PostgreSQL dialect
Limitations View View View View View View

* This column describes R2DBC when used specifically with Spring Data.
† Available only when sending literal SQL queries, by using the Spring Data @Query annotation.

PostgreSQL drivers and ORMs

All PostgreSQL drivers require the PGAdapter proxy to be running. For more information, see About PGAdapter.

Feature Spanner JDBC PostgreSQL JDBC pgx gorm psycopg2 node-postgres
Language Java Java Go Go Python Node.js
Statement hints
Mutations
Batch DML
Batch DDL
Stale reads
Interleaved tables
Partitioned DML
Session labeling
Request priority
Request tagging
Limitations View View View View View