Documentation
¶
Overview ¶
Package extensiontest supplies isolated PostgreSQL model-store acceptance fixtures. No fixture drops schemas, resets data or starts a database server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Members = extensions.DefineORMOwner("members", orm.IdentityOf(memberFields.Table, memberFields.Key()), extensions.OwnerOptions{})
View Source
var Others = extensions.DefineORMOwner("others", orm.IdentityOf(otherFields.Table, otherFields.Key()), extensions.OwnerOptions{})
View Source
var Products = extensions.DefineORMOwner("products", orm.IdentityOf(products, products.Key()), extensions.OwnerOptions{})
Functions ¶
func InterceptQueries ¶
InterceptQueries injects a selected query failure while forwarding the real driver's execution and connection-lifetime interfaces used by the fixture.
func MemberIdentity ¶
func MemberIdentity(table string) orm.ModelIdentity[Member, int64]
MemberIdentity describes the member fixture model stored in table. Rename scenarios declare the same owner over a renamed table with it.
func MemberQuery ¶
Types ¶
type Fixture ¶
func OpenWithConnector ¶
func OpenWithConnector(t testing.TB, definitions []migrate.Definition, wrap func(driver.Connector) driver.Connector) Fixture
OpenWithConnector permits a test to inject failures at the real driver boundary. The wrapper must preserve optional driver interfaces and own no credentials.
Click to show internal directories.
Click to hide internal directories.