postgresql

package
v0.0.0-...-982e07a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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 NewQuoteHandler

func NewQuoteHandler() *QuoteHandler

NewQuoteHandler return new handler

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

Jump to

Keyboard shortcuts

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