-
Notifications
You must be signed in to change notification settings - Fork 1
backend postgres Overview
GitHub Action edited this page Apr 21, 2026
·
2 revisions
A backend adapter for PostgreSQL. This package is optimized for use with Supabase but works with any standard PostgreSQL database.
- Implements the
@quatrain/backendabstract adapter. - Full SQL support for complex queries, transactions, and joins.
- Uses the
pg(node-postgres) library for high performance. - Includes scripts and guidance for setting up the required database schema.
npm install @quatrain/backend-postgres pgimport { Backend } from '@quatrain/backend'
import { PostgresAdapter } from '@quatrain/backend-postgres'
const adapter = new PostgresAdapter({ config: { connectionString: '...' } })
Backend.addAdapter(adapter, 'default', true)All TIMESTAMP WITHOUT TIME ZONE values are interpreted as UTC. The adapter configures the pg driver's type parsers to return timestamps as ISO8601 strings with the Z suffix, ensuring consistent timezone handling regardless of the server's local timezone.
This means:
- Timestamps stored in the database (e.g.,
2026-02-06 08:24:06.034) are treated as UTC - The adapter returns them as
2026-02-06T08:24:06.034Zfor proper parsing - Frontend applications can then convert to the user's local timezone for display
For concrete examples and usage guides, please refer to the How-To Guide.
AGPL-3.0-only