Postgres Utils

PostgreSQL AST Construction Utilities

AST utilities for constructing and transforming PostgreSQL syntax trees. Comprehensive utility library offering type-safe AST node creation and enum value conversions, simplifying PostgreSQL AST construction and manipulation.

AST Node Creation

Type-safe utilities for building PostgreSQL AST nodes

Enum Conversion

Convert between enum names and integer values

Comprehensive Coverage

Supports all PostgreSQL AST node types and enums

Postgres Utils Features

Powerful utilities for PostgreSQL AST construction and manipulation

Type-Safe AST Node Creation

Simplifies the process of constructing PostgreSQL AST nodes with type safety, allowing for easy assembly of SQL queries programmatically.

Enum Value Conversion

Convert between string and integer representations of PostgreSQL AST enum values with full type safety and validation.

Comprehensive AST Coverage

Supports all enum types and node types defined in the PostgreSQL AST, providing complete coverage for any SQL construct.

Seamless Integration

Designed to work alongside @pgsql/types package for a complete AST handling solution with perfect compatibility.

Dynamic Schema Creation

Build complex table schemas and SQL statements dynamically from JSON configurations or programmatic logic.

Zero Runtime Dependencies

Lightweight utility library with no runtime dependencies, ensuring optimal performance and minimal bundle impact.

Basic AST Node Construction

Create PostgreSQL AST nodes with type-safe utilities for building SELECT, INSERT, UPDATE, and other SQL statements programmatically.

Dynamic Schema Generation

Build complex table schemas and DDL statements dynamically from JSON configurations with full type safety and validation.

Advanced Query Building

Construct sophisticated SQL queries with joins, subqueries, and complex expressions using intuitive AST utilities.