Documentation ¶
Index ¶
- type DialectOption
- type PostgreSQLDialect
- type QuoteHandler
- func (*QuoteHandler) GetIdentifierQuote() byte
- func (*QuoteHandler) GetStringLiteralQuote() byte
- func (handler *QuoteHandler) IsIdentifierQuote(quote byte) bool
- func (handler *QuoteHandler) IsStringLiteralQuote(quote byte) bool
- func (*QuoteHandler) WrapIdentifier(identifier string) string
- func (*QuoteHandler) WrapStringLiteral(literal string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialectOption ¶
type DialectOption func(dialect *PostgreSQLDialect)
DialectOption is used to enable different options in dialect and thus tune SQL parser behavior
type PostgreSQLDialect ¶
type PostgreSQLDialect struct{}
PostgreSQLDialect dialect implementation for PostgreSQL
func NewPostgreSQLDialect ¶
func NewPostgreSQLDialect(options ...DialectOption) *PostgreSQLDialect
NewPostgreSQLDialect dialect for PostgreSQL
func (*PostgreSQLDialect) QuoteHandler ¶
func (dialect *PostgreSQLDialect) QuoteHandler() dialect.QuoteHandler
QuoteHandler return QuoteHandler for PostgreSQL
type QuoteHandler ¶
type QuoteHandler struct{}
QuoteHandler for postgresql which uses ANSI version of quotes for identifiers and string literals with some extensions
func (*QuoteHandler) GetIdentifierQuote ¶
func (*QuoteHandler) GetIdentifierQuote() byte
GetIdentifierQuote return correct quote for identifier
func (*QuoteHandler) GetStringLiteralQuote ¶
func (*QuoteHandler) GetStringLiteralQuote() byte
GetStringLiteralQuote return correct quote for string literal
func (*QuoteHandler) IsIdentifierQuote ¶
func (handler *QuoteHandler) IsIdentifierQuote(quote byte) bool
IsIdentifierQuote return true if quote is correct quote for identifiers
func (*QuoteHandler) IsStringLiteralQuote ¶
func (handler *QuoteHandler) IsStringLiteralQuote(quote byte) bool
IsStringLiteralQuote return true if quote is correct quote for string literal
func (*QuoteHandler) WrapIdentifier ¶
func (*QuoteHandler) WrapIdentifier(identifier string) string
WrapIdentifier wrap identifier with correct quotes
func (*QuoteHandler) WrapStringLiteral ¶
func (*QuoteHandler) WrapStringLiteral(literal string) string
WrapStringLiteral wrap literal with correct quotes