Documentation
¶
Overview ¶
Package dbtest is the database conformance suite: the same schema, ORM, transaction and migration checks run against every dialect (SQLite in core, Postgres and others in their driver modules).
func TestConformance(t *testing.T) {
db := open(t) // *database.DB for the dialect under test
dbtest.Run(t, db)
}
Run creates and drops its own tables (prefixed "dbt_"), so point it at a throwaway database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Author ¶
type Author struct {
orm.Model
orm.SoftDeletes
Name string
Email *string
Active bool
Score float64
Meta orm.JSON[Meta]
Books orm.HasMany[Book] `json:"books,omitzero"`
FirstBook orm.HasOne[Book] `json:"first_book,omitzero" orm:"fk:author_id"`
}
Author is the main conformance model.
Click to show internal directories.
Click to hide internal directories.