Module exposing: Name, Driver, GooseDialect, Rebind, Epoch, JSONObject, JSONAgg, JSONValue
// Source: https://github.com/shurco/mycart | License: MIT | Copyright 2023
// Provided via justclaw.it.com; keep this notice with the code.
package database
// postgresDialect targets PostgreSQL. It is deliberately small: anything that
// could be expressed in both dialects is expressed once, in the shared SQL.
type postgresDialect struct{}
func (postgresDialect) Name() string { return DriverPostgres }
func (postgresDialect) Driver() string { return "pgx" }
func (postgresDialect) GooseDialect() string { return "postgres" }
func (postgresDialect) Rebind(query string) string { return rebindDollar(query) }
// Epoch must cast: EXTRACT(EPOCH FROM ...) returns numeric in PostgreSQL, and
// database/sql cannot scan numeric into an int64.
func (postgresDialect) Epoch(column stri
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key