Documentation
¶
Overview ¶
Package hoppersql is hopper's PostgreSQL driver for database/sql, for applications that already use it with lib/pq or pgx's stdlib adapter.
db, err := sql.Open("pgx", url)
client, err := hopper.NewClient(hoppersql.New(db), cfg)
It shares its SQL with hopperpgx and passes the same conformance suite. What database/sql cannot do, it does without: there is no COPY path (bulk inserts use the single-statement path) and no LISTEN, so clients poll at Config.PollInterval and the driver reports it once. Use hopperpgx for lowest latency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements driver.Driver[*sql.Tx] on a *sql.DB.
func New ¶
New returns a driver on db. The database handle is shared with the application; the driver does not close it.
func (*Driver) Capabilities ¶
func (d *Driver) Capabilities() driver.Capabilities
Capabilities implements driver.Driver.