Overview of drivers

This page describes the drivers that are supported for Spanner for GoogleSQL-dialect databases and PostgreSQL-dialect databases.

Google supports open-source 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.

You can also use the Spanner client libraries to access the Spanner API. For more information, see Spanner client libraries .

GoogleSQL drivers and ORMs

Feature database/sql GORM Spanner JDBC Hibernate Spring Data R2DBC * ADO.NET Entity Framework Active Record SQLAlchemy Django
Language
Go Go Java Java Java Java C# C# Ruby Python Python
Limitations
N/A View N/A View N/A N/A N/A 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 .

Supported drivers

Feature Spanner JDBC PostgreSQL JDBC pgx psycopg2 psycopg3 node-postgres Npgsql R2DBC ADBC
Language
Java Java Go Python Python Node.js .NET Java Python
Limitations
N/A View View View View View N/A N/A View

Supported ORMs

Feature Hibernate Spring Data GORM SQLAlchemy 2
Language
Java Java Go Python
Limitations
View View View View

Supported IDEs and SQL clients

The following tools can connect to PostgreSQL-dialect databases by using PGAdapter.

Tool Guide Notes
Setup guide Requires PGAdapter.
Setup guide Requires PGAdapter.
Setup guide Standard PostgreSQL command-line tool.

Other integrations

Tool Language Guide Notes
C / Extension Example Foreign Data Wrapper for PostgreSQL.
Python / Rust Example High-performance data loading library.
Java Example Database schema change management.
Create a Mobile Website
View Site in Mobile | Classic
Share by: