Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BunAdapter ¶
func BunAdapter(p *Pool) *bunAdapter
BunAdapter returns an adapter that intercepts SQL for registered Whisker models. The returned value provides ExecContext, QueryContext, and QueryRowContext compatible with database/sql types, which Bun's SQL driver expects.
func EntDriver ¶
func EntDriver(p *Pool) *entDriver
EntDriver returns an adapter that intercepts SQL for registered Whisker models. The returned value provides ExecContext and QueryContext compatible with database/sql types, which Ent's dialect drivers expect.
func OpenBun ¶
OpenBun creates a *bun.DB backed by a Whisker pool. All queries executed through the returned DB are intercepted and rewritten for registered models.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool wraps a Whisker store and presents a pgx-compatible query interface. SQL from ORMs targeting registered models is rewritten to use Whisker's JSONB document storage. Unregistered queries pass through unchanged.
func (*Pool) Exec ¶
Exec intercepts INSERT/UPDATE/DELETE, rewrites for registered models, and passes through everything else.