postgresql

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

README

PostgreSQL Parser Module

Build-tagged PostgreSQL parser adapter for parser wiring and parser-neutral extractor handoff.

Files

File Responsibility
parser.go Parses PostgreSQL SQL text and classifies statements when built with the postgresql tag
extractor.go Defines the PostgreSQL extracted-statement wrapper and minimal Phase 3 extractor implementation for normalized raw SQL handoff
parser_stub.go Returns the PG-capable build guidance error when PostgreSQL support is not compiled in

Exports

  • Parser
  • Result
  • ExtractedStatement
  • New()
  • Parser.Parse(sql)

Dependencies

  • Upstream: internal/application/audit
  • Downstream: github.com/pganalyze/pg_query_go/v6, internal/domain/spec

Notes

  • This Phase 3 adapter only establishes the parser seam and normalized raw-SQL handoff.
  • It does not yet expose PostgreSQL in pure-Go capability summaries.
  • Rich PostgreSQL statement extraction stays for later phases.

Update Rule

  • If members/interfaces/dependencies change, update this file in same change.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtractedStatement

type ExtractedStatement struct {
	Kind      spec.Kind
	RawSQL    string
	Extractor spec.StatementExtractor
}

type Parser

type Parser struct{}

func New

func New() *Parser

func (*Parser) Parse

func (p *Parser) Parse(_ string) (Result, error)

type Result

type Result struct {
	Statements []ExtractedStatement
	Warnings   []string
}

Jump to

Keyboard shortcuts

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