Dialects

dialect 是 SQLAlchemy 用于与各种类型的 DBAPI 实现和数据库通信的系统。 接下来的部分包含每个后端使用的参考文档和特定说明,以及各种 DBAPI 的说明。

所有 dialect 都需要安装适当的 DBAPI 驱动程序。

The dialect is the system SQLAlchemy uses to communicate with various types of DBAPI implementations and databases. The sections that follow contain reference documentation and notes specific to the usage of each backend, as well as notes for the various DBAPIs.

All dialects require that an appropriate DBAPI driver is installed.

已包含的 dialect

Included Dialects

已包含的 dialect 支持的版本

Supported versions for Included Dialects

下表总结了每种方言的支持级别。

The following table summarizes the support level for each included dialect.

Supported database versions for included dialects

Database

Supported version

Best effort

Microsoft SQL Server

2012+

2005+

MySQL / MariaDB

5.6+ / 10+

5.0.2+ / 5.0.2+

Oracle Database

11+

9+

PostgreSQL

9.6+

9+

SQLite

3.12+

3.7.16+

支持定义

Support Definitions

Supported version

支持的版本(Supported version) 表示大多数 SQLAlchemy 功能应适用于所提及的数据库版本。由于并非所有数据库版本都可在 ci 中测试,因此可能存在一些无法正常工作的极端情况。

Best effort

尽力而为(Best effort) 表示 SQLAlchemy 会尽力支持这些版本的基本功能,但很可能会出现不支持的功能或某些用例中的错误。可能会接受带有相关问题的拉取请求以继续支持旧版本,这些请求将根据具体情况进行审核。

External Dialects

目前维护的 SQLAlchemy 外部方言项目包括:

Currently maintained external dialect projects for SQLAlchemy include:

Database

Dialect

Actian Data Platform, Vector, Actian X, Ingres

sqlalchemy-ingres

Amazon Athena

pyathena

Amazon Redshift (via psycopg2)

sqlalchemy-redshift

Apache Drill

sqlalchemy-drill

Apache Druid

pydruid

Apache Hive and Presto

PyHive

Apache Solr

sqlalchemy-solr

Clickhouse

clickhouse-sqlalchemy

CockroachDB

sqlalchemy-cockroachdb

CrateDB

sqlalchemy-cratedb

Databend

databend-sqlalchemy

Databricks

databricks

EXASolution

sqlalchemy_exasol

Elasticsearch (readonly)

elasticsearch-dbapi

Firebird

sqlalchemy-firebird

Firebolt

firebolt-sqlalchemy

Google BigQuery

sqlalchemy-bigquery

Google Sheets

gsheets

Greenplum

sqlalchemy-greenplum

HyperSQL (hsqldb)

sqlalchemy-hsqldb

IBM DB2 and Informix

ibm-db-sa

IBM Netezza Performance Server [1]

nzalchemy

Impala

impyla

Kinetica

sqlalchemy-kinetica

Microsoft Access (via pyodbc)

sqlalchemy-access

Microsoft SQL Server (via python-tds)

sqlalchemy-pytds

Microsoft SQL Server (via turbodbc)

sqlalchemy-turbodbc

MonetDB

sqlalchemy-monetdb

OpenGauss

openGauss-sqlalchemy

Rockset

rockset-sqlalchemy

SAP ASE (fork of former Sybase dialect)

sqlalchemy-sybase

SAP Hana [1]

sqlalchemy-hana

SAP Sybase SQL Anywhere

sqlalchemy-sqlany

Snowflake

snowflake-sqlalchemy

Teradata Vantage

teradatasqlalchemy

TiDB

sqlalchemy-tidb

YDB

ydb-sqlalchemy

YugabyteDB

sqlalchemy-yugabytedb