pg

package
v2.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package pg provides PostgreSQL type provider for CEL type system integration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldSchema

type FieldSchema struct {
	Name     string
	Type     string        // PostgreSQL type name (text, integer, boolean, etc.)
	Repeated bool          // true for arrays
	Schema   []FieldSchema // for composite types
}

FieldSchema represents a PostgreSQL field type with name, type, and optional nested schema.

type Schema

type Schema []FieldSchema

Schema represents a PostgreSQL table schema as a slice of field schemas.

type TypeProvider

type TypeProvider interface {
	types.Provider
	LoadTableSchema(ctx context.Context, tableName string) error
	Close()
}

TypeProvider interface for PostgreSQL type providers

func NewTypeProvider

func NewTypeProvider(schemas map[string]Schema) TypeProvider

NewTypeProvider creates a new PostgreSQL type provider with pre-defined schemas

func NewTypeProviderWithConnection

func NewTypeProviderWithConnection(ctx context.Context, connectionString string) (TypeProvider, error)

NewTypeProviderWithConnection creates a new PostgreSQL type provider that can introspect database schemas

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL