Documentation ¶
Index ¶
- Variables
- func ImitatorSql[ID constraints.Ordered, T any](entities map[ID]*T, where []*expression.Where, groupBy []*expression.GroupBy, ...) ([]*T, error)
- func ImitatorSqlOrderBy(entities []*ImitatorModel, expressions ...*expression.OrderBy) (err error)
- func Merge(entity interface{}, values map[string]interface{}) error
- func NewStubVault(d internal.Dialect, db internal.Vault, id int64, c ...io.Closer) internal.Vault
- type Container
- func RunMySqlContainer(port int, userLogin, userPassword, databaseName string) (*Container, error)
- func RunPostgreSqlContainer(port int, userLogin, userPassword, databaseName string) (*Container, error)
- func RunTestContainer(image string, ports []string, env map[string]string, waitPorts ...string) (tc *Container, err error)
- type ImitatorModel
- type Pool
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrContainerNotFound = errors.New("container not found")
Functions ¶
func ImitatorSql ¶
func ImitatorSql[ID constraints.Ordered, T any]( entities map[ID]*T, where []*expression.Where, groupBy []*expression.GroupBy, orderBy []*expression.OrderBy, ) ([]*T, error)
func ImitatorSqlOrderBy ¶
func ImitatorSqlOrderBy(entities []*ImitatorModel, expressions ...*expression.OrderBy) (err error)
Types ¶
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func RunMySqlContainer ¶
func RunPostgreSqlContainer ¶
func RunTestContainer ¶
func (*Container) MappedHostPort ¶
type ImitatorModel ¶
type ImitatorModel map[string]interface{}
func ImitatorSqlGroupBy ¶
func ImitatorSqlGroupBy(entities []*ImitatorModel, expressions ...*expression.GroupBy) ([]*ImitatorModel, error)
func ImitatorSqlWhere ¶
func ImitatorSqlWhere(entities []*ImitatorModel, expressions ...*expression.Where) ([]*ImitatorModel, error)
func RecognizeImitatorModel ¶
func RecognizeImitatorModel(entity interface{}) (*ImitatorModel, error)
func (*ImitatorModel) Compare ¶
func (m *ImitatorModel) Compare(operator expression.Operator, table, column string, expected interface{}) (bool, error)
Click to show internal directories.
Click to hide internal directories.