Documentation
¶
Index ¶
- Constants
- type Postgres
- func (p *Postgres) Capabilities() []database.Capabilities
- func (p *Postgres) ConnectionStringTemplate() *template.Template
- func (p *Postgres) Dialect() database.SQLDialect
- func (p *Postgres) GetPrefab(r database.Request) (string, []any, error)
- func (p *Postgres) GetTemplate(queryType database.RequestType) string
- func (p *Postgres) IncreamentPlaceholder() string
- func (p *Postgres) Name() string
- func (p *Postgres) Quote(value string) string
- func (p *Postgres) QuoteRune() rune
- func (p *Postgres) RenderCurrentTimestamp() string
- func (p *Postgres) RenderPlaceholder(index int) string
- func (p *Postgres) RenderTypeCast() string
- func (p *Postgres) RenderValue(value any) string
- func (p *Postgres) ResolveType(dbType string, value []byte) (any, error)
Constants ¶
View Source
const ( PrefabCurrentDatabase = "SELECT current_database()" PrefabDatabases = "SELECT datname FROM pg_database" PrefabTables = "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'" PrefabColumns = "SELECT column_name FROM information_schema.columns WHERE table_name = $1" PrefabColumnsFormat = "SELECT column_name FROM information_schema.columns WHERE table_name = '%s'" PrefabCountFormat = "SELECT COUNT(*) FROM %s" PrefabCountDBFormat = "SELECT COUNT(*) FROM %s.%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct{}
func NewPostgresDriver ¶
func (*Postgres) Capabilities ¶
func (p *Postgres) Capabilities() []database.Capabilities
Capabilities implements database.Dialect.
func (*Postgres) ConnectionStringTemplate ¶
func (*Postgres) Dialect ¶
func (p *Postgres) Dialect() database.SQLDialect
func (*Postgres) GetTemplate ¶
func (p *Postgres) GetTemplate(queryType database.RequestType) string
GetTemplate implements database.Dialect.
func (*Postgres) IncreamentPlaceholder ¶
IncreamentPlaceholder implements database.Dialect.
func (*Postgres) RenderCurrentTimestamp ¶
RenderCurrentTimestamp implements database.Dialect.
func (*Postgres) RenderPlaceholder ¶
RenderPlaceholder implements database.Dialect.
func (*Postgres) RenderTypeCast ¶
RenderTypeCast implements database.Dialect.
func (*Postgres) RenderValue ¶
RenderValue implements database.Dialect.
Click to show internal directories.
Click to hide internal directories.