Running Bun in production database/sql bun.WithDiscardUnknownColumns PostgreSQL Running Bun in production database/sql Bun uses sql.DB to communicate with database manageme...
What is DI? What is DI? So dependency injection makes programmers' lives easier, but what does itreally do? Consider the following code: class Hamburger { private b...
What is Bun? How it works Why another database client? Why Not …? GORM Ent go-pg What is Bun? Bun is a SQL-first database client for Go. SQL-first means that most SQL quer...
ORM: Table relationships Introduction Has one relation Belongs to relation Has many relation Polymorphic has many relation Many to many relation ORM: Table relationships ...
Migrating from go-pg New features Go zero values and NULL Other changes Ignored columns pg.Listener Porting migrations Migrating from go-pg Bun is a rewrite of go-pgopen i...
Model and query hooks Introduction Disclaimer Model hooks BeforeAppendModel Before/AfterScanRow Model query hooks Query hooks Model and query hooks Introduction Hooks ar...
Drivers and dialects PostgreSQL MySQL MSSQL SQLite Writing DMBS specific code Drivers and dialects To connect to a database, you need a database/sql driver and a correnspo...
Golang database/sql ORM Connecting to a database Defining models Scanning query results Table relationships Using Bun with existing code What’s next Golang database/sql OR...