Documentation
¶
Index ¶
- type PostgresFormatter
- func (p PostgresFormatter) GenerateCreateTableCheckConstraintClause(checkName, checkExpr string, enforced bool) string
- func (p PostgresFormatter) GenerateCreateTableColumnDefinition(col *sql.Column, colDefault, onUpdate string, tableCollation sql.CollationID) string
- func (p PostgresFormatter) GenerateCreateTableForiegnKeyDefinition(fkName string, fkCols []string, parentTbl string, parentCols []string, ...) string
- func (p PostgresFormatter) GenerateCreateTableIndexDefinition(isUnique, isSpatial, isFullText, isVector bool, indexID string, ...) (string, bool)
- func (p PostgresFormatter) GenerateCreateTablePrimaryKeyDefinition(pkCols []string) string
- func (p PostgresFormatter) GenerateCreateTableStatement(tblName string, colStmts []string, ...) string
- func (p PostgresFormatter) QuoteIdentifier(identifier string) string
- func (p PostgresFormatter) QuoteIdentifiers(ids []string) []string
- type PostgresParser
- func (p *PostgresParser) Parse(ctx *sql.Context, query string, multi bool) (vitess.Statement, string, string, error)
- func (p *PostgresParser) ParseOneWithOptions(_ context.Context, query string, _ vitess.ParserOptions) (vitess.Statement, int, error)
- func (p *PostgresParser) ParseSimple(query string) (vitess.Statement, error)
- func (p *PostgresParser) ParseWithOptions(ctx context.Context, query string, delimiter rune, _ bool, ...) (vitess.Statement, string, string, error)
- func (p *PostgresParser) QuoteIdentifier(identifier string) string
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 (PostgresFormatter) GenerateCreateTableIndexDefinition ¶ added in v0.50.0
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
Click to show internal directories.
Click to hide internal directories.