sql

package
v0.53.5 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresFormatter added in v0.50.0

type PostgresFormatter struct{}

func NewPostgresSchemaFormatter added in v0.50.0

func NewPostgresSchemaFormatter() PostgresFormatter

NewPostgresSchemaFormatter creates a new PostgresFormatter.

func (PostgresFormatter) GenerateCreateTableCheckConstraintClause added in v0.50.0

func (p PostgresFormatter) GenerateCreateTableCheckConstraintClause(checkName, checkExpr string, enforced bool) string

func (PostgresFormatter) GenerateCreateTableColumnDefinition added in v0.50.0

func (p PostgresFormatter) GenerateCreateTableColumnDefinition(col *sql.Column, colDefault, onUpdate string, tableCollation sql.CollationID) string

func (PostgresFormatter) GenerateCreateTableForiegnKeyDefinition added in v0.50.0

func (p PostgresFormatter) GenerateCreateTableForiegnKeyDefinition(fkName string, fkCols []string, parentTbl string, parentCols []string, onDelete, onUpdate string) string

func (PostgresFormatter) GenerateCreateTableIndexDefinition added in v0.50.0

func (p PostgresFormatter) GenerateCreateTableIndexDefinition(isUnique, isSpatial, isFullText, isVector bool, indexID string, indexCols []string, comment string) (string, bool)

func (PostgresFormatter) GenerateCreateTablePrimaryKeyDefinition added in v0.50.0

func (p PostgresFormatter) GenerateCreateTablePrimaryKeyDefinition(pkCols []string) string

func (PostgresFormatter) GenerateCreateTableStatement added in v0.50.0

func (p PostgresFormatter) GenerateCreateTableStatement(tblName string, colStmts []string, temp, autoInc, tblCharsetName, tblCollName, comment string) string

GenerateCreateTableStatement implements sql.SchemaFormatter interface.

func (PostgresFormatter) QuoteIdentifier added in v0.50.0

func (p PostgresFormatter) QuoteIdentifier(identifier string) string

func (PostgresFormatter) QuoteIdentifiers added in v0.50.0

func (p PostgresFormatter) QuoteIdentifiers(ids []string) []string

type PostgresParser

type PostgresParser struct{}

PostgresParser is a postgres syntax parser. This parser is used as parser in the engine for Doltgres.

func NewPostgresParser

func NewPostgresParser() *PostgresParser

NewPostgresParser creates new PostgresParser.

func (*PostgresParser) Parse

func (p *PostgresParser) Parse(ctx *sql.Context, query string, multi bool) (vitess.Statement, string, string, error)

Parse implements sql.Parser interface.

func (*PostgresParser) ParseOneWithOptions

func (p *PostgresParser) ParseOneWithOptions(_ context.Context, query string, _ vitess.ParserOptions) (vitess.Statement, int, error)

ParseOneWithOptions implements sql.Parser interface.

func (*PostgresParser) ParseSimple

func (p *PostgresParser) ParseSimple(query string) (vitess.Statement, error)

ParseSimple implements sql.Parser interface.

func (*PostgresParser) ParseWithOptions

func (p *PostgresParser) ParseWithOptions(ctx context.Context, query string, delimiter rune, _ bool, _ vitess.ParserOptions) (vitess.Statement, string, string, error)

ParseWithOptions implements sql.Parser interface.

func (*PostgresParser) QuoteIdentifier added in v0.18.0

func (p *PostgresParser) QuoteIdentifier(identifier string) string

Jump to

Keyboard shortcuts

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