Documentation ¶
Index ¶
- Variables
- func DBStart()
- func DBStop()
- func DBUserGroupsCreate()
- func DBUserGroupsInsert()
- func DBUsersCreate()
- func DBUsersInsertJoes()
- func InitDefault(db *sql.DB)
- func NewGroupResultSet(rs ceous.ResultSet, err error) (*groupResultSet, error)
- func NewUserGroupResultSet(rs ceous.ResultSet, err error) (*userGroupResultSet, error)
- func NewUserResultSet(rs ceous.ResultSet, err error) (*userResultSet, error)
- type Connection
- type Creator
- type GroupQuery
- func (q *GroupQuery) All() ([]*tests.Group, error)
- func (q *GroupQuery) ByID(value int) *GroupQuery
- func (q *GroupQuery) ByName(value string) *GroupQuery
- func (q *GroupQuery) ExcludeFields(fields ...ceous.SchemaField) *GroupQuery
- func (q *GroupQuery) For(t ceous.SelectForType, lockingType ...ceous.SelectForLockingType) *GroupQuery
- func (q *GroupQuery) Limit(limit uint64) *GroupQuery
- func (q *GroupQuery) Offset(offset uint64) *GroupQuery
- func (q *GroupQuery) One() (m tests.Group, err error)
- func (q *GroupQuery) OrderBy(fields ...interface{}) *GroupQuery
- func (q *GroupQuery) Select(fields ...ceous.SchemaField) *GroupQuery
- func (q *GroupQuery) Where(pred interface{}, args ...interface{}) *GroupQuery
- type GroupStore
- type Transaction
- func (c *Transaction) GroupQuery(options ...ceous.CeousOption) *GroupQuery
- func (c *Transaction) GroupStore(options ...ceous.CeousOption) *GroupStore
- func (c *Transaction) UserGroupQuery(options ...ceous.CeousOption) *UserGroupQuery
- func (c *Transaction) UserGroupStore(options ...ceous.CeousOption) *UserGroupStore
- func (c *Transaction) UserQuery(options ...ceous.CeousOption) *UserQuery
- func (c *Transaction) UserStore(options ...ceous.CeousOption) *UserStore
- type UserGroupQuery
- func (q *UserGroupQuery) All() ([]*tests.UserGroup, error)
- func (q *UserGroupQuery) ByAdmin(value bool) *UserGroupQuery
- func (q *UserGroupQuery) ByIDGroupID(value int) *UserGroupQuery
- func (q *UserGroupQuery) ByIDUserID(value int) *UserGroupQuery
- func (q *UserGroupQuery) ExcludeFields(fields ...ceous.SchemaField) *UserGroupQuery
- func (q *UserGroupQuery) For(t ceous.SelectForType, lockingType ...ceous.SelectForLockingType) *UserGroupQuery
- func (q *UserGroupQuery) Limit(limit uint64) *UserGroupQuery
- func (q *UserGroupQuery) Offset(offset uint64) *UserGroupQuery
- func (q *UserGroupQuery) One() (m tests.UserGroup, err error)
- func (q *UserGroupQuery) OrderBy(fields ...interface{}) *UserGroupQuery
- func (q *UserGroupQuery) Select(fields ...ceous.SchemaField) *UserGroupQuery
- func (q *UserGroupQuery) Where(pred interface{}, args ...interface{}) *UserGroupQuery
- func (q *UserGroupQuery) WithUser() *UserGroupQuery
- type UserGroupStore
- type UserGroupUserRelation
- type UserQuery
- func (q *UserQuery) All() ([]*tests.User, error)
- func (q *UserQuery) ByAddressCity(value string) *UserQuery
- func (q *UserQuery) ByAddressNumber(value string) *UserQuery
- func (q *UserQuery) ByAddressState(value string) *UserQuery
- func (q *UserQuery) ByAddressStreet(value string) *UserQuery
- func (q *UserQuery) ByCreatedAt(value time.Time) *UserQuery
- func (q *UserQuery) ByID(value int) *UserQuery
- func (q *UserQuery) ByName(value string) *UserQuery
- func (q *UserQuery) ByPassword(value string) *UserQuery
- func (q *UserQuery) ByRole(value string) *UserQuery
- func (q *UserQuery) ByUpdatedAt(value time.Time) *UserQuery
- func (q *UserQuery) ByWorkCity(value string) *UserQuery
- func (q *UserQuery) ByWorkNumber(value string) *UserQuery
- func (q *UserQuery) ByWorkState(value string) *UserQuery
- func (q *UserQuery) ByWorkStreet(value string) *UserQuery
- func (q *UserQuery) ExcludeFields(fields ...ceous.SchemaField) *UserQuery
- func (q *UserQuery) For(t ceous.SelectForType, lockingType ...ceous.SelectForLockingType) *UserQuery
- func (q *UserQuery) Limit(limit uint64) *UserQuery
- func (q *UserQuery) Offset(offset uint64) *UserQuery
- func (q *UserQuery) One() (m tests.User, err error)
- func (q *UserQuery) OrderBy(fields ...interface{}) *UserQuery
- func (q *UserQuery) Select(fields ...ceous.SchemaField) *UserQuery
- func (q *UserQuery) Where(pred interface{}, args ...interface{}) *UserQuery
- type UserStore
Constants ¶
This section is empty.
Variables ¶
var (
DB *sql.DB
)
var (
// Default is a database connection reference.
Default *defaultConnection
)
Functions ¶
func DBUserGroupsCreate ¶
func DBUserGroupsCreate()
func DBUserGroupsInsert ¶
func DBUserGroupsInsert()
func DBUsersCreate ¶
func DBUsersCreate()
func DBUsersInsertJoes ¶
func DBUsersInsertJoes()
func NewGroupResultSet ¶
NewGroupResultSet create a new instance of the specialized `ceous.ResultSet` for the model `Group`.
func NewUserGroupResultSet ¶
NewUserGroupResultSet create a new instance of the specialized `ceous.ResultSet` for the model `UserGroup`.
Types ¶
type Connection ¶
type Creator ¶
type Creator interface { // UserQuery creates a new query related with the connection set. UserQuery(options ...ceous.CeousOption) *UserQuery // GroupQuery creates a new query related with the connection set. GroupQuery(options ...ceous.CeousOption) *GroupQuery // UserGroupQuery creates a new query related with the connection set. UserGroupQuery(options ...ceous.CeousOption) *UserGroupQuery // UserStore creates a new store related with the connection set. UserStore(options ...ceous.CeousOption) *UserStore // GroupStore creates a new store related with the connection set. GroupStore(options ...ceous.CeousOption) *GroupStore // UserGroupStore creates a new store related with the connection set. UserGroupStore(options ...ceous.CeousOption) *UserGroupStore }
type GroupQuery ¶
GroupQuery is the query for the model `GroupQuery`.
func NewGroupQuery ¶
func NewGroupQuery(options ...ceous.CeousOption) *GroupQuery
NewGroupQuery creates a new query for model `GroupQuery`.
func (*GroupQuery) All ¶
func (q *GroupQuery) All() ([]*tests.Group, error)
All return all records that match the query.
func (*GroupQuery) ByID ¶
func (q *GroupQuery) ByID(value int) *GroupQuery
ByID add a filter by `ID`.
func (*GroupQuery) ByName ¶
func (q *GroupQuery) ByName(value string) *GroupQuery
ByName add a filter by `Name`.
func (*GroupQuery) ExcludeFields ¶
func (q *GroupQuery) ExcludeFields(fields ...ceous.SchemaField) *GroupQuery
ExcludeFields defines what fields should not be selected from the database.
func (*GroupQuery) For ¶
func (q *GroupQuery) For(t ceous.SelectForType, lockingType ...ceous.SelectForLockingType) *GroupQuery
For add a FOR [UPDATE|NO KEY UPDATE|SHARE|KEY SHARE] [NOWAIT|SKIP LOCKED] directive for the key.
func (*GroupQuery) Limit ¶
func (q *GroupQuery) Limit(limit uint64) *GroupQuery
func (*GroupQuery) Offset ¶
func (q *GroupQuery) Offset(offset uint64) *GroupQuery
func (*GroupQuery) One ¶
func (q *GroupQuery) One() (m tests.Group, err error)
One results only one record matching the query.
func (*GroupQuery) OrderBy ¶
func (q *GroupQuery) OrderBy(fields ...interface{}) *GroupQuery
func (*GroupQuery) Select ¶
func (q *GroupQuery) Select(fields ...ceous.SchemaField) *GroupQuery
Select defines what fields should be selected from the database.
func (*GroupQuery) Where ¶
func (q *GroupQuery) Where(pred interface{}, args ...interface{}) *GroupQuery
Where defines the conditions for
type GroupStore ¶
GroupStore is the query for the store `Group`.
func NewGroupStore ¶
func NewGroupStore(options ...ceous.CeousOption) *GroupStore
NewGroupStore creates a new query for model `Group`.
func (*GroupStore) Insert ¶
func (store *GroupStore) Insert(record *tests.Group, fields ...ceous.SchemaField) error
func (*GroupStore) Update ¶
func (store *GroupStore) Update(record *tests.Group, fields ...ceous.SchemaField) (int64, error)
type Transaction ¶
type Transaction struct {
*ceous.BaseTxRunner
}
func NewTransaction ¶
func NewTransaction(tx *ceous.BaseTxRunner) *Transaction
func (*Transaction) GroupQuery ¶
func (c *Transaction) GroupQuery(options ...ceous.CeousOption) *GroupQuery
GroupQuery creates a new query from a transaction.
func (*Transaction) GroupStore ¶
func (c *Transaction) GroupStore(options ...ceous.CeousOption) *GroupStore
GroupStore creates a new store from a transaction.
func (*Transaction) UserGroupQuery ¶
func (c *Transaction) UserGroupQuery(options ...ceous.CeousOption) *UserGroupQuery
UserGroupQuery creates a new query from a transaction.
func (*Transaction) UserGroupStore ¶
func (c *Transaction) UserGroupStore(options ...ceous.CeousOption) *UserGroupStore
UserGroupStore creates a new store from a transaction.
func (*Transaction) UserQuery ¶
func (c *Transaction) UserQuery(options ...ceous.CeousOption) *UserQuery
UserQuery creates a new query from a transaction.
func (*Transaction) UserStore ¶
func (c *Transaction) UserStore(options ...ceous.CeousOption) *UserStore
UserStore creates a new store from a transaction.
type UserGroupQuery ¶
UserGroupQuery is the query for the model `UserGroupQuery`.
func NewUserGroupQuery ¶
func NewUserGroupQuery(options ...ceous.CeousOption) *UserGroupQuery
NewUserGroupQuery creates a new query for model `UserGroupQuery`.
func (*UserGroupQuery) All ¶
func (q *UserGroupQuery) All() ([]*tests.UserGroup, error)
All return all records that match the query.
func (*UserGroupQuery) ByAdmin ¶
func (q *UserGroupQuery) ByAdmin(value bool) *UserGroupQuery
ByAdmin add a filter by `Admin`.
func (*UserGroupQuery) ByIDGroupID ¶
func (q *UserGroupQuery) ByIDGroupID(value int) *UserGroupQuery
ByGroupID add a filter by `GroupID`.
func (*UserGroupQuery) ByIDUserID ¶
func (q *UserGroupQuery) ByIDUserID(value int) *UserGroupQuery
ByUserID add a filter by `UserID`.
func (*UserGroupQuery) ExcludeFields ¶
func (q *UserGroupQuery) ExcludeFields(fields ...ceous.SchemaField) *UserGroupQuery
ExcludeFields defines what fields should not be selected from the database.
func (*UserGroupQuery) For ¶
func (q *UserGroupQuery) For(t ceous.SelectForType, lockingType ...ceous.SelectForLockingType) *UserGroupQuery
For add a FOR [UPDATE|NO KEY UPDATE|SHARE|KEY SHARE] [NOWAIT|SKIP LOCKED] directive for the key.
func (*UserGroupQuery) Limit ¶
func (q *UserGroupQuery) Limit(limit uint64) *UserGroupQuery
func (*UserGroupQuery) Offset ¶
func (q *UserGroupQuery) Offset(offset uint64) *UserGroupQuery
func (*UserGroupQuery) One ¶
func (q *UserGroupQuery) One() (m tests.UserGroup, err error)
One results only one record matching the query.
func (*UserGroupQuery) OrderBy ¶
func (q *UserGroupQuery) OrderBy(fields ...interface{}) *UserGroupQuery
func (*UserGroupQuery) Select ¶
func (q *UserGroupQuery) Select(fields ...ceous.SchemaField) *UserGroupQuery
Select defines what fields should be selected from the database.
func (*UserGroupQuery) Where ¶
func (q *UserGroupQuery) Where(pred interface{}, args ...interface{}) *UserGroupQuery
Where defines the conditions for
func (*UserGroupQuery) WithUser ¶
func (q *UserGroupQuery) WithUser() *UserGroupQuery
type UserGroupStore ¶
UserGroupStore is the query for the store `UserGroup`.
func NewUserGroupStore ¶
func NewUserGroupStore(options ...ceous.CeousOption) *UserGroupStore
NewUserGroupStore creates a new query for model `UserGroup`.
func (*UserGroupStore) Insert ¶
func (store *UserGroupStore) Insert(record *tests.UserGroup, fields ...ceous.SchemaField) error
func (*UserGroupStore) Update ¶
func (store *UserGroupStore) Update(record *tests.UserGroup, fields ...ceous.SchemaField) (int64, error)
type UserGroupUserRelation ¶
type UserGroupUserRelation struct {
// contains filtered or unexported fields
}
func NewUserGroupUserRelation ¶
func NewUserGroupUserRelation(runner ceous.DBRunner) *UserGroupUserRelation
func (*UserGroupUserRelation) Aggregate ¶
func (relation *UserGroupUserRelation) Aggregate(record ceous.Record) error
func (*UserGroupUserRelation) Realize ¶
func (relation *UserGroupUserRelation) Realize() error
type UserQuery ¶
UserQuery is the query for the model `UserQuery`.
func NewUserQuery ¶
func NewUserQuery(options ...ceous.CeousOption) *UserQuery
NewUserQuery creates a new query for model `UserQuery`.
func (*UserQuery) ByAddressCity ¶
ByCity add a filter by `City`.
func (*UserQuery) ByAddressNumber ¶
ByNumber add a filter by `Number`.
func (*UserQuery) ByAddressState ¶
ByState add a filter by `State`.
func (*UserQuery) ByAddressStreet ¶
ByStreet add a filter by `Street`.
func (*UserQuery) ByCreatedAt ¶
ByCreatedAt add a filter by `CreatedAt`.
func (*UserQuery) ByPassword ¶
ByPassword add a filter by `Password`.
func (*UserQuery) ByUpdatedAt ¶
ByUpdatedAt add a filter by `UpdatedAt`.
func (*UserQuery) ByWorkCity ¶
ByCity add a filter by `City`.
func (*UserQuery) ByWorkNumber ¶
ByNumber add a filter by `Number`.
func (*UserQuery) ByWorkState ¶
ByState add a filter by `State`.
func (*UserQuery) ByWorkStreet ¶
ByStreet add a filter by `Street`.
func (*UserQuery) ExcludeFields ¶
func (q *UserQuery) ExcludeFields(fields ...ceous.SchemaField) *UserQuery
ExcludeFields defines what fields should not be selected from the database.
func (*UserQuery) For ¶
func (q *UserQuery) For(t ceous.SelectForType, lockingType ...ceous.SelectForLockingType) *UserQuery
For add a FOR [UPDATE|NO KEY UPDATE|SHARE|KEY SHARE] [NOWAIT|SKIP LOCKED] directive for the key.
type UserStore ¶
UserStore is the query for the store `User`.
func NewUserStore ¶
func NewUserStore(options ...ceous.CeousOption) *UserStore
NewUserStore creates a new query for model `User`.