1. dialects
prorm
  • prorm documentation
  • Known test gaps
  • Architecture
  • Core concepts
  • Database types & coverage
  • Getting started
  • Going further
  • compliance
    • Compliance
    • The security toolkit: `prorm audit`
    • Checklists by regulation
    • Declaring personal data
    • Evidence bundles
    • Evidence
    • Frameworks: `@Security`
    • Jurisdictions
    • Platform policies
    • Protecting data
    • The regulation dataset
    • Residency and cross-border transfers
    • Retention & integrity
    • Status
    • Subject rights
  • decorators
    • prorm with decorators
    • Models with decorators
    • Querying a decorated model
    • Relations with decorators
  • diagrams
    • Diagram generators
    • Chen diagram
    • Class diagram
    • Dependency diagram
    • ER diagram
    • Flow diagram
    • From your models to a diagram
    • Gantt diagram
    • Index diagram
    • Migration diagram
    • Model diagram
    • Package diagram
    • Crow’s-foot diagram
    • Schema documentation
    • Sequence diagram
    • State diagram
    • Tree diagram
  • dialects
    • SQL dialects
    • AlloyDB Dialect
    • AlloyDB Omni Dialect
    • Amazon Athena Dialect
    • Aurora DSQL Dialect
    • Amazon Aurora MySQL Dialect
    • Amazon Aurora PostgreSQL Dialect
    • Azure Database for MySQL Dialect
    • Azure Database for PostgreSQL Dialect
    • Azure SQL Database Dialect
    • Azure SQL Managed Instance Dialect
    • Google BigQuery Dialect
    • Citus Dialect
    • ClickHouse dialect
    • Cloud Authentication (`cloud-auth`)
    • Cloud SQL for SQL Server Dialect
    • Cloud SQL for MySQL Dialect
    • Cloud SQL for PostgreSQL Dialect
    • CockroachDB Dialect
    • Azure Cosmos DB for PostgreSQL Dialect
    • CrateDB Dialect
    • Cloudflare D1 Dialect
    • Databricks dialect
    • IBM Db2 Dialect
    • Dolt Dialect
    • Apache Doris Dialect
    • Druid Dialect
    • DuckDB Dialect
    • Exasol dialect
    • Microsoft Fabric Data Warehouse Dialect
    • Firebird Dialect
    • Greenplum Dialect
    • SAP HANA Dialect
    • MySQL HeatWave Dialect
    • Azure Data Explorer (Kusto) Dialect — T-SQL
    • MariaDB Dialect
    • Materialize Dialect
    • MonetDB Dialect
    • MotherDuck Dialect
    • Microsoft SQL Server Dialect
    • MySQL Dialect
    • Neon Dialect
    • OceanBase Dialect
    • openGauss Dialect
    • Oracle Dialect
    • Oracle Autonomous Database Dialect
    • ParadeDB Dialect
    • PolarDB Dialect
    • PostgreSQL Dialect
    • Presto Dialect
    • QuestDB Dialect
    • Aurora RDS Data API Dialect (`rdsdata`)
    • Amazon RDS for Db2 Dialect
    • Amazon RDS for MariaDB Dialect
    • Amazon RDS for SQL Server Dialect
    • Amazon RDS for MySQL Dialect
    • Amazon RDS for Oracle Dialect
    • Amazon RDS for PostgreSQL Dialect
    • Amazon Redshift
    • Amazon Redshift Data API Dialect
    • RisingWave Dialect
    • rqlite Dialect
    • SingleStore Dialect
    • Snowflake Dialect
    • Google Cloud Spanner Dialect
    • Spanner (PostgreSQL interface) Dialect
    • SQLite Dialect
    • StarRocks Dialect
    • Supabase Dialect
    • Azure Synapse Analytics (dedicated SQL pool)
    • Teradata Dialect
    • TiDB Dialect
    • TimescaleDB Dialect
    • Trino Dialect
    • Turso / libSQL Dialect
    • Vertica dialect
    • Vitess Dialect
    • Yellowbrick Dialect
    • YugabyteDB Dialect
  • guides
    • Access rules and behaviour profiles
    • ArangoDB (AQL)
    • Associations
    • Audit levels and escalation
    • Audit logging
    • In the browser
    • Bulk operations
    • Caching
    • Capabilities, tiers and team roles
    • CLI
    • Cloudflare
    • Compliance & data protection
    • Connection Pooling & Performance
    • Security in the console
    • Couchbase: structured N1QL queries
    • Data types
    • Decorators
    • Eager loading
    • Enums and constants
    • Error handling & error types
    • Extensions
    • External fields
    • Foreign data wrappers
    • Graph databases
    • Hooks & lifecycle events
    • Indexes & constraints
    • InfluxDB: structured Flux pipelines
    • klock-errors
    • klock — the `.klock` file
    • Local databases (`prorm db up`)
    • Structured log search — Splunk, Graylog, Papertrail, Sumo Logic
    • Logging
    • Grafana Loki: structured LogQL queries
    • MCP server
    • Migrate — the data transfer subsystem
    • Migrations & Schema Sync
    • Models from an existing database
    • Defining models
    • Multiple databases
    • OrientDB, Neptune and TigerGraph
    • Passwords
    • Importing a Prisma schema
    • Structured PromQL and MetricsQL
    • Query firewall
    • QueryInterface
    • Query operators reference
    • Query optimization
    • Composing find options with `pipe()` and `Q`
    • Query safety: the fail-closed WHERE guard
    • Querying
    • Raw Queries & Query Building
    • Read replicas
    • Schema diffing & migration generation
    • Views, triggers & other schema objects
    • Scopes & default scopes
    • Seeders
    • SPARQL / RDF triplestores
    • SQL constants
    • SQL features
    • SQL function builders
    • SQLite advanced features
    • StoreKey — a prod-orm database as the storage
    • Streaming results
    • Terraform
    • Transactions & Isolation Levels
    • Type mapping: legacy and modern
    • TypeScript types
    • Database users, roles & privileges
    • Validation & constraints
    • Virtual & Computed Fields
    • Writing docs
  • javascript
    • prorm in JavaScript
    • Models in JavaScript
    • Querying in JavaScript
    • Relations in JavaScript
  • runbooks
    • Operational runbooks
    • Connection failures
    • Credential rotation
    • Failover
    • Incident checklist
    • Deploying klock v2
    • Migration rollback
  • running-databases
    • Running databases in Docker
    • Running prorm under Bun in Docker
    • Running Cassandra in Docker with prorm
    • Running ClickHouse in Docker with prorm
    • Running CockroachDB in Docker with prorm
    • Running prorm under Deno in Docker
    • Running Elasticsearch in Docker with prorm
    • Running MariaDB in Docker with prorm
    • Running MongoDB in Docker with prorm
  • prorm control plane
    • Introduction
    • Authentication
    • Errors
    • Getting started
      • Service
        • Is it up
        • This description
    • Account
      • Sign-up and verification
        • Create an account
        • Exchange credentials for a token
        • Verify with the emailed code
        • Verify by clicking the emailed link
        • Name the parent or guardian
        • What a consent link is about
        • Give consent for a child's account
        • Ask the parent or guardian again
        • Send a new code and link
      • Family
        • Everyone this account is responsible for
        • One child, in detail
        • Turn a limit on or off
      • Profile
        • Who am I
        • Change the account
        • Every address on the account
        • Add an address
        • Confirm an address with the code mailed to it
        • Mail a fresh code to an unconfirmed address
        • Make an address primary
        • Remove an address
        • What this caller may do
    • Security
      • Sessions
        • Everywhere this account is signed in
        • Sign out everywhere else
        • Sign one out
        • A token for the CLI on a named machine
        • A token for the customer console, from the staff one
        • Park a sign-in for the CLI to collect
        • The CLI collecting its sign-in
        • The team's members' live sessions
        • Sign a member's session out
        • Sign an account out everywhere
        • Everywhere the account is signed in
        • Sign an account's session out
      • Single sign-on
        • Begin a single sign-on
        • The provider's return
        • Link the signed-in account to a team's provider
        • Which team an address signs in to
        • The team's single sign-on, as a member sees it
        • Set the team's OpenID Connect provider up, or change it
        • Remove the provider
        • The team's domain claims and the DNS record each needs
        • Prove a claimed domain
      • MFA and passwords
        • Start enrolling a second factor
        • Prove the app has it
        • Remove the second factor
        • Ask for a reset link
        • Set a new password with the emailed token
      • Klock
        • Open a device-bound klock session
        • Check in, for the next grant
        • Step up the session asking
        • Rotate the device key
        • Freeze a session
        • Unfreeze a session
        • A guest grant
        • The revocation feed
        • The published keyset
        • What this control plane supports
      • Devices
        • Your devices, or a team's
        • Approve a new device's pairing code
        • One device
        • Rename a device
        • Revoke a device
        • Suspend a device
        • Reinstate a suspended device
        • Wipe a device
        • Ask a device to rotate its key
        • The team's members' devices
        • Revoke a member's device
        • An account's devices
        • Revoke an account's device
        • Wipe an account's device
        • The device fleet
      • Access rules and behaviour
        • The access rules that bear on you
        • Add an access rule
        • This request, as the rules see it
        • One access rule
        • Remove an access rule
        • The behaviour profiles that bear on you
        • Add or change a behaviour profile
        • The profile presets
        • Your behaviour findings
        • Acknowledge a finding
        • One behaviour profile
        • Remove a behaviour profile
        • The team's access rules
        • Add a team access rule
        • Remove a team access rule
        • The team's behaviour profiles
        • Add or change a team behaviour profile
        • Remove a team behaviour profile
        • What the team's profiles caught
        • Acknowledge a team finding
      • Recovery and lockdown
        • Ask for a recovery link
        • Recover access with the emailed code
        • Is the account locked down
        • Lock the account down
        • Release a lockdown
        • Lock a member down
        • Release a member's lockdown
      • MCP tokens
        • Make a delegated token for one MCP client
        • The account's delegated tokens
        • Revoke a delegated token
        • What a delegated token may do now
        • Run one MCP tool with a delegated token
        • Run a device-signed MCP tool call relayed by the MCP Worker
      • Kerberos
        • Give the team its own Kerberos realm
        • The team's realm
        • Remove the team's realm
    • Logging and monitoring
      • Audit log
        • What has been done to the account
        • What has happened to this account
        • The account's audit trail
      • Operations
        • Everything that has been asked of this database
        • One, with its steps
        • Stop it
        • Put a failed one back in the queue
        • Every operation, across all accounts
      • Metrics and events
        • Every measurement, for a graph
        • Who did what to it
    • Billing
      • Plans and pricing
        • What the plans allow
        • The rate card
        • What one database would cost
        • What this account is paying for, itemised
      • Subscriptions and invoices
        • What this month's invoice will say
        • What this account is on
        • What it has been charged
        • Start a Stripe Checkout session
        • Open the customer portal
        • Stripe's events
        • Buy more connection pools
      • Team billing
        • The team's billing account
        • What the team has been charged
        • What this month's invoice will say
        • The team's cards
        • Add a card, through a Stripe-hosted setup session
        • Make a card the team's default
        • Remove a card
        • Start the team paying
        • Open the Stripe portal on the team's customer
        • Change the team's plan
        • Who receives the team's bills
        • How the team pays for transfers
    • Support
      • Support chat
        • My conversations
        • Start a conversation
        • Every support conversation, open first
        • A ticket for the socket
        • One conversation, with who is in it and who is connected
        • Rename a group; open or close a support conversation
        • The lines, oldest first
        • Say something
        • Add somebody
        • Mark read
    • Administration
      • Users
        • Every account
        • One account, with everything hanging off it
        • Grant or revoke admin
        • Verify an account by hand
        • Lock or unlock sign-in
        • Allow or hold provisioning
        • Send the verification mail again
        • Set the plan by hand
      • Platform
        • Every database and store, across all accounts
        • The counts worth putting on a dashboard
      • Staff and permissions
        • What kind of admin the caller is, and which scopes they hold
        • The admin presets
        • Every admin, and the scopes each resolves to
        • Make an account an admin of a kind
        • Change an admin's kind, or a custom admin's scopes
        • Revoke admin
      • Team administration
        • Every team, with its owner and size
        • One team in full — members with their accounts, and projects
        • Hand the team to another member
        • Put an account in the team, active at once
        • Change a member's role
        • Remove a member
      • Assumed identities
        • Assume an identity — act as a customer account
        • The identities the caller holds open
        • End an assumed identity
      • Support inbox
        • The platform's addresses
        • Add a platform address
        • One address, with its counts
        • Change an address's label, routing, or whether it accepts mail
        • Remove an address that holds no mail
        • Make, adopt or repair the address's routing rule
        • Every admin's personal address, made where missing
        • File a raw message, as if it had arrived
        • The inbox
        • One message, whole
        • Mark a message
        • Hand a message to an admin, or take it back
        • Leave an internal note
        • Reply, from the address the message came to
        • What is waiting
    • Databases
      • Databases
        • Data stores
          • Every data store on the account
          • Provision a data store
          • Change a data store that is already running
          • One data store
          • Deprovision it
          • Report what it is using
          • How to reach a data store
        • Connections and credentials
          • The api keys on a database
          • Issue a key
          • Revoke a key
          • The engine users we created
          • Create a user inside the database
          • Give a user a new password
          • Drop a user
          • How the database is reached
          • Set how it is reached
          • Revoke every api key on it
          • How to connect to it
          • The ssh keys that open its bastion
          • Add a key, or have one made
          • The private half of a generated key, once
          • Revoke an ssh key
        • Schema and objects
          • The SQL objects we put in it
          • Create one, and apply it
          • What is in the database, as the engine reports it
          • One table
          • What it would run, without running it
          • Redefine an object in place
          • Drop it
          • The extensions installed in it
        • Migrations
          • A plan compiled to statements, recording nothing
          • The migrations recorded for it
          • Record one
          • Apply everything recorded and not yet run
          • Apply everything pending, oldest version first
        • Lifecycle
          • Grow or shrink it
          • Stop it accepting connections
          • Start it again
          • Move it to another region
        • Backups and replicas
          • Take a backup
          • The backups it has
          • Restore one into it
          • What has been restored into it, and from where
          • Its read copies
          • Add one
        • Policies
          • The catalog
          • One policy
          • What this database is held to
          • Switch a policy on, or change its knobs
          • Switch it off
          • Mark the policies reviewed
          • Evaluate the periodic policies now
          • Who is behind a credential
        • Passwordless
          • The database's passwordless sessions
          • Issue a passwordless session (v1)
          • Revoke a passwordless session
          • Bind a session to a device key
          • Issue a v2 session for a host to bind
          • Redeem an enrolment ticket on the host
          • Check a passwordless credential
          • Run one described query under a passwordless credential
        • Database roles
          • The database's roles
          • Define a role
          • One role
          • Change what a role permits
          • Delete a role, and revoke every key granted it
          • Grant a role, which mints a key
          • Who holds a role
          • The api keys bound to a role
        • Pools
          • A database's connection pools, and how busy each is
          • Open another pool
          • Rename a pool or change its size
          • Close a pool
        • Data plane
          • Run a query against a database
          • Several statements, in order, over one connection
          • Is this database answering
          • What the proxy itself is holding
        • Transfers
          • The strategies this account's tier may use
          • Price a transfer without creating it
          • The account's transfer jobs, newest first
          • Create a transfer job
          • One job, and whether its certificate holds
          • Cancel an unfinished job
          • Start a created job, confirming its price
          • Report a job's status (the runner, or the owner's side of a local run)
        • Every database on the account
        • Provision a database
        • Change a database that is already running
        • One database
        • Deprovision it
        • Read or write it
        • Report what it is using
        • The engines this API will provision
        • Where a managed database can be put
    • Teams
      • Teams
        • Members
          • Who is on it
          • Invite somebody
          • Accept an invitation
          • Change somebody's role
          • Remove somebody
        • Projects
          • The projects a team runs
          • Start one
          • Rename a project, or move its environment
          • Delete a project
          • One project, and what is in it
          • Put a database or store in it
          • What is in a project
          • Take one out
        • The teams this account is on
        • Start one
        • The twelve roles, and what each may do
        • Rename a team
        • Close a team
        • One team
        • Hand the team to somebody else
        • Leave a team
    • Schemas
      • Error
      • ValidationErrors
      • Token
      • PolicyCategory
      • PolicySeverity
      • PolicyAction
      • PolicyTrigger
      • PolicyParam
      • Policy
      • PolicyCatalog
      • PolicyAssignment
      • PolicyOutcome
      • PolicyFiring
      • CredentialTrace
      • Relation
      • Restrictions
      • ChildSummary
      • SignupRequest
      • SigninRequest
      • UpdateMeRequest
      • User
      • Address
      • GeoPoint
      • D1Region
      • Usage
      • UsageReport
      • Resource
      • Database
      • DataStore
      • NewDatabase
      • NewDataStore
      • QueryRequest
      • DatabasePrivilege
      • ApiKey
      • DbUser
      • Access
      • AccessRequest
      • DatabaseObject
      • NewDatabaseObject
      • NewMigration
      • SchemaOperation
      • Migration
      • Operation
      • Session
      • AdminPowers
      • Admin
      • AuditEntry
      • TeamRole
      • Conversation
      • ChatMessage
      • TeamSso
      • Team
      • TeamMember
      • SshKey
      • ConnectionInfo
      • InboxAddress
      • InboxMailbox
      • InboxMessageSummary
      • InboxMessage
      • InboxNote
      • Page
      • Quote
      • Plan
      • ApiError
      • CapabilityRefusal
      • KlockErrorCode
      • PageWindow
      • SessionView
      • KlockStepUpRequest
      • KlockOpenRequest
      • KlockOpenedSession
      • UpdateMeResult
      • CapabilitiesView
      • SessionLimits
      • Device
      • DeviceListed
      • DeviceTeamRef
      • DeviceCommand
      • DeviceAuditLine
      • DeviceActionRequest
      • StaffActionRequest
      • ManagedSession
      • SessionRevoked
      • AccessRule
      • AccessRuleRequest
      • BehaviourProfile
      • BehaviourProfileRequest
      • BehaviourProfileSaved
      • BehaviourFinding
      • BehaviourFindingAck
      • StepUpProof
      • Removed
      • MemberLockdownRequest
      • McpClient
      • McpDelegatedView
      • McpToolCall
      • McpForwardRequest
      • PasswordlessScope
      • RoleScope
      • PasswordlessSession
      • PasswordlessTlsMaterial
      • PasswordlessKerberosMaterial
      • ServiceDeviceKeys
      • ServiceSession
      • DatabaseRole
      • TransferEndpoint
      • TransferJobRequest
      • TransferQuote
      • TransferStrategy
      • TransferJob
      • TransferJobAccess
      • Pool
      • PoolAllowance
      • BillingSubscription
      • Invoice
      • BillingContact
      • PaymentMethod
      • UpcomingCharges
      • TeamBilling
      • TeamKerberosRealm
      • TeamSsoDomain
      • TeamSsoResponse
      • StoreConnection
      • BatchFailure
      • ProxyStatus
  1. dialects

SQL dialects

A dialect is the one place that knows about a specific engine. It owns
identifier quoting, value escaping, how DDL is written, which clauses are
legal, and how pagination and locking are spelled — so the same model code and
the same FindOptions produce correct SQL for whichever engine you point at.
Each page below documents what that engine supports, where it diverges from the
others, and the SQL prorm actually emits for it. There are 77 dialects
(SQL_DIALECTS.length in src/dialect-names.ts), one page each, plus
cloud-auth, the shared authentication layer the managed
dialects use.

Choosing a dialect#

Start from where the data lives and what the workload is. The flowchart
names the dialect to pass as dialect; the table after it gives the
reasoning, and the capability matrix has the details.
Use caseRecommendedAlso considerWhat the code gives you
OLTP applicationPostgreSQLMySQL, MariaDB, SQL Server, OracleAtomic transactions with savepoints, row locks with SKIP LOCKED and NOWAIT, a native upsert, and RETURNING (OUTPUT INSERTED on SQL Server). PostgreSQL has the most WHERE operators (62).
Analytics / warehouseSnowflake, BigQueryClickHouse, Redshift, Databricks, DuckDB locallyMERGE upserts (ClickHouse: a plain INSERT) and window functions. lock is ignored on Snowflake, Redshift and ClickHouse and refused on BigQuery. BigQuery and ClickHouse have no multi-statement transactions.
Edge / serverlessCloudflare D1Turso, Neon, RDS Data APINo socket and no pool. On D1 and rqlite transaction() is not atomic, and requireAtomic refuses them.
EmbeddedSQLiteDuckDB for analyticsNo server to run. SQLite has savepoints and ON CONFLICT but no row locks, and lock is ignored.
Distributed SQLCockroachDBYugabyteDB, TiDB, Spanner, Citus, Vitess, Aurora DSQLMost speak PostgreSQL's or MySQL's grammar over a sharded store; Spanner has its own GoogleSQL and no savepoints. Aurora DSQL refuses SKIP LOCKED and NOWAIT.
Time seriesTimescaleDBQuestDBTimescaleDB is PostgreSQL, so it has all of the above. QuestDB has no savepoints and no row locks, and its upsert is a plain INSERT.
StreamingMaterializeRisingWaveNative materialized views. There is no upsert (refused) and no savepoints.
Managed cloudThe managed dialect for your providerSee Managed and cloud variantsThe engine's SQL, plus the provider's authentication (IAM, Entra ID, the Cloud SQL connector) and TLS defaults.
Pick the managed dialect (rdspostgres, azuresql, cloudsqlmysql and the
rest) over its base engine when you run on that provider. The SQL is the
same, but the managed dialect adds the provider's token authentication and
certificate handling.

Pick a dialect#

Every dialect, by the SQL family dialectFamily() (src/dialect-names.ts) puts it in. Each card names the npm driver the driver catalog records and the default port of the Quick start URL.

PostgreSQL family (33)#

PostgreSQL grammar, mostly over pg: the engine itself, its forks and extensions, and the managed services.
{icon:database} PostgreSQL — pg · port 5432
{icon:database} Firebird — pg · port 3050
{icon:database} CockroachDB — pg · port 26257
{icon:database} YugabyteDB — pg · port 5433
{icon:database} TimescaleDB — pg · port 5432
{icon:database} Greenplum — pg · port 5432
{icon:cloud} Amazon Redshift — pg · port 5439 · hosted
{icon:database} openGauss — pg · port 5432
{icon:database} Vertica — pg · port 5433
{icon:database} Exasol — pg · port 8563
{icon:database} Trino — pg · port 8080
{icon:database} CrateDB — pg · port 5432
{icon:database} QuestDB — pg · port 8812
{icon:cloud} Amazon Athena — @aws-sdk/client-athena · hosted
{icon:database} Materialize — pg · port 6875
{icon:database} RisingWave — pg · port 4566
{icon:database} Citus — pg · port 5432
{icon:cloud} AlloyDB — pg · port 5432 · hosted
{icon:cloud} Aurora DSQL — @aws-sdk/dsql-signer · hosted
{icon:cloud} Yellowbrick — pg · port 5432 · hosted
{icon:database} ParadeDB — pg · port 5432
{icon:database} Presto — no driver (fetch) · port 8080
{icon:cloud} Amazon RDS for PostgreSQL — pg · port 5432 · hosted
{icon:cloud} Amazon Aurora PostgreSQL — pg · port 5432 · hosted
{icon:cloud} Amazon Aurora (RDS Data API) — @aws-sdk/client-rds-data · hosted
{icon:cloud} Amazon Redshift (Data API) — @aws-sdk/client-redshift-data · hosted
{icon:cloud} Azure Database for PostgreSQL — pg · port 5432 · hosted
{icon:cloud} Azure Cosmos DB for PostgreSQL — pg · hosted
{icon:cloud} Cloud SQL for PostgreSQL — pg · hosted
{icon:database} Spanner (PostgreSQL interface) — pg
{icon:database} AlloyDB Omni — pg · port 5432
{icon:cloud} Neon — pg · port 5432 · hosted
{icon:cloud} Supabase — pg · port 6543 · hosted

MySQL family (17)#

MySQL grammar over mysql2 (MariaDB over mariadb): forks, distributed MySQL and the managed services.
{icon:database} MySQL — mysql2 · port 3306
{icon:database} MariaDB — mariadb · port 3306
{icon:database} TiDB — mysql2 · port 4000
{icon:database} SingleStore — mysql2 · port 3306
{icon:database} OceanBase — mysql2 · port 2881
{icon:cloud} PolarDB for MySQL — mysql2 · port 3306 · hosted
{icon:cloud} Databricks — mysql2 · hosted
{icon:database} Apache Doris — mysql2 · port 9030
{icon:database} StarRocks — mysql2 · port 9030
{icon:database} Vitess — mysql2 · port 15306
{icon:database} Dolt — mysql2 · port 3306
{icon:cloud} Amazon RDS for MySQL — mysql2 · port 3306 · hosted
{icon:cloud} Amazon Aurora MySQL — mysql2 · port 3306 · hosted
{icon:cloud} Amazon RDS for MariaDB — mariadb · port 3306 · hosted
{icon:cloud} Azure Database for MySQL — mysql2 · port 3306 · hosted
{icon:cloud} Cloud SQL for MySQL — mysql2 · hosted
{icon:cloud} MySQL HeatWave (OCI) — mysql2 · port 3306 · hosted

SQL Server family (8)#

T-SQL over mssql/tedious: SQL Server, its Azure and AWS editions, the warehouses and Kusto.
{icon:database} Microsoft SQL Server — mssql · port 1433
{icon:cloud} Azure Synapse Analytics — mssql · port 1433 · hosted
{icon:cloud} Microsoft Fabric Data Warehouse — mssql · hosted
{icon:cloud} Amazon RDS for SQL Server — mssql · port 1433 · hosted
{icon:cloud} Azure SQL Database — mssql · port 1433 · hosted
{icon:cloud} Azure SQL Managed Instance — mssql · port 1433 · hosted
{icon:cloud} Azure Data Explorer (Kusto) — no driver (fetch) · hosted
{icon:cloud} Cloud SQL for SQL Server — mssql · hosted

SQLite family (4)#

SQLite grammar: embedded, replicated over HTTP, or hosted.
{icon:database} SQLite — better-sqlite3
{icon:database} Turso / libSQL — @libsql/client
{icon:database} Cloudflare D1 — no driver (fetch)
{icon:database} rqlite — no driver (fetch) · port 4001

Standalone engines (15)#

Engines with a grammar and a class of their own, and their managed editions.
{icon:database} Oracle — oracledb · port 1521
{icon:database} IBM Db2 — ibm_db · port 50000
{icon:database} SAP HANA — hdb
{icon:database} ClickHouse — @clickhouse/client · port 8123
{icon:database} DuckDB — duckdb
{icon:cloud} Snowflake — snowflake-sdk · hosted
{icon:cloud} Google BigQuery — @google-cloud/bigquery · hosted
{icon:database} MotherDuck — duckdb
{icon:cloud} Teradata — teradatasql · port 1025 · hosted
{icon:database} MonetDB — monetdb · port 50000
{icon:database} Apache Druid — no driver (fetch) · port 8888
{icon:database} Google Cloud Spanner — @google-cloud/spanner
{icon:cloud} Amazon RDS for Oracle — oracledb · port 1521 · hosted
{icon:cloud} Amazon RDS for Db2 — ibm_db · port 50000 · hosted
{icon:cloud} Oracle Autonomous Database — oracledb · hosted

How to use these pages#

You do not need to read any of them to use the ORM. Come here when you want to
know whether an engine supports something, why a query looks different on it,
or what to expect when moving between two of them.
Three differences account for most surprises:
Pagination. LIMIT ... OFFSET on PostgreSQL and MySQL, OFFSET ... FETCH NEXT on MSSQL, Oracle and Snowflake. The dialect handles it, but the
generated SQL will not look the same.
Constraint enforcement. The analytical engines accept a primary key
declaration and then do not enforce it. Uniqueness is your problem there.
Transactions. Not every engine has them, and among those that do,
isolation defaults differ — and a few HTTP engines run each statement as its
own request (see the capability matrix).
Every page follows one shape: an overview with a property table (dialect name,
what it extends, driver, cloud SDK, default port, local runtime); a Quick
start
(install, connect, define a model, query); for the managed services, a
tab per way of logging in (password, AWS IAM, Microsoft Entra ID, the Cloud SQL
connector); Generated SQL for the Quick start's model, captured from the
dialect with its driver stubbed, with an alert wherever the engine refuses an
operation; then how to connect in depth, what differs from the parent dialect,
a capabilities table, limitations, and testing notes.

Dialect families#

Most dialects are subclasses. A dialect extends the base whose wire protocol
and grammar it shares and overrides only what differs, so a managed PostgreSQL
service inherits every PostgreSQL builder and changes only authentication and
what the provider takes away. The trees below are read from each class's
prototype chain (the script behind the capability matrix
constructs every entry of DIALECT_LOADERS and walks
Object.getPrototypeOf), not from prose.
The engines that extend PostgresDialect directly: they speak PostgreSQL's
grammar over the pg driver (Athena and Presto swap the transport) and
override DDL, upserts and pagination where the engine differs.
The rest of the PostgreSQL family: the managed PostgreSQL services, two
engines that reuse the PostgreSQL class for its SQL shape but have their own
lineage (SQL_DIALECT_LINEAGE marks Teradata and MonetDB as standalone), and
three classes that speak PostgreSQL's SQL without subclassing — CockroachDB
and Redshift are hand-written, and the RDS Data API dialect forwards its
builders to an inner PostgreSQL or MySQL dialect chosen by
dialectOptions.engine.
The MySQL family. MariaDBDialect is its own class (driver mariadb), though
its lineage is MySQL; everything else extends MySQLDialect and uses mysql2
(Databricks over HTTPS on port 443).
The SQL Server and SQLite families. Kusto and Druid reuse a builder for its
SQL shape only (Kusto's T-SQL subset is read-only; Druid SQL is ANSI planned by
Calcite); D1 wraps SQLiteDialect in a Proxy rather than subclassing it.
The standalone engines: each has its own grammar and its own class, and the
managed editions of Oracle, Db2 and DuckDB extend them.

Dialects per family#

dialectFamily() in src/dialect-names.ts names the root of each dialect's
lineage. Counted over SQL_DIALECTS (77 entries) by the same script:
Two in five dialects speak PostgreSQL's SQL; the fifteen standalone engines
are the warehouses and the enterprise databases with grammars of their own.

Capability matrix#

This is computed from the code, not copied from the pages. A scratch script
builds each of the 77 dialects through new Prorm({ dialect }), which goes
through DIALECT_LOADERS, with every driver and cloud SDK mocked and
query() stubbed. It then reads the values below:
Tx: whether prorm.transaction() starts at all. no means the
dialect's startTransaction() throws before anything is sent.
Savepoints / Atomic / Isolation: from capabilitiesOf(dialect) in
src/transaction-support.ts, which is the dialect's own
transactionCapabilities(). Isolation is the strongest ANSI level the
engine guarantees (≤ SER means every level up to SERIALIZABLE, and a
weaker request runs at least that strongly), plus any native levels
accepted as they are.
RETURNING / Upsert: what buildInsertQuery('users', …, { returning: ['id'] }) and buildUpsertQuery('users', { id, name }, { conflictFields: ['id'] }) emit. not emitted means the option is accepted and dropped,
and refused means the builder throws.
JSON operators: the WHERE forms that render through a model
findAll(): containment ({ meta: { [Op.contains]: { plan: 'pro' } } })
and a JSON path ({ meta: { [Op.json('$.plan')]: 'pro' } }). The cell
shows the SQL each form becomes, and — means both are refused with
UnsupportedWhereError.
Row locks: findAll({ lock }) with true, { skipLocked: true }
and { nowait: true }. A lock clause is emitted, ignored (the
SELECT is sent without one), or refused.
Window fns / CTEs: buildSelectQuery() with a rowNumber() attribute,
a cte entry, and a recursive: true entry, first with a column list and
then without one.
Views, Routines, Triggers, Sequences: from sqlObjectCapabilitiesOf(dialect)
in src/sql-objects/capabilities.ts. This is what createView,
createStoredProcedure, createTrigger and createSequence emit or
refuse. The view cell is how an existing view is replaced, then
whether materialized views are native or emulated.
PostgreSQL family (33)
DialectTxSavepointsAtomicIsolationRETURNINGUpsertJSON operatorsRow locksWindow fnsCTEsViews; materialized viewsRoutinesTriggersSequences
PostgreSQLyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Firebirdyesyesyes≤ SERRETURNINGUPDATE OR INSERT—FOR UPDATE WITH LOCK onlyyesrecursivedrop + create; no MV———
CockroachDByesyesyes≤ SERRETURNINGON CONFLICT@>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
YugabyteDByesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
TimescaleDByesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Greenplumyesyesyes≤ SERRETURNINGstaging table@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Amazon Redshiftyesnoyes≤ SERRETURNINGstaging table—ignoredyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
openGaussyesyesyes≤ SERRETURNINGON DUPLICATE KEY@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
Verticayesyesyes≤ SERnot emittedMERGE—FOR UPDATE onlyyesrecursivedrop + create; no MV———
Exasolyesnoyes≤ SERnot emittedMERGE—refusedyesrecursivedrop + create; no MV———
Trinoyesnoyes≤ SERnot emittedMERGE—refusedyesrecursivedrop + create; no MV———
CrateDByesnoyes≤ SERRETURNINGON CONFLICT—refusedyesrecursivedrop + create; no MV———
QuestDByesnoyes≤ SERnot emittedplain INSERT—refusedyesrecursivedrop + create; no MV———
Amazon Athenano———not emittedrefused—refusedyesrecursivedrop + create; no MV———
Materializeyesnoyes≤ SERRETURNINGrefused@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV native———
RisingWaveyesnoyes≤ SERRETURNINGrefused@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV native———
Citusyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
AlloyDByesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Aurora DSQLyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE onlyyesrecursivedrop + create; no MV———
Yellowbrickyesyesyes≤ SERrefusedrefused@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
ParadeDByesyesyes≤ SERRETURNINGON CONFLICT@>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Prestono———not emittedMERGE—refusedyesrecursivedrop + create; no MV———
Amazon RDS for PostgreSQLyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Amazon Aurora PostgreSQLyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Amazon Aurora (RDS Data API)yesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
Amazon Redshift (Data API)yesnono≤ SERRETURNINGstaging table—ignoredyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Azure Database for PostgreSQLyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Azure Cosmos DB for PostgreSQLyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Cloud SQL for PostgreSQLyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Spanner (PostgreSQL interface)yesnoyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
AlloyDB Omniyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Neonyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
Supabaseyesyesyes≤ SERRETURNINGON CONFLICT@>, #>>FOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV nativeprocedures, functionsyesyes
MySQL family (17)
DialectTxSavepointsAtomicIsolationRETURNINGUpsertJSON operatorsRow locksWindow fnsCTEsViews; materialized viewsRoutinesTriggersSequences
MySQLyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
MariaDByesyesyes≤ SERRETURNINGON DUPLICATE KEYJSON_CONTAINS, JSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyesyes
TiDByesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
SingleStoreyesnoyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
OceanBaseyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
PolarDB for MySQLyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
Databricksyesyesyes≤ SERnot emittedMERGEJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
Apache Dorisyesnoyes≤ SERrefusedrefusedJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
StarRocksyesnoyes≤ SERrefusedrefusedJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
Vitessyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursivedrop + create; no MV———
Doltyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTrefusedyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
Amazon RDS for MySQLyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
Amazon Aurora MySQLyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
Amazon RDS for MariaDByesyesyes≤ SERRETURNINGON DUPLICATE KEYJSON_CONTAINS, JSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyesyes
Azure Database for MySQLyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
Cloud SQL for MySQLyesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
MySQL HeatWave (OCI)yesyesyes≤ SERnot emittedON DUPLICATE KEYJSON_EXTRACTFOR UPDATE, SKIP LOCKED, NOWAITyesrecursiveOR REPLACE; MV emulated (procedure)procedures, functionsyes—
SQL Server family (8)
DialectTxSavepointsAtomicIsolationRETURNINGUpsertJSON operatorsRow locksWindow fnsCTEsViews; materialized viewsRoutinesTriggersSequences
Microsoft SQL Serveryesyesyes≤ SER + SNAPSHOTOUTPUT INSERTEDMERGEJSON_VALUEtable hints, READPAST, NOWAITyesrecursiveOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
Azure Synapse Analyticsyesnoyes≤ SER + SNAPSHOTrefusedMERGEJSON_VALUErefusedyesnon-recursive onlyOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
Microsoft Fabric Data Warehouseyesnoyes≤ SER + SNAPSHOTrefusedMERGEJSON_VALUErefusedyesnon-recursive onlyOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
Amazon RDS for SQL Serveryesyesyes≤ SER + SNAPSHOTOUTPUT INSERTEDMERGEJSON_VALUEtable hints, READPAST, NOWAITyesrecursiveOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
Azure SQL Databaseyesyesyes≤ SER + SNAPSHOTOUTPUT INSERTEDMERGEJSON_VALUEtable hints, READPAST, NOWAITyesrecursiveOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
Azure SQL Managed Instanceyesyesyes≤ SER + SNAPSHOTOUTPUT INSERTEDMERGEJSON_VALUEtable hints, READPAST, NOWAITyesrecursiveOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
Azure Data Explorer (Kusto)no———refusedrefusedJSON_VALUEtable hints, READPAST, NOWAITyesrecursiveOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
Cloud SQL for SQL Serveryesyesyes≤ SER + SNAPSHOTOUTPUT INSERTEDMERGEJSON_VALUEtable hints, READPAST, NOWAITyesrecursiveOR ALTER; MV emulated (indexedView)procedures, functionsyes (row-level lowered)yes
SQLite family (4)
DialectTxSavepointsAtomicIsolationRETURNINGUpsertJSON operatorsRow locksWindow fnsCTEsViews; materialized viewsRoutinesTriggersSequences
SQLiteyesyesyes≤ SERnot emittedON CONFLICTjson_each, json_extractignoredyesrecursivedrop + create; MV emulated (app)functions (driverUdf)yes—
Turso / libSQLyesyesyes≤ SERnot emittedON CONFLICTjson_each, json_extractignoredyesrecursivedrop + create; MV emulated (app)functions (driverUdf)yes—
Cloudflare D1yesnono≤ SERnot emittedON CONFLICTjson_each, json_extractignoredyesrecursivedrop + create; MV emulated (app)functions (driverUdf)yes—
rqliteyesnono≤ SERnot emittedON CONFLICTjson_each, json_extractignoredyesrecursivedrop + create; MV emulated (app)functions (driverUdf)yes—
Standalone engines (15)
DialectTxSavepointsAtomicIsolationRETURNINGUpsertJSON operatorsRow locksWindow fnsCTEsViews; materialized viewsRoutinesTriggersSequences
OracleyesyesyesRC, SER + READ ONLYRETURNING … INTOMERGE—FOR UPDATE, SKIP LOCKED, NOWAITyesrecursive (column list required)OR REPLACE; MV nativeprocedures, functionsyesyes
IBM Db2yesyesyes≤ SER + UR/CS/RS/RRFINAL TABLEMERGE—FOR UPDATE onlyyesrecursive (column list required)OR REPLACE; MV nativeprocedures, functionsyesyes
SAP HANAyesnoyes≤ SERrefusedMERGE—FOR UPDATE, NOWAIT onlyyesnon-recursive onlydrop + create; no MV———
ClickHouseno———not emittedplain INSERT—ignoredyesrecursive (no column list)OR REPLACE; MV nativefunctions (expressionOnly)——
DuckDByesnoyes≤ RRRETURNINGON CONFLICTlist_contains, json_extract_stringignoredyesrecursiveOR REPLACE; MV emulated (app)functions (macro)—yes
Snowflakeyesnoyes≤ RCnot emittedMERGE—ignoredyesrecursiveOR REPLACE; MV nativeprocedures, functions (expressionOnly)—yes
Google BigQueryno———refusedMERGE—refusedyesrecursiveOR REPLACE; MV nativeprocedures, functions (expressionOnly)——
MotherDuckyesnoyes≤ RRRETURNINGON CONFLICTlist_contains, json_extract_stringignoredyesrecursiveOR REPLACE; MV emulated (app)functions (macro)—yes
Teradatayesnoyes≤ SERrefusedMERGE—refusedyesrecursivedrop + create; no MV———
MonetDByesyesyes≤ SERrefusedMERGE—refusedyesrecursivedrop + create; no MV———
Apache Druidno———refusedrefusedjson_each, JSON_VALUEignoredyesrecursivedrop + create; no MV———
Google Cloud Spanneryesnoyes≤ SERnot emittedINSERT OR UPDATE—ignoredyesrecursive (no column list)drop + create; no MV———
Amazon RDS for OracleyesyesyesRC, SER + READ ONLYRETURNING … INTOMERGE—FOR UPDATE, SKIP LOCKED, NOWAITyesrecursive (column list required)OR REPLACE; MV nativeprocedures, functionsyesyes
Amazon RDS for Db2yesyesyes≤ SER + UR/CS/RS/RRFINAL TABLEMERGE—FOR UPDATE onlyyesrecursive (column list required)OR REPLACE; MV nativeprocedures, functionsyesyes
Oracle Autonomous DatabaseyesyesyesRC, SER + READ ONLYRETURNING … INTOMERGE—FOR UPDATE, SKIP LOCKED, NOWAITyesrecursive (column list required)OR REPLACE; MV nativeprocedures, functionsyesyes
Reading it:
Tx: no (ClickHouse, BigQuery, Athena, Presto, Druid, Kusto): the
transaction is refused before anything is sent. BigQuery groups statements
with runTransactionScript([...]) instead. See
Limitations at a glance.
Atomic: no (D1, rqlite, the Redshift Data API): transaction() runs
each statement as its own request, and requireAtomic: true refuses them.
D1 declares this itself (transactionCapabilities() in
src/dialects/d1/index.ts), so capabilitiesOf() on a D1 instance is
correct even though the instance reports name: 'sqlite'.
Upsert: staging table (Greenplum, Redshift, the Redshift Data API):
the builder creates a temporary table, deletes the matching rows, inserts
from the temporary table and drops it. plain INSERT (ClickHouse,
QuestDB) inserts without updating, and each page says what to do instead.
RETURNING: FINAL TABLE is Db2's SELECT … FROM FINAL TABLE (INSERT …).
RETURNING … INTO is Oracle's, with out-binds.
CTEs: Oracle and Db2 need a column list on a recursive CTE, while
ClickHouse and Spanner (GoogleSQL) refuse one. HANA, Synapse and Fabric
refuse recursive: true.
Kusto inherits SQL Server's rows for locks and SQL objects, because
sqlObjectFamilyOf('kusto') is mssql and the lock hint builder is
inherited. The Kusto dialect's own createView, createTrigger,
createSequence and createStoredProcedure refuse, and the engine is
read-only. Druid inherits the SQLite WHERE builder, so its containment
form is SQLite's json_each.
An engine that extends PostgresDialect without its procedural language
(Firebird, Vertica, Exasol, Trino, CrateDB, QuestDB, openGauss, Aurora
DSQL, …) has the ANSI SQL-object defaults. Views are allowed, and routines,
triggers and sequences are refused rather than emitted as SQL that fails.
The RDS Data API is deliberately the same, because its engine is chosen at
run time.
Column types and the WHERE builder (all 77)
getDataTypeSql({ key: 'JSON' }), getDataTypeSql({ key: 'VECTOR', dimensions: 3 })
(refused when the builder throws), and the number of operator keys in
whereSupportOf(dialect) (src/query-builders/expression-render.ts).
DialectJSON columnVECTOR(3) columnWHERE operator keys
PostgreSQLJSONVECTOR(3)62
FirebirdBLOB SUB_TYPE TEXTrefused46
CockroachDBJSONVECTOR(3)56
YugabyteDBJSONVECTOR(3)62
TimescaleDBJSONVECTOR(3)62
GreenplumJSONVECTOR(3)62
Amazon RedshiftSUPERrefused35
openGaussJSONVECTOR(3)62
VerticaLONG VARCHARrefused46
ExasolVARCHAR(2000000)refused46
TrinoJSONARRAY(REAL)46
CrateDBOBJECTFLOAT_VECTOR(3)46
QuestDBSTRINGrefused46
Amazon AthenaVARCHARARRAY(REAL)46
MaterializeJSONBrefused62
RisingWaveJSONBVECTOR(3)62
CitusJSONVECTOR(3)62
AlloyDBJSONVECTOR(3)62
Aurora DSQLJSONrefused62
YellowbrickJSONrefused62
ParadeDBJSONVECTOR(3)35
PrestoJSONARRAY(REAL)46
Amazon RDS for PostgreSQLJSONVECTOR(3)62
Amazon Aurora PostgreSQLJSONVECTOR(3)62
Amazon Aurora (RDS Data API)JSONVECTOR(3)62
Amazon Redshift (Data API)SUPERrefused35
Azure Database for PostgreSQLJSONVECTOR(3)62
Azure Cosmos DB for PostgreSQLJSONVECTOR(3)62
Cloud SQL for PostgreSQLJSONVECTOR(3)62
Spanner (PostgreSQL interface)jsonbrefused62
AlloyDB OmniJSONVECTOR(3)62
NeonJSONVECTOR(3)62
SupabaseJSONVECTOR(3)62
MySQLJSONVECTOR(3)28
MariaDBJSONVECTOR(3)37
TiDBJSONVECTOR(3)28
SingleStoreJSONVECTOR(3, F32)28
OceanBaseJSONVECTOR(3)28
PolarDB for MySQLJSONVECTOR(3)28
DatabricksSTRINGARRAY<FLOAT>28
Apache DorisJSONARRAY<FLOAT>28
StarRocksJSONARRAY<FLOAT>28
VitessJSONVECTOR(3)28
DoltJSONVECTOR(3)28
Amazon RDS for MySQLJSONVECTOR(3)28
Amazon Aurora MySQLJSONVECTOR(3)28
Amazon RDS for MariaDBJSONVECTOR(3)37
Azure Database for MySQLJSONVECTOR(3)28
Cloud SQL for MySQLJSONVECTOR(3)28
MySQL HeatWave (OCI)JSONVECTOR(3)28
Microsoft SQL ServerNVARCHAR(MAX)VECTOR(3)18
Azure Synapse AnalyticsNVARCHAR(MAX)refused18
Microsoft Fabric Data WarehouseVARCHAR(MAX)refused18
Amazon RDS for SQL ServerNVARCHAR(MAX)VECTOR(3)18
Azure SQL DatabaseNVARCHAR(MAX)VECTOR(3)18
Azure SQL Managed InstanceNVARCHAR(MAX)VECTOR(3)18
Azure Data Explorer (Kusto)NVARCHAR(MAX)VECTOR(3)18
Cloud SQL for SQL ServerNVARCHAR(MAX)VECTOR(3)18
SQLiteTEXTrefused32
Turso / libSQLTEXTF32_BLOB(3)32
Cloudflare D1TEXTrefused32
rqliteTEXTrefused32
OracleCLOBVECTOR(3, FLOAT32)34
IBM Db2CLOBVECTOR(3, FLOAT32)32
SAP HANANCLOBREAL_VECTOR(3)32
ClickHouseStringArray(Float32)38
DuckDBJSONFLOAT[3]39
SnowflakeVARIANTVECTOR(FLOAT, 3)38
Google BigQueryJSONARRAY<FLOAT64>38
MotherDuckJSONFLOAT[3]39
TeradataJSONrefused35
MonetDBJSONrefused35
Apache DruidCOMPLEX<json>VARCHAR32
Google Cloud SpannerJSONARRAY<FLOAT32>(vector_length=>3)32
Amazon RDS for OracleCLOBVECTOR(3, FLOAT32)34
Amazon RDS for Db2CLOBVECTOR(3, FLOAT32)32
Oracle Autonomous DatabaseCLOBVECTOR(3, FLOAT32)34

Same operation, eight dialects#

The same model calls, and the SQL each dialect hands its driver. Each block
was captured from the dialect with its driver mocked and query() stubbed
(the model layer inlines the values). Nothing on this page is written by
hand. The tabs are synced, so picking a dialect in one group switches all of
them.
The model is the same everywhere, except that ClickHouse and BigQuery have
no auto-increment, so id there is a plain allowNull: false key and the
inserts pass one.
import { DataTypes } from 'ts-prorm-orm';

const User = db.define(
  'User',
  {
    id: { type: DataTypes.INTEGER(), primaryKey: true, autoIncrement: true },
    email: { type: DataTypes.STRING(255), allowNull: false },
    name: { type: DataTypes.STRING(100) },
    meta: { type: DataTypes.JSON() },
    joinedAt: { type: DataTypes.DATE(), allowNull: false, defaultValue: 'CURRENT_TIMESTAMP' },
  },
  { timestamps: false },
);

Paging#

import { Op } from 'ts-prorm-orm';

await User.findAll({
  where: { name: { [Op.like]: 'A%' } },
  order: [['id', 'ASC']],
  limit: 20,
  offset: 40,
});

Upsert#

await User.upsert({ id: 1, email: 'ada@example.com', name: 'Ada Lovelace' });
upsert() also reads the row by its key before and after the statement.
Only the write is shown.
ClickHouse has no conflict clause, so this is a plain INSERT: it adds a row rather than updating the existing one.

RETURNING#

await User.create({ email: 'ada@example.com', name: 'Ada' }, { returning: ['id', 'joinedAt'] });
No row-returning clause here: returning is accepted and the statement is sent without it. Read the row back by its key.
No row-returning clause here: returning is accepted and the statement is sent without it. Read the row back by its key.
No row-returning clause here: returning is accepted and the statement is sent without it. Read the row back by its key.
[!CAUTION]
Refused before anything is sent: RETURNING on INSERT is not supported for the bigquery dialect.
No row-returning clause here: returning is accepted and the statement is sent without it. Read the row back by its key.

JSON query#

jsonExtract() renders a JSON path read in each engine's own spelling. Its
first argument is the dialect name, 'postgres' here and the tab's dialect in
each block.
import { jsonExtract } from 'ts-prorm-orm';

await User.findAll({ attributes: ['id', [jsonExtract('postgres', 'meta', 'plan'), 'plan']] });

Row lock#

await db.transaction(async (t) => {
  await User.findAll({ where: { id: 1 }, lock: { level: 'UPDATE', skipLocked: true }, transaction: t });
});
SQLite locks the whole database for a writer, so lock is ignored.
SQL Server spells row locks as table hints; READPAST is its SKIP LOCKED.
Snowflake has no row locks: the lock option is dropped and the SELECT runs unlocked inside the transaction.
[!CAUTION]
Refused before anything is sent: startTransaction() is not supported for the bigquery dialect.
[!CAUTION]
Refused before anything is sent: ClickHouse does not support multi-statement transactions (no BEGIN/COMMIT/ROLLBACK spanning multiple statements).

Timestamp default#

db.sync() for the model above. The 'CURRENT_TIMESTAMP' default reaches
the DDL as each engine's keyword, not as a quoted string.
[!WARNING]
Use the string 'CURRENT_TIMESTAMP' for a column default, as above. In
4.9.4, defaultValue: DataTypes.NOW only becomes a real default on
SQLite (and Turso, rqlite), SQL Server (and its RDS, Azure and Cloud SQL
editions) and Oracle (CURRENT_TIMESTAMP, GETDATE(), SYSTIMESTAMP). On PostgreSQL, MySQL, MariaDB, Db2, HANA, Snowflake,
BigQuery, ClickHouse, DuckDB and most of their managed editions, the
CREATE TABLE gets the quoted text DEFAULT '() => new NOW()'. On
Firebird, Greenplum, Vertica, SingleStore, Databricks and a few others,
createTable() throws a TypeError instead.

Limitations at a glance#

These are the refusals that most often decide between two engines. Each one
throws before any SQL is sent, so a refused operation fails
loudly instead of running with a different meaning. The
capability matrix has the rest.
[!CAUTION] No transactions
ClickHouse, BigQuery,
Athena and Presto refuse transaction(),
and so do Druid and Kusto. startTransaction()
throws, so a lock or a savepoint inside one is never reached. BigQuery can
still run one atomic script with runTransactionScript([sql, …]).
[!WARNING] Transactions that are not atomic
Cloudflare D1, rqlite and the
Redshift Data API run each statement in a
transaction() as its own request. A failure part-way leaves the earlier
statements applied, and a rollback cannot undo them. Pass
requireAtomic: true to refuse them. On D1, use its batch API for an
all-or-nothing unit.
[!WARNING] No upsert
upsert() throws on Apache Doris and
StarRocks (upsert is a table property: a unique or
primary key model), Materialize and
RisingWave (no ON CONFLICT), and
Yellowbrick (neither ON CONFLICT nor MERGE). It
also throws on Athena, Druid and
Kusto. On ClickHouse and
QuestDB it is a plain INSERT, which adds a row instead
of updating one.
[!IMPORTANT] No DDL or DML
Apache Druid has no CREATE TABLE, INSERT … VALUES,
UPDATE or DELETE. Data arrives by ingestion (buildInsertIngestion()
and submitIngestion()). The T-SQL that
Azure Data Explorer (Kusto) accepts is read-only: CREATE,
INSERT, UPDATE, DELETE, views, triggers, sequences and procedures
all throw. Both are for querying data loaded some other way.
[!NOTE] Generate-only: the connection is unverified
Firebird, Trino, Vertica,
Exasol and Databricks generate their
engine's SQL, but none of them overrides connect(). They connect with
their parent's driver (pg, or mysql2 for Databricks), which does not
speak the engine's own wire protocol. Use them to build SQL, and run it
with the engine's own client until a native driver lands.

Managed and cloud variants#

Each managed dialect extends its engine's dialect, so the SQL is the engine's.
What differs is how you authenticate and what TLS is required. Auth options
are set in dialectOptions (password is the top-level username /
password). The shared token, connector and certificate code is in
cloud-auth: AWS IAM,
Entra ID,
Cloud SQL / AlloyDB IAM,
the Cloud SQL connector and
TLS.
DialectEngine familyAuthenticationTLS
Amazon RDS for PostgreSQLPostgreSQLPassword; IAM (iamAuth, tokenProvider)Verified TLS for a token; caBundle or PRORM_RDS_CA_BUNDLE (RDS CA bundle)
Amazon Aurora PostgreSQLPostgreSQLAs RDS for PostgreSQL; the reader pool (routeReads) signs its own tokenAs RDS for PostgreSQL
Amazon RDS for MySQLMySQLPassword; IAM (iamAuth, tokenProvider)A token is refused without TLS; caBundle
Amazon Aurora MySQLMySQLAs RDS for MySQLAs RDS for MySQL
Amazon RDS for MariaDBMySQL (MariaDB)Password only; iamAuth and tokenProvider throwcaBundle for verified TLS
Amazon RDS for SQL ServerSQL ServerPassword onlyencrypt: true, verified against the RDS CA
Amazon RDS for OracleStandalone (Oracle)Password only; SYS / SYSTEM refusedOpt-in TCPS: tls: { port, walletLocation }
Amazon RDS for Db2Standalone (Db2)Password onlyOpt-in: tls: { port, caPath }
Amazon Aurora (RDS Data API)PostgreSQL or MySQL (engine)AWS SDK credentials plus secretArn; password refusedHTTPS only
Amazon RedshiftPostgreSQLPassword (iamRole is for COPY / UNLOAD only)ssl passed to pg
Amazon Redshift (Data API)PostgreSQLsecretArn, dbUser (cluster), or the IAM identityHTTPS only
Amazon AthenaPostgreSQL (Trino)AWS SDK credential chain or credentialsHTTPS only
Aurora DSQLPostgreSQLIAM token (default, @aws-sdk/dsql-signer) or tokenProviderVerified by default; ssl: false throws
Azure SQL DatabaseSQL ServerPassword; Entra ID (entra, tokenProvider)encrypt: true, certificate verified; Entra refused over unverified TLS
Azure SQL Managed InstanceSQL ServerAs Azure SQL DatabaseAs Azure SQL Database
Azure Database for PostgreSQLPostgreSQLPassword; Entra IDVerified by default; Entra needs verified ssl
Azure Database for MySQLMySQLPassword; Entra IDVerified by default
Azure Cosmos DB for PostgreSQLPostgreSQL (Citus)Password; Entra IDVerified by default; ssl: false refused
Azure Synapse AnalyticsSQL ServerPassword only (no Entra option in the dialect)encrypt: true with trustServerCertificate: true (unverified)
Microsoft Fabric Data WarehouseSQL ServerEntra ID only (authentication, entra, tokenProvider); no SQL loginsencrypt: true, certificate verified
Azure Data Explorer (Kusto)SQL Server (T-SQL subset)Entra ID only (credential, tokenProvider)HTTPS only
Cloud SQL for PostgreSQLPostgreSQLPassword; connector (cloudSql); IAM (cloudSql.iam, tokenProvider)Connector is mTLS; direct uses cloudSql.serverCa
Cloud SQL for MySQLMySQLAs Cloud SQL for PostgreSQLAs Cloud SQL for PostgreSQL
Cloud SQL for SQL ServerSQL ServerPassword plus the connector; IAM refusedConnector is mTLS; direct uses serverCa
AlloyDBPostgreSQLPassword; IAM (iam)IAM defaults to unverified TLS; tls: 'verify' to require your own ssl
Google Cloud SpannerStandalone (GoogleSQL)Application Default Credentials, keyFilename or credentialsgRPC to Google's API
Spanner (PostgreSQL interface)PostgreSQLThe PGAdapter sidecar authenticatesPlain pg to a local PGAdapter
Google BigQueryStandaloneApplication Default Credentials, keyFilename or credentialsGoogle's API over HTTPS
Oracle Autonomous DatabaseStandalone (Oracle)Password plus walletAlways TLS: wallet mTLS (port 1522) or wallet-less TLS
MySQL HeatWave (OCI)MySQLPassword onlyUnverified by default (self-signed); tlsCa or tls: 'verify'
PolarDB for MySQLMySQLPassword onlyssl passed to mysql2
NeonPostgreSQLPassword or connectionString; authToken on the HTTP transportVerified by default over TCP; sslmode=require over WebSocket / HTTP
SupabasePostgreSQLPassword only (postgres.<ref> on the pooler)Unverified by default; sslRootCert or tls: 'verify'
Turso / libSQLSQLiteauthTokenlibsql:// / https://
Cloudflare D1SQLiteWorker binding, or the HTTP API with accountId, databaseId and tokenHTTPS only
MotherDuckStandalone (DuckDB)token or motherduck_tokenHandled by the extension
SnowflakeStandalonePassword; key pair (privateKey, privateKeyPath); authenticatorThe SDK's HTTPS
DatabricksMySQL (generate-only)None beyond the inherited MySQL password; no token authNot verified against a live warehouse
YellowbrickPostgreSQLPassword onlyssl passed to pg
TeradataStandalonePassword plus logmech (TD2, LDAP, JWT, …)encryptdata; connectParams: { sslmode: 'VERIFY-FULL' }
PlanetScale (use Vitess)MySQLPassword; dialect: 'planetscale' is an alias for vitessTLS required; pass port 3306 and ssl

Drivers#

Every driver is an optional peer dependency, so install only the one your
dialect loads. The table is read from the
driver catalog. That file is
generated from the require() calls that load each driver, and
tests/cli-driver-catalog.test.ts fails if it drifts. prorm packages
asks which databases you use and prints one install command for all of them
(see the CLI guide).
Driver packageDialectsInstallOptional (features that need them)
pgPostgreSQL, Firebird, CockroachDB, YugabyteDB, TimescaleDB, Greenplum, Amazon Redshift, openGauss, Vertica, Exasol, Trino, CrateDB, QuestDB, Materialize, RisingWave, Citus, AlloyDB, Yellowbrick, ParadeDB, Amazon RDS for PostgreSQL, Amazon Aurora PostgreSQL, Azure Database for PostgreSQL, Azure Cosmos DB for PostgreSQL, Cloud SQL for PostgreSQL, Spanner (PostgreSQL interface), AlloyDB Omni, Neon, Supabasenpm install pg@aws-sdk/rds-signer, @azure/identity, @google-cloud/cloud-sql-connector, @neondatabase/serverless, google-auth-library, pg-copy-streams
mysql2MySQL, TiDB, SingleStore, OceanBase, PolarDB for MySQL, Databricks, Apache Doris, StarRocks, Vitess, Dolt, Amazon RDS for MySQL, Amazon Aurora MySQL, Azure Database for MySQL, Cloud SQL for MySQL, MySQL HeatWave (OCI)npm install mysql2@aws-sdk/rds-signer, @azure/identity, @google-cloud/cloud-sql-connector, google-auth-library
mssqlMicrosoft SQL Server, Azure Synapse Analytics, Microsoft Fabric Data Warehouse, Amazon RDS for SQL Server, Azure SQL Database, Azure SQL Managed Instance, Cloud SQL for SQL Servernpm install mssql@azure/identity, @google-cloud/cloud-sql-connector
nonePresto, Azure Data Explorer (Kusto), Cloudflare D1, rqlite, Apache Druid—@azure/identity
oracledbOracle, Amazon RDS for Oracle, Oracle Autonomous Databasenpm install oracledb—
mariadbMariaDB, Amazon RDS for MariaDBnpm install mariadb—
ibm_dbIBM Db2, Amazon RDS for Db2npm install ibm_db—
duckdbDuckDB, MotherDucknpm install duckdb—
@aws-sdk/client-athenaAmazon Athenanpm install @aws-sdk/client-athena—
@aws-sdk/dsql-signer (not a peer dependency)Aurora DSQLnpm install @aws-sdk/dsql-signer—
@aws-sdk/client-rds-dataAmazon Aurora (RDS Data API)npm install @aws-sdk/client-rds-data—
@aws-sdk/client-redshift-dataAmazon Redshift (Data API)npm install @aws-sdk/client-redshift-data—
better-sqlite3SQLitenpm install better-sqlite3—
@libsql/clientTurso / libSQLnpm install @libsql/client—
hdbSAP HANAnpm install hdb—
@clickhouse/clientClickHousenpm install @clickhouse/client—
snowflake-sdkSnowflakenpm install snowflake-sdk—
@google-cloud/bigqueryGoogle BigQuerynpm install @google-cloud/bigquery—
teradatasql (not a peer dependency)Teradatanpm install teradatasql—
monetdb (not a peer dependency)MonetDBnpm install monetdb—
@google-cloud/spannerGoogle Cloud Spannernpm install @google-cloud/spanner—
The five dialects with no driver talk HTTP with the global fetch. D1 inside
a Cloudflare Worker uses the Worker's binding instead and makes no request
of its own. Kusto loads @azure/identity only when you let it acquire the
Entra token itself. A package marked not a peer dependency is not
declared by ts-prorm-orm at all (the catalog's NOT_SHIPPED list), so npm
never offers it. Install it yourself.

Changes in 4.9#

The dialect behaviour that changed in 4.9.2, the 4.9 release. The
CHANGELOG has the full notes and the
upgrade steps, and Versions says which 4.9 patch to run
(4.9.4).
Savepoint capabilities match what nesting does. capabilitiesOf().savepoints
is now false on Redshift, SingleStore, Synapse, Fabric, Doris and
StarRocks. The savepoint builders refuse wherever the capabilities say so
(Materialize, RisingWave, Trino, CrateDB, QuestDB, Exasol, Teradata,
Spanner PG, Athena, Presto) instead of sending an inherited SAVEPOINT.
PostgreSQL-only SQL is refused on engines that extend the PostgreSQL
dialect without its grammar.
Firebird, Vertica, Exasol, Trino, QuestDB
and CrateDB throw UnsupportedWhereError for @>, &&, ?, range and
@@ operators. lock renders FOR UPDATE WITH LOCK on Firebird and
FOR UPDATE on Vertica, and is refused where the engine has no row locks.
CURRENT_TIMESTAMP defaults are keywords, not strings. The default is
emitted unquoted on Db2, HANA, Firebird, Greenplum, Vertica, Databricks and
Spanner, as now() on ClickHouse, and as CURRENT_TIMESTAMP() on BigQuery.
See the timestamp default tabs.
Foreign keys are table constraints on MySQL, MariaDB and TiDB. CREATE TABLE and ADD COLUMN emit FOREIGN KEY (…) REFERENCES …, so InnoDB
enforces them. Association onDelete / onUpdate now reach the DDL on
every engine.
PostgreSQL ENUM. Under the legacy type mapping, PostgreSQL and
CockroachDB ENUM() columns carry CHECK (col IN (…)).
DATE(p, true) keeps its zone (TIMESTAMPTZ(p)) across the PostgreSQL
family.
YugabyteDB, OceanBase and PolarDB map to SQL-object families. YugabyteDB
is now postgres (triggers, PL/pgSQL, sequences), and OceanBase and PolarDB
are mysql (triggers, procedures). They used to be unknown, which
refused all three.
[!IMPORTANT]
Tables created by an older release are not rewritten. They keep a quoted
'CURRENT_TIMESTAMP' default, a bare VARCHAR for ENUM, and on MySQL no
foreign keys. Migrate those columns and constraints yourself.
The pages, grouped by what the engine is for.

Relational (OLTP)#

The engines most applications start on. Full transactional SQL, and the dialects with the deepest feature coverage.
DialectWhat it is
PostgreSQLPostgreSQL is the ORM's most fully-featured dialect.
MySQLThe MySQL dialect targets MySQL 5.7 and 8.0+ servers (and compatible forks).
MariaDBThe MariaDB dialect provides first-class support for MariaDB servers.
SQLiteSQLite is an embedded, serverless, zero-configuration SQL database engine that stores an entire database (schema,…
OracleOracle Database is an enterprise-grade relational database. prorm talks to it through the oracledb driver.
Microsoft SQL ServerThe mssql dialect targets Microsoft SQL Server (and Azure SQL) through the mssql Node.js package, which uses the…
IBM Db2IBM Db2 (specifically Db2 for LUW — Linux/Unix/Windows) is IBM's flagship relational database.
FirebirdFirebird is a lightweight, open-source relational database derived from InterBase.
Turso / libSQLTurso is a hosted database service built on libSQL, an open-source fork of SQLite.
openGaussHuawei's fork of PostgreSQL 9.2. It has no ON CONFLICT — upserts use MySQL-shaped ON DUPLICATE KEY UPDATE.
DoltA SQL database with Git-style version control in its storage, speaking the MySQL protocol.

Warehouse / OLAP / columnar#

Column-oriented engines built for aggregate reads over large tables. Expect no transactions, weak or absent constraint enforcement, and mutations that are asynchronous and expensive — model your data as append-only.
DialectWhat it is
ClickHouseClickHouse is a columnar OLAP database built for real-time analytics over very large datasets — aggregations,…
DuckDBDuckDB is an embedded, in-process OLAP (analytical) database.
MotherDuckDuckDB in the cloud: the same engine reached through the motherduck extension.
Amazon RedshiftAmazon Redshift is a columnar, massively-parallel cloud data warehouse.
SnowflakeSnowflake is a cloud-native, columnar, analytical data warehouse.
VerticaReference documentation for the vertica dialect. Everything below is drawn from the dialect source…
GreenplumReference documentation for the greenplum SQL dialect.
ExasolExasol is an in-memory, column-oriented, massively-parallel (MPP) analytic database.
SAP HANAThe hana dialect targets SAP HANA — both on-premise HANA 2.0 and the continuously-delivered HANA Cloud editions.
DatabricksReference for the databricks SQL dialect (src/dialects/databricks/index.ts).
TrinoReference for the trino SQL dialect.
PrestoThe original Presto (PrestoDB): Trino's grammar with the older HTTP headers and no MERGE.
Google BigQueryBigQuery is Google's serverless warehouse: backtick quoting, ARRAY/STRUCT, unenforced key constraints, and partitioning and clustering in place of indexes.
Amazon AthenaAthena is Trino over S3 — query-only on Hive tables, row-level writes on Iceberg, and Hive DDL alongside Trino queries.
Azure Synapse AnalyticsSynapse dedicated SQL pools speak T-SQL but drop much of it: no OFFSET/FETCH, no OUTPUT, no enforced foreign keys, and distribution declared on CREATE TABLE.
Microsoft Fabric Data WarehouseT-SQL over TDS through the mssql driver, with Fabric's type subset and no OUTPUT.
TeradataTeradata Vantage: its own engine and driver, with the SQL shape the PostgreSQL builders already produce.
MonetDBAn independent column store whose SQL follows the standard closely enough to reuse the PostgreSQL builders.
YellowbrickAn MPP warehouse with a PostgreSQL-derived front end, over the pg driver.
Apache DorisA real-time MPP OLAP database speaking the MySQL protocol; upsert is a table property, not a clause.
StarRocksA real-time MPP OLAP database speaking the MySQL protocol, with its own index types.
Apache DruidRead-mostly real-time analytics, queried with Druid SQL over HTTP.

Distributed SQL / NewSQL#

Horizontally scalable engines that keep a SQL interface. They mostly speak PostgreSQL or MySQL wire protocols, but differ in transaction retries, schema-change behaviour and key distribution.
DialectWhat it is
CockroachDBCockroachDB is a distributed, horizontally-scalable SQL database that speaks the PostgreSQL wire protocol.
YugabyteDBYugabyteDB is a distributed SQL database whose YSQL API is forked from the PostgreSQL source.
TiDBTiDB is a distributed, MySQL-wire-protocol-compatible NewSQL database: it speaks the MySQL client/server protocol…
SingleStoreReference documentation for the singlestore dialect.
Google Cloud SpannerGoogle Cloud Spanner is a fully-managed, horizontally-scalable, strongly-consistent distributed SQL database.
Spanner (PostgreSQL interface)PostgreSQL syntax over Spanner's storage, type system and schema rules, through PGAdapter.
OceanBaseOceanBase in MySQL-compatible mode — port 2881 rather than 3306, tenanted usernames, and distributed table options.
PolarDB for MySQLAlibaba Cloud's PolarDB for MySQL, with read/write-split and parallel-query hints. Its PostgreSQL and X editions are not covered.
CitusThe PostgreSQL extension that shards a cluster of servers: distributed and reference tables from the coordinator.
VitessSharded MySQL behind vtgate: keyspaces, VSchema-aware DDL and sequences in place of AUTO_INCREMENT.
Aurora DSQLAWS's serverless, active-active distributed PostgreSQL: token-only authentication and a reduced DDL surface.

Specialised#

Engines aimed at one workload — time series, search-shaped analytics, or streaming.
DialectWhat it is
TimescaleDBReference for the timescaledb SQL dialect.
QuestDBReference for the questdb SQL dialect.
CrateDBCrateDB is a distributed SQL database built for search and analytics over large volumes of structured and…
ParadeDBPostgreSQL with pg_search: BM25 full-text search inside Postgres.
MaterializeA streaming database: sources, views and incrementally maintained materialized views, over the PostgreSQL protocol.
RisingWaveA streaming database with connector-backed tables and incrementally maintained materialized views, over the PostgreSQL protocol.

Serverless and HTTP#

Dialects with no socket and no pool: every statement is a request. D1,
rqlite and the Redshift Data API have no atomic multi-statement transactions.
The RDS Data API does, because it holds a server-side transaction id between
requests.
DialectWhat it is
Cloudflare D1SQLite run by Cloudflare, reached through a Worker binding or the HTTP API.
rqliteSQLite made highly available with Raft, driven over its HTTP API with the global fetch.
Amazon Aurora (RDS Data API)Aurora PostgreSQL or Aurora MySQL over HTTPS: no socket, no pool, and no database password in the client.
Amazon Redshift (Data API)Redshift's SQL over HTTPS, against a provisioned cluster or a Serverless workgroup.

Managed cloud services#

A provider's managed edition of an engine. Each extends that engine's dialect, so the SQL is the engine's; what changes is how you connect and authenticate, and what the provider takes away (usually superuser) or adds. The shared token, TLS and connector code is in cloud-auth.

AWS#

DialectWhat it is
Amazon RDS for PostgreSQLCommunity PostgreSQL run by AWS: password or IAM token authentication, the RDS CA bundle, and rds_superuser in place of a superuser.
Amazon Aurora PostgreSQLRDS for PostgreSQL's authentication and TLS, plus Aurora's cluster endpoints and replica routing.
Amazon RDS for MySQLMySQL Community run by AWS: IAM tokens, no SUPER, and the mysql.rds_* procedures.
Amazon Aurora MySQLRDS for MySQL's authentication and TLS, plus what Aurora MySQL adds on top.
Amazon RDS for MariaDBMariaDB run by AWS on 3306, through the mariadb driver.
Amazon RDS for SQL ServerSQL Server run by AWS: native backup and restore through msdb.dbo.rds_*, and no sysadmin.
Amazon RDS for OracleOracle Database run by AWS, administered through the rdsadmin packages.
Amazon RDS for Db2Db2 LUW run by AWS, administered through the rdsadmin procedures.

Microsoft Azure#

DialectWhat it is
Azure SQL DatabaseSQL Server's engine as a single database on a logical server, with Entra ID authentication and firewall rules.
Azure SQL Managed InstanceA whole SQL Server instance run by Azure: several databases, USE, SQL Server Agent.
Azure Database for PostgreSQLFlexible server: community PostgreSQL with Entra ID tokens and the built-in PgBouncer.
Azure Database for MySQLFlexible server: community MySQL with Entra ID tokens.
Azure Cosmos DB for PostgreSQLManaged Citus. On a retirement path; the page says what to use instead.
Azure Data Explorer (Kusto)The read-only T-SQL subset Kusto accepts, over HTTP.

Google Cloud#

DialectWhat it is
Cloud SQL for PostgreSQLStock PostgreSQL, reached directly or through the Cloud SQL connector, with IAM database authentication.
Cloud SQL for MySQLStock MySQL, reached directly or through the Cloud SQL connector, with IAM database authentication.
Cloud SQL for SQL ServerSQL Server run by Google, with the flags and stored procedures Cloud SQL uses in place of sysadmin.
AlloyDBGoogle's PostgreSQL-compatible service: IAM authentication and the columnar engine, over pg.
AlloyDB OmniThe downloadable edition of AlloyDB: the same engine, run where you choose, with a real superuser.

Other providers#

DialectWhat it is
Oracle Autonomous DatabaseATP, ADW and AJD: Oracle Database run by Oracle, with wallets, mTLS and DBMS_CLOUD.
MySQL HeatWave (OCI)MySQL Enterprise run by Oracle, with the HeatWave in-memory columnar accelerator.
NeonServerless PostgreSQL: pooled and direct endpoints, and an optional WebSocket driver.
SupabaseA Supabase project's PostgreSQL: the session and transaction poolers, and Supabase's roles.

Related reading#

Cloud authentication — IAM, Entra ID and Cloud SQL tokens
Database types — the full taxonomy, including the non-SQL stores
Data stores — the NoSQL adapters
Running databases in Docker — get one running locally
Local databases — prorm db up
Modified at 2026-10-04 00:40:16
Previous
Tree diagram
Next
AlloyDB Dialect
Built with