Documentation ¶
Index ¶
- Variables
- func Errorf(s string, v ...interface{})
- func Logf(s string, v ...interface{})
- func SetErrorLogger(logger interface{})
- func SetLogger(logger interface{})
- type ColumnSimpleType
- type Cursor
- type DB
- type DbField
- type Direction
- type ErrInsertFailed
- type ErrInvalidXoTestsWorkItemRole
- type ErrUpdateFailed
- type ErrUpsertFailed
- type Error
- type PaginationCursor
- type TableEntity
- type Trigger
- type XoError
- type XoTestsBook
- func CreateXoTestsBook(ctx context.Context, db DB, params *XoTestsBookCreateParams) (*XoTestsBook, error)
- func XoTestsBookByBookID(ctx context.Context, db DB, bookID XoTestsBookID, ...) (*XoTestsBook, error)
- func XoTestsBookPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsBook, error)
- func (xtb *XoTestsBook) Delete(ctx context.Context, db DB) error
- func (xtb *XoTestsBook) Insert(ctx context.Context, db DB) (*XoTestsBook, error)
- func (xtb *XoTestsBook) SetUpdateParams(params *XoTestsBookUpdateParams)
- func (xtb *XoTestsBook) Update(ctx context.Context, db DB) (*XoTestsBook, error)
- func (xtb *XoTestsBook) Upsert(ctx context.Context, db DB, params *XoTestsBookCreateParams) (*XoTestsBook, error)
- type XoTestsBookAuthor
- func CreateXoTestsBookAuthor(ctx context.Context, db DB, params *XoTestsBookAuthorCreateParams) (*XoTestsBookAuthor, error)
- func XoTestsBookAuthorByBookIDAuthorID(ctx context.Context, db DB, bookID XoTestsBookID, authorID XoTestsUserID, ...) (*XoTestsBookAuthor, error)
- func XoTestsBookAuthorPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsBookAuthor, error)
- func XoTestsBookAuthorsByAuthorID(ctx context.Context, db DB, authorID XoTestsUserID, ...) ([]XoTestsBookAuthor, error)
- func XoTestsBookAuthorsByBookID(ctx context.Context, db DB, bookID XoTestsBookID, ...) ([]XoTestsBookAuthor, error)
- func (xtba *XoTestsBookAuthor) Delete(ctx context.Context, db DB) error
- func (xtba *XoTestsBookAuthor) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
- func (xtba *XoTestsBookAuthor) FKUser_AuthorID(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtba *XoTestsBookAuthor) Insert(ctx context.Context, db DB) (*XoTestsBookAuthor, error)
- func (xtba *XoTestsBookAuthor) SetUpdateParams(params *XoTestsBookAuthorUpdateParams)
- func (xtba *XoTestsBookAuthor) Update(ctx context.Context, db DB) (*XoTestsBookAuthor, error)
- func (xtba *XoTestsBookAuthor) Upsert(ctx context.Context, db DB, params *XoTestsBookAuthorCreateParams) (*XoTestsBookAuthor, error)
- type XoTestsBookAuthorCreateParams
- type XoTestsBookAuthorJoins
- type XoTestsBookAuthorM2MAuthorBA
- type XoTestsBookAuthorM2MBookBA
- type XoTestsBookAuthorParams
- type XoTestsBookAuthorSelectConfig
- type XoTestsBookAuthorSelectConfigOption
- func WithXoTestsBookAuthorFilters(filters map[string][]any) XoTestsBookAuthorSelectConfigOption
- func WithXoTestsBookAuthorHavingClause(conditions map[string][]any) XoTestsBookAuthorSelectConfigOption
- func WithXoTestsBookAuthorJoin(joins XoTestsBookAuthorJoins) XoTestsBookAuthorSelectConfigOption
- func WithXoTestsBookAuthorLimit(limit int) XoTestsBookAuthorSelectConfigOption
- func WithXoTestsBookAuthorOrderBy(rows map[string]*Direction) XoTestsBookAuthorSelectConfigOption
- type XoTestsBookAuthorUpdateParams
- type XoTestsBookAuthorsSurrogateKey
- func CreateXoTestsBookAuthorsSurrogateKey(ctx context.Context, db DB, params *XoTestsBookAuthorsSurrogateKeyCreateParams) (*XoTestsBookAuthorsSurrogateKey, error)
- func XoTestsBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID(ctx context.Context, db DB, ...) (*XoTestsBookAuthorsSurrogateKey, error)
- func XoTestsBookAuthorsSurrogateKeyByBookIDAuthorID(ctx context.Context, db DB, bookID XoTestsBookID, authorID XoTestsUserID, ...) (*XoTestsBookAuthorsSurrogateKey, error)
- func XoTestsBookAuthorsSurrogateKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsBookAuthorsSurrogateKey, error)
- func XoTestsBookAuthorsSurrogateKeysByAuthorID(ctx context.Context, db DB, authorID XoTestsUserID, ...) ([]XoTestsBookAuthorsSurrogateKey, error)
- func XoTestsBookAuthorsSurrogateKeysByBookID(ctx context.Context, db DB, bookID XoTestsBookID, ...) ([]XoTestsBookAuthorsSurrogateKey, error)
- func (xtbask *XoTestsBookAuthorsSurrogateKey) Delete(ctx context.Context, db DB) error
- func (xtbask *XoTestsBookAuthorsSurrogateKey) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
- func (xtbask *XoTestsBookAuthorsSurrogateKey) FKUser_AuthorID(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtbask *XoTestsBookAuthorsSurrogateKey) Insert(ctx context.Context, db DB) (*XoTestsBookAuthorsSurrogateKey, error)
- func (xtbask *XoTestsBookAuthorsSurrogateKey) SetUpdateParams(params *XoTestsBookAuthorsSurrogateKeyUpdateParams)
- func (xtbask *XoTestsBookAuthorsSurrogateKey) Update(ctx context.Context, db DB) (*XoTestsBookAuthorsSurrogateKey, error)
- func (xtbask *XoTestsBookAuthorsSurrogateKey) Upsert(ctx context.Context, db DB, params *XoTestsBookAuthorsSurrogateKeyCreateParams) (*XoTestsBookAuthorsSurrogateKey, error)
- type XoTestsBookAuthorsSurrogateKeyCreateParams
- type XoTestsBookAuthorsSurrogateKeyID
- type XoTestsBookAuthorsSurrogateKeyJoins
- type XoTestsBookAuthorsSurrogateKeyM2MAuthorBASK
- type XoTestsBookAuthorsSurrogateKeyM2MBookBASK
- type XoTestsBookAuthorsSurrogateKeyParams
- type XoTestsBookAuthorsSurrogateKeySelectConfig
- type XoTestsBookAuthorsSurrogateKeySelectConfigOption
- func WithXoTestsBookAuthorsSurrogateKeyFilters(filters map[string][]any) XoTestsBookAuthorsSurrogateKeySelectConfigOption
- func WithXoTestsBookAuthorsSurrogateKeyHavingClause(conditions map[string][]any) XoTestsBookAuthorsSurrogateKeySelectConfigOption
- func WithXoTestsBookAuthorsSurrogateKeyJoin(joins XoTestsBookAuthorsSurrogateKeyJoins) XoTestsBookAuthorsSurrogateKeySelectConfigOption
- func WithXoTestsBookAuthorsSurrogateKeyLimit(limit int) XoTestsBookAuthorsSurrogateKeySelectConfigOption
- func WithXoTestsBookAuthorsSurrogateKeyOrderBy(rows map[string]*Direction) XoTestsBookAuthorsSurrogateKeySelectConfigOption
- type XoTestsBookAuthorsSurrogateKeyUpdateParams
- type XoTestsBookCreateParams
- type XoTestsBookID
- type XoTestsBookJoins
- type XoTestsBookM2MAuthorBA
- type XoTestsBookM2MAuthorBASK
- type XoTestsBookParams
- type XoTestsBookReview
- func CreateXoTestsBookReview(ctx context.Context, db DB, params *XoTestsBookReviewCreateParams) (*XoTestsBookReview, error)
- func XoTestsBookReviewByBookReviewID(ctx context.Context, db DB, bookReviewID XoTestsBookReviewID, ...) (*XoTestsBookReview, error)
- func XoTestsBookReviewByReviewerBookID(ctx context.Context, db DB, reviewer XoTestsUserID, bookID XoTestsBookID, ...) (*XoTestsBookReview, error)
- func XoTestsBookReviewPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsBookReview, error)
- func XoTestsBookReviewsByBookID(ctx context.Context, db DB, bookID XoTestsBookID, ...) ([]XoTestsBookReview, error)
- func XoTestsBookReviewsByReviewer(ctx context.Context, db DB, reviewer XoTestsUserID, ...) ([]XoTestsBookReview, error)
- func (xtbr *XoTestsBookReview) Delete(ctx context.Context, db DB) error
- func (xtbr *XoTestsBookReview) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
- func (xtbr *XoTestsBookReview) FKUser_Reviewer(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtbr *XoTestsBookReview) Insert(ctx context.Context, db DB) (*XoTestsBookReview, error)
- func (xtbr *XoTestsBookReview) SetUpdateParams(params *XoTestsBookReviewUpdateParams)
- func (xtbr *XoTestsBookReview) Update(ctx context.Context, db DB) (*XoTestsBookReview, error)
- func (xtbr *XoTestsBookReview) Upsert(ctx context.Context, db DB, params *XoTestsBookReviewCreateParams) (*XoTestsBookReview, error)
- type XoTestsBookReviewCreateParams
- type XoTestsBookReviewID
- type XoTestsBookReviewJoins
- type XoTestsBookReviewParams
- type XoTestsBookReviewSelectConfig
- type XoTestsBookReviewSelectConfigOption
- func WithXoTestsBookReviewFilters(filters map[string][]any) XoTestsBookReviewSelectConfigOption
- func WithXoTestsBookReviewHavingClause(conditions map[string][]any) XoTestsBookReviewSelectConfigOption
- func WithXoTestsBookReviewJoin(joins XoTestsBookReviewJoins) XoTestsBookReviewSelectConfigOption
- func WithXoTestsBookReviewLimit(limit int) XoTestsBookReviewSelectConfigOption
- func WithXoTestsBookReviewOrderBy(rows map[string]*Direction) XoTestsBookReviewSelectConfigOption
- type XoTestsBookReviewUpdateParams
- type XoTestsBookSelectConfig
- type XoTestsBookSelectConfigOption
- func WithXoTestsBookFilters(filters map[string][]any) XoTestsBookSelectConfigOption
- func WithXoTestsBookHavingClause(conditions map[string][]any) XoTestsBookSelectConfigOption
- func WithXoTestsBookJoin(joins XoTestsBookJoins) XoTestsBookSelectConfigOption
- func WithXoTestsBookLimit(limit int) XoTestsBookSelectConfigOption
- func WithXoTestsBookOrderBy(rows map[string]*Direction) XoTestsBookSelectConfigOption
- type XoTestsBookSeller
- func CreateXoTestsBookSeller(ctx context.Context, db DB, params *XoTestsBookSellerCreateParams) (*XoTestsBookSeller, error)
- func XoTestsBookSellerPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsBookSeller, error)
- func XoTestsBookSellersByBookID(ctx context.Context, db DB, bookID XoTestsBookID, ...) ([]XoTestsBookSeller, error)
- func XoTestsBookSellersByBookIDSeller(ctx context.Context, db DB, bookID XoTestsBookID, seller XoTestsUserID, ...) ([]XoTestsBookSeller, error)
- func XoTestsBookSellersBySeller(ctx context.Context, db DB, seller XoTestsUserID, ...) ([]XoTestsBookSeller, error)
- func XoTestsBookSellersBySellerBookID(ctx context.Context, db DB, seller XoTestsUserID, bookID XoTestsBookID, ...) ([]XoTestsBookSeller, error)
- func (xtbs *XoTestsBookSeller) Delete(ctx context.Context, db DB) error
- func (xtbs *XoTestsBookSeller) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
- func (xtbs *XoTestsBookSeller) FKUser_Seller(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtbs *XoTestsBookSeller) Insert(ctx context.Context, db DB) (*XoTestsBookSeller, error)
- func (xtbs *XoTestsBookSeller) SetUpdateParams(params *XoTestsBookSellerUpdateParams)
- type XoTestsBookSellerCreateParams
- type XoTestsBookSellerJoins
- type XoTestsBookSellerParams
- type XoTestsBookSellerSelectConfig
- type XoTestsBookSellerSelectConfigOption
- func WithXoTestsBookSellerFilters(filters map[string][]any) XoTestsBookSellerSelectConfigOption
- func WithXoTestsBookSellerHavingClause(conditions map[string][]any) XoTestsBookSellerSelectConfigOption
- func WithXoTestsBookSellerJoin(joins XoTestsBookSellerJoins) XoTestsBookSellerSelectConfigOption
- func WithXoTestsBookSellerLimit(limit int) XoTestsBookSellerSelectConfigOption
- func WithXoTestsBookSellerOrderBy(rows map[string]*Direction) XoTestsBookSellerSelectConfigOption
- type XoTestsBookSellerUpdateParams
- type XoTestsBookUpdateParams
- type XoTestsCacheDemoWorkItem
- func CreateXoTestsCacheDemoWorkItem(ctx context.Context, db DB, params *XoTestsCacheDemoWorkItemCreateParams) (*XoTestsCacheDemoWorkItem, error)
- func XoTestsCacheDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID int, ...) (*XoTestsCacheDemoWorkItem, error)
- func XoTestsCacheDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsCacheDemoWorkItem, error)
- func (xtcdwi *XoTestsCacheDemoWorkItem) Delete(ctx context.Context, db DB) error
- func (xtcdwi *XoTestsCacheDemoWorkItem) FKTeam_TeamID(ctx context.Context, db DB) (*XoTestsTeam, error)
- func (xtcdwi *XoTestsCacheDemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
- func (xtcdwi *XoTestsCacheDemoWorkItem) Insert(ctx context.Context, db DB) (*XoTestsCacheDemoWorkItem, error)
- func (xtcdwi *XoTestsCacheDemoWorkItem) SetUpdateParams(params *XoTestsCacheDemoWorkItemUpdateParams)
- func (xtcdwi *XoTestsCacheDemoWorkItem) Update(ctx context.Context, db DB) (*XoTestsCacheDemoWorkItem, error)
- func (xtcdwi *XoTestsCacheDemoWorkItem) Upsert(ctx context.Context, db DB, params *XoTestsCacheDemoWorkItemCreateParams) (*XoTestsCacheDemoWorkItem, error)
- type XoTestsCacheDemoWorkItemCreateParams
- type XoTestsCacheDemoWorkItemJoins
- type XoTestsCacheDemoWorkItemM2MAssigneeWIA
- type XoTestsCacheDemoWorkItemParams
- type XoTestsCacheDemoWorkItemSelectConfig
- type XoTestsCacheDemoWorkItemSelectConfigOption
- func WithXoTestsCacheDemoWorkItemFilters(filters map[string][]any) XoTestsCacheDemoWorkItemSelectConfigOption
- func WithXoTestsCacheDemoWorkItemHavingClause(conditions map[string][]any) XoTestsCacheDemoWorkItemSelectConfigOption
- func WithXoTestsCacheDemoWorkItemJoin(joins XoTestsCacheDemoWorkItemJoins) XoTestsCacheDemoWorkItemSelectConfigOption
- func WithXoTestsCacheDemoWorkItemLimit(limit int) XoTestsCacheDemoWorkItemSelectConfigOption
- func WithXoTestsCacheDemoWorkItemOrderBy(rows map[string]*Direction) XoTestsCacheDemoWorkItemSelectConfigOption
- type XoTestsCacheDemoWorkItemUpdateParams
- type XoTestsCacheTableEntity
- type XoTestsDemoWorkItem
- func CreateXoTestsDemoWorkItem(ctx context.Context, db DB, params *XoTestsDemoWorkItemCreateParams) (*XoTestsDemoWorkItem, error)
- func XoTestsDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, ...) (*XoTestsDemoWorkItem, error)
- func XoTestsDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsDemoWorkItem, error)
- func (xtdwi *XoTestsDemoWorkItem) Delete(ctx context.Context, db DB) error
- func (xtdwi *XoTestsDemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
- func (xtdwi *XoTestsDemoWorkItem) Insert(ctx context.Context, db DB) (*XoTestsDemoWorkItem, error)
- func (xtdwi *XoTestsDemoWorkItem) SetUpdateParams(params *XoTestsDemoWorkItemUpdateParams)
- func (xtdwi *XoTestsDemoWorkItem) Update(ctx context.Context, db DB) (*XoTestsDemoWorkItem, error)
- func (xtdwi *XoTestsDemoWorkItem) Upsert(ctx context.Context, db DB, params *XoTestsDemoWorkItemCreateParams) (*XoTestsDemoWorkItem, error)
- type XoTestsDemoWorkItemCreateParams
- type XoTestsDemoWorkItemJoins
- type XoTestsDemoWorkItemParams
- type XoTestsDemoWorkItemSelectConfig
- type XoTestsDemoWorkItemSelectConfigOption
- func WithXoTestsDemoWorkItemFilters(filters map[string][]any) XoTestsDemoWorkItemSelectConfigOption
- func WithXoTestsDemoWorkItemHavingClause(conditions map[string][]any) XoTestsDemoWorkItemSelectConfigOption
- func WithXoTestsDemoWorkItemJoin(joins XoTestsDemoWorkItemJoins) XoTestsDemoWorkItemSelectConfigOption
- func WithXoTestsDemoWorkItemLimit(limit int) XoTestsDemoWorkItemSelectConfigOption
- func WithXoTestsDemoWorkItemOrderBy(rows map[string]*Direction) XoTestsDemoWorkItemSelectConfigOption
- type XoTestsDemoWorkItemUpdateParams
- type XoTestsDummyJoin
- func CreateXoTestsDummyJoin(ctx context.Context, db DB, params *XoTestsDummyJoinCreateParams) (*XoTestsDummyJoin, error)
- func XoTestsDummyJoinByDummyJoinID(ctx context.Context, db DB, dummyJoinID XoTestsDummyJoinID, ...) (*XoTestsDummyJoin, error)
- func XoTestsDummyJoinPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsDummyJoin, error)
- func (xtdj *XoTestsDummyJoin) Delete(ctx context.Context, db DB) error
- func (xtdj *XoTestsDummyJoin) Insert(ctx context.Context, db DB) (*XoTestsDummyJoin, error)
- func (xtdj *XoTestsDummyJoin) SetUpdateParams(params *XoTestsDummyJoinUpdateParams)
- func (xtdj *XoTestsDummyJoin) Update(ctx context.Context, db DB) (*XoTestsDummyJoin, error)
- func (xtdj *XoTestsDummyJoin) Upsert(ctx context.Context, db DB, params *XoTestsDummyJoinCreateParams) (*XoTestsDummyJoin, error)
- type XoTestsDummyJoinCreateParams
- type XoTestsDummyJoinID
- type XoTestsDummyJoinJoins
- type XoTestsDummyJoinParams
- type XoTestsDummyJoinSelectConfig
- type XoTestsDummyJoinSelectConfigOption
- func WithXoTestsDummyJoinFilters(filters map[string][]any) XoTestsDummyJoinSelectConfigOption
- func WithXoTestsDummyJoinHavingClause(conditions map[string][]any) XoTestsDummyJoinSelectConfigOption
- func WithXoTestsDummyJoinJoin(joins XoTestsDummyJoinJoins) XoTestsDummyJoinSelectConfigOption
- func WithXoTestsDummyJoinLimit(limit int) XoTestsDummyJoinSelectConfigOption
- func WithXoTestsDummyJoinOrderBy(rows map[string]*Direction) XoTestsDummyJoinSelectConfigOption
- type XoTestsDummyJoinUpdateParams
- type XoTestsNotification
- func CreateXoTestsNotification(ctx context.Context, db DB, params *XoTestsNotificationCreateParams) (*XoTestsNotification, error)
- func XoTestsNotificationByNotificationID(ctx context.Context, db DB, notificationID XoTestsNotificationID, ...) (*XoTestsNotification, error)
- func XoTestsNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsNotification, error)
- func XoTestsNotificationsBySender(ctx context.Context, db DB, sender XoTestsUserID, ...) ([]XoTestsNotification, error)
- func (xtn *XoTestsNotification) Delete(ctx context.Context, db DB) error
- func (xtn *XoTestsNotification) FKUser_Receiver(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtn *XoTestsNotification) FKUser_Sender(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtn *XoTestsNotification) Insert(ctx context.Context, db DB) (*XoTestsNotification, error)
- func (xtn *XoTestsNotification) SetUpdateParams(params *XoTestsNotificationUpdateParams)
- func (xtn *XoTestsNotification) Update(ctx context.Context, db DB) (*XoTestsNotification, error)
- func (xtn *XoTestsNotification) Upsert(ctx context.Context, db DB, params *XoTestsNotificationCreateParams) (*XoTestsNotification, error)
- type XoTestsNotificationCreateParams
- type XoTestsNotificationID
- type XoTestsNotificationJoins
- type XoTestsNotificationParams
- type XoTestsNotificationSelectConfig
- type XoTestsNotificationSelectConfigOption
- func WithXoTestsNotificationFilters(filters map[string][]any) XoTestsNotificationSelectConfigOption
- func WithXoTestsNotificationHavingClause(conditions map[string][]any) XoTestsNotificationSelectConfigOption
- func WithXoTestsNotificationJoin(joins XoTestsNotificationJoins) XoTestsNotificationSelectConfigOption
- func WithXoTestsNotificationLimit(limit int) XoTestsNotificationSelectConfigOption
- func WithXoTestsNotificationOrderBy(rows map[string]*Direction) XoTestsNotificationSelectConfigOption
- type XoTestsNotificationUpdateParams
- type XoTestsPagElement
- func CreateXoTestsPagElement(ctx context.Context, db DB, params *XoTestsPagElementCreateParams) (*XoTestsPagElement, error)
- func XoTestsPagElementByCreatedAt(ctx context.Context, db DB, createdAt time.Time, ...) (*XoTestsPagElement, error)
- func XoTestsPagElementByPaginatedElementID(ctx context.Context, db DB, paginatedElementID XoTestsPagElementID, ...) (*XoTestsPagElement, error)
- func XoTestsPagElementPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsPagElement, error)
- func (xtpe *XoTestsPagElement) Delete(ctx context.Context, db DB) error
- func (xtpe *XoTestsPagElement) FKDummyJoin_Dummy(ctx context.Context, db DB) (*XoTestsDummyJoin, error)
- func (xtpe *XoTestsPagElement) Insert(ctx context.Context, db DB) (*XoTestsPagElement, error)
- func (xtpe *XoTestsPagElement) SetUpdateParams(params *XoTestsPagElementUpdateParams)
- func (xtpe *XoTestsPagElement) Update(ctx context.Context, db DB) (*XoTestsPagElement, error)
- func (xtpe *XoTestsPagElement) Upsert(ctx context.Context, db DB, params *XoTestsPagElementCreateParams) (*XoTestsPagElement, error)
- type XoTestsPagElementCreateParams
- type XoTestsPagElementID
- type XoTestsPagElementJoins
- type XoTestsPagElementParams
- type XoTestsPagElementSelectConfig
- type XoTestsPagElementSelectConfigOption
- func WithXoTestsPagElementFilters(filters map[string][]any) XoTestsPagElementSelectConfigOption
- func WithXoTestsPagElementHavingClause(conditions map[string][]any) XoTestsPagElementSelectConfigOption
- func WithXoTestsPagElementJoin(joins XoTestsPagElementJoins) XoTestsPagElementSelectConfigOption
- func WithXoTestsPagElementLimit(limit int) XoTestsPagElementSelectConfigOption
- func WithXoTestsPagElementOrderBy(rows map[string]*Direction) XoTestsPagElementSelectConfigOption
- type XoTestsPagElementUpdateParams
- type XoTestsTableEntity
- type XoTestsTeam
- func CreateXoTestsTeam(ctx context.Context, db DB, params *XoTestsTeamCreateParams) (*XoTestsTeam, error)
- func XoTestsTeamByTeamID(ctx context.Context, db DB, teamID XoTestsTeamID, ...) (*XoTestsTeam, error)
- func XoTestsTeamPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsTeam, error)
- func (xtt *XoTestsTeam) Delete(ctx context.Context, db DB) error
- func (xtt *XoTestsTeam) Insert(ctx context.Context, db DB) (*XoTestsTeam, error)
- func (xtt *XoTestsTeam) SetUpdateParams(params *XoTestsTeamUpdateParams)
- func (xtt *XoTestsTeam) Update(ctx context.Context, db DB) (*XoTestsTeam, error)
- func (xtt *XoTestsTeam) Upsert(ctx context.Context, db DB, params *XoTestsTeamCreateParams) (*XoTestsTeam, error)
- type XoTestsTeamCreateParams
- type XoTestsTeamID
- type XoTestsTeamJoins
- type XoTestsTeamParams
- type XoTestsTeamSelectConfig
- type XoTestsTeamSelectConfigOption
- func WithXoTestsTeamFilters(filters map[string][]any) XoTestsTeamSelectConfigOption
- func WithXoTestsTeamHavingClause(conditions map[string][]any) XoTestsTeamSelectConfigOption
- func WithXoTestsTeamJoin(joins XoTestsTeamJoins) XoTestsTeamSelectConfigOption
- func WithXoTestsTeamLimit(limit int) XoTestsTeamSelectConfigOption
- func WithXoTestsTeamOrderBy(rows map[string]*Direction) XoTestsTeamSelectConfigOption
- type XoTestsTeamUpdateParams
- type XoTestsTimeEntry
- func CreateXoTestsTimeEntry(ctx context.Context, db DB, params *XoTestsTimeEntryCreateParams) (*XoTestsTimeEntry, error)
- func XoTestsTimeEntryByTimeEntryID(ctx context.Context, db DB, timeEntryID XoTestsTimeEntryID, ...) (*XoTestsTimeEntry, error)
- func XoTestsTimeEntryPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsTimeEntry, error)
- func (xtte *XoTestsTimeEntry) Delete(ctx context.Context, db DB) error
- func (xtte *XoTestsTimeEntry) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
- func (xtte *XoTestsTimeEntry) Insert(ctx context.Context, db DB) (*XoTestsTimeEntry, error)
- func (xtte *XoTestsTimeEntry) SetUpdateParams(params *XoTestsTimeEntryUpdateParams)
- func (xtte *XoTestsTimeEntry) Update(ctx context.Context, db DB) (*XoTestsTimeEntry, error)
- func (xtte *XoTestsTimeEntry) Upsert(ctx context.Context, db DB, params *XoTestsTimeEntryCreateParams) (*XoTestsTimeEntry, error)
- type XoTestsTimeEntryCreateParams
- type XoTestsTimeEntryID
- type XoTestsTimeEntryJoins
- type XoTestsTimeEntryParams
- type XoTestsTimeEntrySelectConfig
- type XoTestsTimeEntrySelectConfigOption
- func WithXoTestsTimeEntryFilters(filters map[string][]any) XoTestsTimeEntrySelectConfigOption
- func WithXoTestsTimeEntryHavingClause(conditions map[string][]any) XoTestsTimeEntrySelectConfigOption
- func WithXoTestsTimeEntryJoin(joins XoTestsTimeEntryJoins) XoTestsTimeEntrySelectConfigOption
- func WithXoTestsTimeEntryLimit(limit int) XoTestsTimeEntrySelectConfigOption
- func WithXoTestsTimeEntryOrderBy(rows map[string]*Direction) XoTestsTimeEntrySelectConfigOption
- type XoTestsTimeEntryUpdateParams
- type XoTestsUser
- func CreateXoTestsUser(ctx context.Context, db DB, params *XoTestsUserCreateParams) (*XoTestsUser, error)
- func XoTestsUserByCreatedAt(ctx context.Context, db DB, createdAt time.Time, ...) (*XoTestsUser, error)
- func XoTestsUserByName(ctx context.Context, db DB, name string, opts ...XoTestsUserSelectConfigOption) (*XoTestsUser, error)
- func XoTestsUserByUserID(ctx context.Context, db DB, userID XoTestsUserID, ...) (*XoTestsUser, error)
- func XoTestsUserPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsUser, error)
- func (xtu *XoTestsUser) Delete(ctx context.Context, db DB) error
- func (xtu *XoTestsUser) FKUserAPIKey_APIKeyID(ctx context.Context, db DB) (*XoTestsUserAPIKey, error)
- func (xtu *XoTestsUser) Insert(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtu *XoTestsUser) Restore(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtu *XoTestsUser) SetUpdateParams(params *XoTestsUserUpdateParams)
- func (xtu *XoTestsUser) SoftDelete(ctx context.Context, db DB) error
- func (xtu *XoTestsUser) Update(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtu *XoTestsUser) Upsert(ctx context.Context, db DB, params *XoTestsUserCreateParams) (*XoTestsUser, error)
- type XoTestsUserAPIKey
- func CreateXoTestsUserAPIKey(ctx context.Context, db DB, params *XoTestsUserAPIKeyCreateParams) (*XoTestsUserAPIKey, error)
- func XoTestsUserAPIKeyByAPIKey(ctx context.Context, db DB, apiKey string, ...) (*XoTestsUserAPIKey, error)
- func XoTestsUserAPIKeyByUserAPIKeyID(ctx context.Context, db DB, userAPIKeyID XoTestsUserAPIKeyID, ...) (*XoTestsUserAPIKey, error)
- func XoTestsUserAPIKeyByUserID(ctx context.Context, db DB, userID XoTestsUserID, ...) (*XoTestsUserAPIKey, error)
- func XoTestsUserAPIKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsUserAPIKey, error)
- func (xtuak *XoTestsUserAPIKey) Delete(ctx context.Context, db DB) error
- func (xtuak *XoTestsUserAPIKey) FKUser_UserID(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtuak *XoTestsUserAPIKey) Insert(ctx context.Context, db DB) (*XoTestsUserAPIKey, error)
- func (xtuak *XoTestsUserAPIKey) SetUpdateParams(params *XoTestsUserAPIKeyUpdateParams)
- func (xtuak *XoTestsUserAPIKey) Update(ctx context.Context, db DB) (*XoTestsUserAPIKey, error)
- func (xtuak *XoTestsUserAPIKey) Upsert(ctx context.Context, db DB, params *XoTestsUserAPIKeyCreateParams) (*XoTestsUserAPIKey, error)
- type XoTestsUserAPIKeyCreateParams
- type XoTestsUserAPIKeyID
- type XoTestsUserAPIKeyJoins
- type XoTestsUserAPIKeyParams
- type XoTestsUserAPIKeySelectConfig
- type XoTestsUserAPIKeySelectConfigOption
- func WithXoTestsUserAPIKeyFilters(filters map[string][]any) XoTestsUserAPIKeySelectConfigOption
- func WithXoTestsUserAPIKeyHavingClause(conditions map[string][]any) XoTestsUserAPIKeySelectConfigOption
- func WithXoTestsUserAPIKeyJoin(joins XoTestsUserAPIKeyJoins) XoTestsUserAPIKeySelectConfigOption
- func WithXoTestsUserAPIKeyLimit(limit int) XoTestsUserAPIKeySelectConfigOption
- func WithXoTestsUserAPIKeyOrderBy(rows map[string]*Direction) XoTestsUserAPIKeySelectConfigOption
- type XoTestsUserAPIKeyUpdateParams
- type XoTestsUserCreateParams
- type XoTestsUserID
- type XoTestsUserJoins
- type XoTestsUserM2MBookBA
- type XoTestsUserM2MBookBASK
- type XoTestsUserM2MWorkItemWIA
- type XoTestsUserParams
- type XoTestsUserSelectConfig
- type XoTestsUserSelectConfigOption
- func WithDeletedXoTestsUserOnly() XoTestsUserSelectConfigOption
- func WithXoTestsUserFilters(filters map[string][]any) XoTestsUserSelectConfigOption
- func WithXoTestsUserHavingClause(conditions map[string][]any) XoTestsUserSelectConfigOption
- func WithXoTestsUserJoin(joins XoTestsUserJoins) XoTestsUserSelectConfigOption
- func WithXoTestsUserLimit(limit int) XoTestsUserSelectConfigOption
- func WithXoTestsUserOrderBy(rows map[string]*Direction) XoTestsUserSelectConfigOption
- type XoTestsUserUpdateParams
- type XoTestsWorkItem
- func CreateXoTestsWorkItem(ctx context.Context, db DB, params *XoTestsWorkItemCreateParams) (*XoTestsWorkItem, error)
- func XoTestsWorkItemByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, ...) (*XoTestsWorkItem, error)
- func XoTestsWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsWorkItem, error)
- func XoTestsWorkItems(ctx context.Context, db DB, opts ...XoTestsWorkItemSelectConfigOption) ([]XoTestsWorkItem, error)
- func XoTestsWorkItemsByTitle(ctx context.Context, db DB, title *string, ...) ([]XoTestsWorkItem, error)
- func (xtwi *XoTestsWorkItem) Delete(ctx context.Context, db DB) error
- func (xtwi *XoTestsWorkItem) FKTeam_TeamID(ctx context.Context, db DB) (*XoTestsTeam, error)
- func (xtwi *XoTestsWorkItem) Insert(ctx context.Context, db DB) (*XoTestsWorkItem, error)
- func (xtwi *XoTestsWorkItem) SetUpdateParams(params *XoTestsWorkItemUpdateParams)
- func (xtwi *XoTestsWorkItem) Update(ctx context.Context, db DB) (*XoTestsWorkItem, error)
- func (xtwi *XoTestsWorkItem) Upsert(ctx context.Context, db DB, params *XoTestsWorkItemCreateParams) (*XoTestsWorkItem, error)
- type XoTestsWorkItemAssignee
- func CreateXoTestsWorkItemAssignee(ctx context.Context, db DB, params *XoTestsWorkItemAssigneeCreateParams) (*XoTestsWorkItemAssignee, error)
- func XoTestsWorkItemAssigneeByWorkItemIDAssignee(ctx context.Context, db DB, workItemID XoTestsWorkItemID, ...) (*XoTestsWorkItemAssignee, error)
- func XoTestsWorkItemAssigneePaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsWorkItemAssignee, error)
- func XoTestsWorkItemAssigneesByAssignee(ctx context.Context, db DB, assignee XoTestsUserID, ...) ([]XoTestsWorkItemAssignee, error)
- func XoTestsWorkItemAssigneesByAssigneeWorkItemID(ctx context.Context, db DB, assignee XoTestsUserID, ...) ([]XoTestsWorkItemAssignee, error)
- func XoTestsWorkItemAssigneesByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, ...) ([]XoTestsWorkItemAssignee, error)
- func (xtwia *XoTestsWorkItemAssignee) Delete(ctx context.Context, db DB) error
- func (xtwia *XoTestsWorkItemAssignee) FKUser_Assignee(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtwia *XoTestsWorkItemAssignee) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
- func (xtwia *XoTestsWorkItemAssignee) Insert(ctx context.Context, db DB) (*XoTestsWorkItemAssignee, error)
- func (xtwia *XoTestsWorkItemAssignee) SetUpdateParams(params *XoTestsWorkItemAssigneeUpdateParams)
- func (xtwia *XoTestsWorkItemAssignee) Update(ctx context.Context, db DB) (*XoTestsWorkItemAssignee, error)
- func (xtwia *XoTestsWorkItemAssignee) Upsert(ctx context.Context, db DB, params *XoTestsWorkItemAssigneeCreateParams) (*XoTestsWorkItemAssignee, error)
- type XoTestsWorkItemAssigneeCreateParams
- type XoTestsWorkItemAssigneeJoins
- type XoTestsWorkItemAssigneeM2MAssigneeWIA
- type XoTestsWorkItemAssigneeM2MWorkItemWIA
- type XoTestsWorkItemAssigneeParams
- type XoTestsWorkItemAssigneeSelectConfig
- type XoTestsWorkItemAssigneeSelectConfigOption
- func WithXoTestsWorkItemAssigneeFilters(filters map[string][]any) XoTestsWorkItemAssigneeSelectConfigOption
- func WithXoTestsWorkItemAssigneeHavingClause(conditions map[string][]any) XoTestsWorkItemAssigneeSelectConfigOption
- func WithXoTestsWorkItemAssigneeJoin(joins XoTestsWorkItemAssigneeJoins) XoTestsWorkItemAssigneeSelectConfigOption
- func WithXoTestsWorkItemAssigneeLimit(limit int) XoTestsWorkItemAssigneeSelectConfigOption
- func WithXoTestsWorkItemAssigneeOrderBy(rows map[string]*Direction) XoTestsWorkItemAssigneeSelectConfigOption
- type XoTestsWorkItemAssigneeUpdateParams
- type XoTestsWorkItemComment
- func CreateXoTestsWorkItemComment(ctx context.Context, db DB, params *XoTestsWorkItemCommentCreateParams) (*XoTestsWorkItemComment, error)
- func XoTestsWorkItemCommentByWorkItemCommentID(ctx context.Context, db DB, workItemCommentID XoTestsWorkItemCommentID, ...) (*XoTestsWorkItemComment, error)
- func XoTestsWorkItemCommentPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]XoTestsWorkItemComment, error)
- func XoTestsWorkItemCommentsByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, ...) ([]XoTestsWorkItemComment, error)
- func (xtwic *XoTestsWorkItemComment) Delete(ctx context.Context, db DB) error
- func (xtwic *XoTestsWorkItemComment) FKUser_UserID(ctx context.Context, db DB) (*XoTestsUser, error)
- func (xtwic *XoTestsWorkItemComment) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
- func (xtwic *XoTestsWorkItemComment) Insert(ctx context.Context, db DB) (*XoTestsWorkItemComment, error)
- func (xtwic *XoTestsWorkItemComment) SetUpdateParams(params *XoTestsWorkItemCommentUpdateParams)
- func (xtwic *XoTestsWorkItemComment) Update(ctx context.Context, db DB) (*XoTestsWorkItemComment, error)
- func (xtwic *XoTestsWorkItemComment) Upsert(ctx context.Context, db DB, params *XoTestsWorkItemCommentCreateParams) (*XoTestsWorkItemComment, error)
- type XoTestsWorkItemCommentCreateParams
- type XoTestsWorkItemCommentID
- type XoTestsWorkItemCommentJoins
- type XoTestsWorkItemCommentParams
- type XoTestsWorkItemCommentSelectConfig
- type XoTestsWorkItemCommentSelectConfigOption
- func WithXoTestsWorkItemCommentFilters(filters map[string][]any) XoTestsWorkItemCommentSelectConfigOption
- func WithXoTestsWorkItemCommentHavingClause(conditions map[string][]any) XoTestsWorkItemCommentSelectConfigOption
- func WithXoTestsWorkItemCommentJoin(joins XoTestsWorkItemCommentJoins) XoTestsWorkItemCommentSelectConfigOption
- func WithXoTestsWorkItemCommentLimit(limit int) XoTestsWorkItemCommentSelectConfigOption
- func WithXoTestsWorkItemCommentOrderBy(rows map[string]*Direction) XoTestsWorkItemCommentSelectConfigOption
- type XoTestsWorkItemCommentUpdateParams
- type XoTestsWorkItemCreateParams
- type XoTestsWorkItemID
- type XoTestsWorkItemJoins
- type XoTestsWorkItemM2MAssigneeWIA
- type XoTestsWorkItemParams
- type XoTestsWorkItemRole
- type XoTestsWorkItemSelectConfig
- type XoTestsWorkItemSelectConfigOption
- func WithXoTestsWorkItemFilters(filters map[string][]any) XoTestsWorkItemSelectConfigOption
- func WithXoTestsWorkItemHavingClause(conditions map[string][]any) XoTestsWorkItemSelectConfigOption
- func WithXoTestsWorkItemJoin(joins XoTestsWorkItemJoins) XoTestsWorkItemSelectConfigOption
- func WithXoTestsWorkItemLimit(limit int) XoTestsWorkItemSelectConfigOption
- func WithXoTestsWorkItemOrderBy(rows map[string]*Direction) XoTestsWorkItemSelectConfigOption
- type XoTestsWorkItemUpdateParams
Constants ¶
This section is empty.
Variables ¶
var EntityFields = map[TableEntity]map[string]DbField{}
var XoTestsCacheEntityFields = map[XoTestsCacheTableEntity]map[string]DbField{}
var XoTestsEntityFields = map[XoTestsTableEntity]map[string]DbField{ XoTestsTableEntityXoTestsBook: { "bookID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_id", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsBookAuthor: { "authorID": DbField{Type: ColumnSimpleTypeString, Db: "author_id", Nullable: false, Public: true}, "bookID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_id", Nullable: false, Public: true}, "pseudonym": DbField{Type: ColumnSimpleTypeString, Db: "pseudonym", Nullable: true, Public: true}, }, XoTestsTableEntityXoTestsBookAuthorsSurrogateKey: { "authorID": DbField{Type: ColumnSimpleTypeString, Db: "author_id", Nullable: false, Public: true}, "bookAuthorsSurrogateKeyID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_authors_surrogate_key_id", Nullable: false, Public: true}, "bookID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_id", Nullable: false, Public: true}, "pseudonym": DbField{Type: ColumnSimpleTypeString, Db: "pseudonym", Nullable: true, Public: true}, }, XoTestsTableEntityXoTestsBookReview: { "bookID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_id", Nullable: false, Public: true}, "bookReviewID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_review_id", Nullable: false, Public: true}, "reviewer": DbField{Type: ColumnSimpleTypeString, Db: "reviewer", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsBookSeller: { "bookID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_id", Nullable: false, Public: true}, "seller": DbField{Type: ColumnSimpleTypeString, Db: "seller", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsCacheDemoWorkItem: { "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: true, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsDemoWorkItem: { "checked": DbField{Type: ColumnSimpleTypeBoolean, Db: "checked", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsDummyJoin: { "dummyJoinID": DbField{Type: ColumnSimpleTypeInteger, Db: "dummy_join_id", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: true, Public: true}, }, XoTestsTableEntityXoTestsNotification: { "body": DbField{Type: ColumnSimpleTypeString, Db: "body", Nullable: false, Public: true}, "notificationID": DbField{Type: ColumnSimpleTypeInteger, Db: "notification_id", Nullable: false, Public: true}, "receiver": DbField{Type: ColumnSimpleTypeString, Db: "receiver", Nullable: true, Public: true}, "sender": DbField{Type: ColumnSimpleTypeString, Db: "sender", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsPagElement: { "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "dummy": DbField{Type: ColumnSimpleTypeInteger, Db: "dummy", Nullable: true, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "paginatedElementID": DbField{Type: ColumnSimpleTypeString, Db: "paginated_element_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsTeam: { "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsTimeEntry: { "start": DbField{Type: ColumnSimpleTypeDateTime, Db: "start", Nullable: false, Public: true}, "timeEntryID": DbField{Type: ColumnSimpleTypeInteger, Db: "time_entry_id", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: true, Public: true}, }, XoTestsTableEntityXoTestsUser: { "apiKeyID": DbField{Type: ColumnSimpleTypeInteger, Db: "api_key_id", Nullable: true, Public: true}, "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "deletedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "deleted_at", Nullable: true, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "userID": DbField{Type: ColumnSimpleTypeString, Db: "user_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsUserAPIKey: { "apiKey": DbField{Type: ColumnSimpleTypeString, Db: "api_key", Nullable: false, Public: true}, "expiresOn": DbField{Type: ColumnSimpleTypeDateTime, Db: "expires_on", Nullable: false, Public: true}, "userAPIKeyID": DbField{Type: ColumnSimpleTypeInteger, Db: "user_api_key_id", Nullable: false, Public: true}, "userID": DbField{Type: ColumnSimpleTypeString, Db: "user_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsWorkItem: { "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: true, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: true, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsWorkItemAssignee: { "assignee": DbField{Type: ColumnSimpleTypeString, Db: "assignee", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, XoTestsTableEntityXoTestsWorkItemComment: { "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "message": DbField{Type: ColumnSimpleTypeString, Db: "message", Nullable: false, Public: true}, "updatedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "updated_at", Nullable: false, Public: true}, "userID": DbField{Type: ColumnSimpleTypeString, Db: "user_id", Nullable: false, Public: true}, "workItemCommentID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_comment_id", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, }
Functions ¶
func Errorf ¶
func Errorf(s string, v ...interface{})
Errorf logs an error message using the package error logger.
func SetErrorLogger ¶
func SetErrorLogger(logger interface{})
SetErrorLogger sets the package error logger. Valid logger types:
io.Writer func(string, ...interface{}) (int, error) // fmt.Printf func(string, ...interface{}) // log.Printf
Types ¶
type ColumnSimpleType ¶
type ColumnSimpleType string
const ( ColumnSimpleTypeDateTime ColumnSimpleType = "date-time" ColumnSimpleTypeInteger ColumnSimpleType = "integer" ColumnSimpleTypeNumber ColumnSimpleType = "number" ColumnSimpleTypeString ColumnSimpleType = "string" ColumnSimpleTypeBoolean ColumnSimpleType = "boolean" ColumnSimpleTypeArray ColumnSimpleType = "array" ColumnSimpleTypeObject ColumnSimpleType = "object" )
type DB ¶
type DB interface { Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) Query(context.Context, string, ...interface{}) (pgx.Rows, error) QueryRow(context.Context, string, ...interface{}) pgx.Row }
DB is the common interface for database operations that can be used with types from schema 'public'.
type DbField ¶
type DbField struct { // Type is one of: string, number, integer, boolean, date-time // Arrays and objects are ignored for default filter generation Type ColumnSimpleType `json:"type"` // Db is the corresponding db column name Db string `json:"db"` Nullable bool `json:"nullable"` Public bool `json:"public"` }
DbField shows db column information.
type ErrInsertFailed ¶
type ErrInsertFailed struct {
Err error
}
ErrInsertFailed is the insert failed error.
func (*ErrInsertFailed) Error ¶
func (err *ErrInsertFailed) Error() string
Error satisfies the error interface.
func (*ErrInsertFailed) Unwrap ¶
func (err *ErrInsertFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type ErrInvalidXoTestsWorkItemRole ¶
type ErrInvalidXoTestsWorkItemRole string
ErrInvalidXoTestsWorkItemRole is the invalid XoTestsWorkItemRole error.
func (ErrInvalidXoTestsWorkItemRole) Error ¶
func (err ErrInvalidXoTestsWorkItemRole) Error() string
Error satisfies the error interface.
type ErrUpdateFailed ¶
type ErrUpdateFailed struct {
Err error
}
ErrUpdateFailed is the update failed error.
func (*ErrUpdateFailed) Error ¶
func (err *ErrUpdateFailed) Error() string
Error satisfies the error interface.
func (*ErrUpdateFailed) Unwrap ¶
func (err *ErrUpdateFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type ErrUpsertFailed ¶
type ErrUpsertFailed struct {
Err error
}
ErrUpsertFailed is the upsert failed error.
func (*ErrUpsertFailed) Error ¶
func (err *ErrUpsertFailed) Error() string
Error satisfies the error interface.
func (*ErrUpsertFailed) Unwrap ¶
func (err *ErrUpsertFailed) Unwrap() error
Unwrap satisfies the unwrap interface.
type Error ¶
type Error string
Error is an error.
const ( // ErrAlreadyExists is the already exists error. ErrAlreadyExists Error = "already exists" // ErrDoesNotExist is the does not exist error. ErrDoesNotExist Error = "does not exist" // ErrMarkedForDeletion is the marked for deletion error. ErrMarkedForDeletion Error = "marked for deletion" )
Error values.
type PaginationCursor ¶
type TableEntity ¶
type TableEntity string
type XoTestsBook ¶
type XoTestsBook struct { BookID XoTestsBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name AuthorsJoin *[]XoTestsBookM2MAuthorBA `json:"-" db:"book_authors_authors"` // M2M book_authors AuthorsBASKJoin *[]XoTestsBookM2MAuthorBASK `json:"-" db:"book_authors_surrogate_key_authors"` // M2M book_authors_surrogate_key BookReviewsJoin *[]XoTestsBookReview `json:"-" db:"book_reviews"` // M2O books SellersJoin *[]XoTestsUser `json:"-" db:"book_sellers_sellers"` // M2M book_sellers }
XoTestsBook represents a row from 'xo_tests.books'.
func CreateXoTestsBook ¶
func CreateXoTestsBook(ctx context.Context, db DB, params *XoTestsBookCreateParams) (*XoTestsBook, error)
CreateXoTestsBook creates a new XoTestsBook in the database with the given params.
func XoTestsBookByBookID ¶
func XoTestsBookByBookID(ctx context.Context, db DB, bookID XoTestsBookID, opts ...XoTestsBookSelectConfigOption) (*XoTestsBook, error)
XoTestsBookByBookID retrieves a row from 'xo_tests.books' as a XoTestsBook.
Generated from index 'books_pkey'.
func XoTestsBookPaginated ¶
func XoTestsBookPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsBookSelectConfigOption) ([]XoTestsBook, error)
XoTestsBookPaginated returns a cursor-paginated list of XoTestsBook. At least one cursor is required.
func (*XoTestsBook) Delete ¶
func (xtb *XoTestsBook) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsBook from the database.
func (*XoTestsBook) Insert ¶
func (xtb *XoTestsBook) Insert(ctx context.Context, db DB) (*XoTestsBook, error)
Insert inserts the XoTestsBook to the database.
func (*XoTestsBook) SetUpdateParams ¶
func (xtb *XoTestsBook) SetUpdateParams(params *XoTestsBookUpdateParams)
SetUpdateParams updates xo_tests.books struct fields with the specified params.
func (*XoTestsBook) Update ¶
func (xtb *XoTestsBook) Update(ctx context.Context, db DB) (*XoTestsBook, error)
Update updates a XoTestsBook in the database.
func (*XoTestsBook) Upsert ¶
func (xtb *XoTestsBook) Upsert(ctx context.Context, db DB, params *XoTestsBookCreateParams) (*XoTestsBook, error)
Upsert upserts a XoTestsBook in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsBookAuthor ¶
type XoTestsBookAuthor struct { BookID XoTestsBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id AuthorID XoTestsUserID `json:"authorID" db:"author_id" required:"true" nullable:"false"` // author_id Pseudonym *string `json:"pseudonym" db:"pseudonym"` // pseudonym BooksJoin *[]XoTestsBookAuthorM2MBookBA `json:"-" db:"book_authors_books"` // M2M book_authors AuthorsJoin *[]XoTestsBookAuthorM2MAuthorBA `json:"-" db:"book_authors_authors"` // M2M book_authors }
XoTestsBookAuthor represents a row from 'xo_tests.book_authors'.
func CreateXoTestsBookAuthor ¶
func CreateXoTestsBookAuthor(ctx context.Context, db DB, params *XoTestsBookAuthorCreateParams) (*XoTestsBookAuthor, error)
CreateXoTestsBookAuthor creates a new XoTestsBookAuthor in the database with the given params.
func XoTestsBookAuthorByBookIDAuthorID ¶
func XoTestsBookAuthorByBookIDAuthorID(ctx context.Context, db DB, bookID XoTestsBookID, authorID XoTestsUserID, opts ...XoTestsBookAuthorSelectConfigOption) (*XoTestsBookAuthor, error)
XoTestsBookAuthorByBookIDAuthorID retrieves a row from 'xo_tests.book_authors' as a XoTestsBookAuthor.
Generated from index 'book_authors_pkey'.
func XoTestsBookAuthorPaginated ¶
func XoTestsBookAuthorPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsBookAuthorSelectConfigOption) ([]XoTestsBookAuthor, error)
XoTestsBookAuthorPaginated returns a cursor-paginated list of XoTestsBookAuthor. At least one cursor is required.
func XoTestsBookAuthorsByAuthorID ¶
func XoTestsBookAuthorsByAuthorID(ctx context.Context, db DB, authorID XoTestsUserID, opts ...XoTestsBookAuthorSelectConfigOption) ([]XoTestsBookAuthor, error)
XoTestsBookAuthorsByAuthorID retrieves a row from 'xo_tests.book_authors' as a XoTestsBookAuthor.
Generated from index 'book_authors_pkey'.
func XoTestsBookAuthorsByBookID ¶
func XoTestsBookAuthorsByBookID(ctx context.Context, db DB, bookID XoTestsBookID, opts ...XoTestsBookAuthorSelectConfigOption) ([]XoTestsBookAuthor, error)
XoTestsBookAuthorsByBookID retrieves a row from 'xo_tests.book_authors' as a XoTestsBookAuthor.
Generated from index 'book_authors_pkey'.
func (*XoTestsBookAuthor) Delete ¶
func (xtba *XoTestsBookAuthor) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsBookAuthor from the database.
func (*XoTestsBookAuthor) FKBook_BookID ¶
func (xtba *XoTestsBookAuthor) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
FKBook_BookID returns the Book associated with the XoTestsBookAuthor's (BookID).
Generated from foreign key 'book_authors_book_id_fkey'.
func (*XoTestsBookAuthor) FKUser_AuthorID ¶
func (xtba *XoTestsBookAuthor) FKUser_AuthorID(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_AuthorID returns the User associated with the XoTestsBookAuthor's (AuthorID).
Generated from foreign key 'book_authors_author_id_fkey'.
func (*XoTestsBookAuthor) Insert ¶
func (xtba *XoTestsBookAuthor) Insert(ctx context.Context, db DB) (*XoTestsBookAuthor, error)
Insert inserts the XoTestsBookAuthor to the database.
func (*XoTestsBookAuthor) SetUpdateParams ¶
func (xtba *XoTestsBookAuthor) SetUpdateParams(params *XoTestsBookAuthorUpdateParams)
SetUpdateParams updates xo_tests.book_authors struct fields with the specified params.
func (*XoTestsBookAuthor) Update ¶
func (xtba *XoTestsBookAuthor) Update(ctx context.Context, db DB) (*XoTestsBookAuthor, error)
Update updates a XoTestsBookAuthor in the database.
func (*XoTestsBookAuthor) Upsert ¶
func (xtba *XoTestsBookAuthor) Upsert(ctx context.Context, db DB, params *XoTestsBookAuthorCreateParams) (*XoTestsBookAuthor, error)
Upsert upserts a XoTestsBookAuthor in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsBookAuthorCreateParams ¶
type XoTestsBookAuthorCreateParams struct { AuthorID XoTestsUserID `json:"authorID" required:"true" nullable:"false"` // author_id BookID XoTestsBookID `json:"bookID" required:"true" nullable:"false"` // book_id Pseudonym *string `json:"pseudonym"` // pseudonym }
XoTestsBookAuthorCreateParams represents insert params for 'xo_tests.book_authors'.
func (XoTestsBookAuthorCreateParams) GetAuthorID ¶
func (p XoTestsBookAuthorCreateParams) GetAuthorID() *XoTestsUserID
func (XoTestsBookAuthorCreateParams) GetBookID ¶
func (p XoTestsBookAuthorCreateParams) GetBookID() *XoTestsBookID
func (XoTestsBookAuthorCreateParams) GetPseudonym ¶
func (p XoTestsBookAuthorCreateParams) GetPseudonym() *string
type XoTestsBookAuthorJoins ¶
type XoTestsBookAuthorM2MAuthorBA ¶
type XoTestsBookAuthorM2MAuthorBA struct { User XoTestsUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsBookAuthorM2MAuthorBA represents a M2M join against "xo_tests.book_authors"
type XoTestsBookAuthorM2MBookBA ¶
type XoTestsBookAuthorM2MBookBA struct { Book XoTestsBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsBookAuthorM2MBookBA represents a M2M join against "xo_tests.book_authors"
type XoTestsBookAuthorParams ¶
type XoTestsBookAuthorParams interface { GetAuthorID() *XoTestsUserID GetBookID() *XoTestsBookID GetPseudonym() *string }
XoTestsBookAuthorParams represents common params for both insert and update of 'xo_tests.book_authors'.
type XoTestsBookAuthorSelectConfig ¶
type XoTestsBookAuthorSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsBookAuthorSelectConfigOption ¶
type XoTestsBookAuthorSelectConfigOption func(*XoTestsBookAuthorSelectConfig)
func WithXoTestsBookAuthorFilters ¶
func WithXoTestsBookAuthorFilters(filters map[string][]any) XoTestsBookAuthorSelectConfigOption
WithXoTestsBookAuthorFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsBookAuthorHavingClause ¶
func WithXoTestsBookAuthorHavingClause(conditions map[string][]any) XoTestsBookAuthorSelectConfigOption
WithXoTestsBookAuthorHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsBookAuthorJoin ¶
func WithXoTestsBookAuthorJoin(joins XoTestsBookAuthorJoins) XoTestsBookAuthorSelectConfigOption
WithXoTestsBookAuthorJoin joins with the given tables.
func WithXoTestsBookAuthorLimit ¶
func WithXoTestsBookAuthorLimit(limit int) XoTestsBookAuthorSelectConfigOption
WithXoTestsBookAuthorLimit limits row selection.
func WithXoTestsBookAuthorOrderBy ¶
func WithXoTestsBookAuthorOrderBy(rows map[string]*Direction) XoTestsBookAuthorSelectConfigOption
WithXoTestsBookAuthorOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsBookAuthorUpdateParams ¶
type XoTestsBookAuthorUpdateParams struct { AuthorID *XoTestsUserID `json:"authorID" nullable:"false"` // author_id BookID *XoTestsBookID `json:"bookID" nullable:"false"` // book_id Pseudonym **string `json:"pseudonym"` // pseudonym }
XoTestsBookAuthorUpdateParams represents update params for 'xo_tests.book_authors'.
func (XoTestsBookAuthorUpdateParams) GetAuthorID ¶
func (p XoTestsBookAuthorUpdateParams) GetAuthorID() *XoTestsUserID
func (XoTestsBookAuthorUpdateParams) GetBookID ¶
func (p XoTestsBookAuthorUpdateParams) GetBookID() *XoTestsBookID
func (XoTestsBookAuthorUpdateParams) GetPseudonym ¶
func (p XoTestsBookAuthorUpdateParams) GetPseudonym() *string
type XoTestsBookAuthorsSurrogateKey ¶
type XoTestsBookAuthorsSurrogateKey struct { BookAuthorsSurrogateKeyID XoTestsBookAuthorsSurrogateKeyID `json:"bookAuthorsSurrogateKeyID" db:"book_authors_surrogate_key_id" required:"true" nullable:"false"` // book_authors_surrogate_key_id BookID XoTestsBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id AuthorID XoTestsUserID `json:"authorID" db:"author_id" required:"true" nullable:"false"` // author_id Pseudonym *string `json:"pseudonym" db:"pseudonym"` // pseudonym BooksJoin *[]XoTestsBookAuthorsSurrogateKeyM2MBookBASK `json:"-" db:"book_authors_surrogate_key_books"` // M2M book_authors_surrogate_key AuthorsJoin *[]XoTestsBookAuthorsSurrogateKeyM2MAuthorBASK `json:"-" db:"book_authors_surrogate_key_authors"` // M2M book_authors_surrogate_key }
XoTestsBookAuthorsSurrogateKey represents a row from 'xo_tests.book_authors_surrogate_key'.
func CreateXoTestsBookAuthorsSurrogateKey ¶
func CreateXoTestsBookAuthorsSurrogateKey(ctx context.Context, db DB, params *XoTestsBookAuthorsSurrogateKeyCreateParams) (*XoTestsBookAuthorsSurrogateKey, error)
CreateXoTestsBookAuthorsSurrogateKey creates a new XoTestsBookAuthorsSurrogateKey in the database with the given params.
func XoTestsBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID ¶
func XoTestsBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID(ctx context.Context, db DB, bookAuthorsSurrogateKeyID XoTestsBookAuthorsSurrogateKeyID, opts ...XoTestsBookAuthorsSurrogateKeySelectConfigOption) (*XoTestsBookAuthorsSurrogateKey, error)
XoTestsBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID retrieves a row from 'xo_tests.book_authors_surrogate_key' as a XoTestsBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_pkey'.
func XoTestsBookAuthorsSurrogateKeyByBookIDAuthorID ¶
func XoTestsBookAuthorsSurrogateKeyByBookIDAuthorID(ctx context.Context, db DB, bookID XoTestsBookID, authorID XoTestsUserID, opts ...XoTestsBookAuthorsSurrogateKeySelectConfigOption) (*XoTestsBookAuthorsSurrogateKey, error)
XoTestsBookAuthorsSurrogateKeyByBookIDAuthorID retrieves a row from 'xo_tests.book_authors_surrogate_key' as a XoTestsBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_book_id_author_id_key'.
func XoTestsBookAuthorsSurrogateKeyPaginated ¶
func XoTestsBookAuthorsSurrogateKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsBookAuthorsSurrogateKeySelectConfigOption) ([]XoTestsBookAuthorsSurrogateKey, error)
XoTestsBookAuthorsSurrogateKeyPaginated returns a cursor-paginated list of XoTestsBookAuthorsSurrogateKey. At least one cursor is required.
func XoTestsBookAuthorsSurrogateKeysByAuthorID ¶
func XoTestsBookAuthorsSurrogateKeysByAuthorID(ctx context.Context, db DB, authorID XoTestsUserID, opts ...XoTestsBookAuthorsSurrogateKeySelectConfigOption) ([]XoTestsBookAuthorsSurrogateKey, error)
XoTestsBookAuthorsSurrogateKeysByAuthorID retrieves a row from 'xo_tests.book_authors_surrogate_key' as a XoTestsBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_book_id_author_id_key'.
func XoTestsBookAuthorsSurrogateKeysByBookID ¶
func XoTestsBookAuthorsSurrogateKeysByBookID(ctx context.Context, db DB, bookID XoTestsBookID, opts ...XoTestsBookAuthorsSurrogateKeySelectConfigOption) ([]XoTestsBookAuthorsSurrogateKey, error)
XoTestsBookAuthorsSurrogateKeysByBookID retrieves a row from 'xo_tests.book_authors_surrogate_key' as a XoTestsBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_book_id_author_id_key'.
func (*XoTestsBookAuthorsSurrogateKey) Delete ¶
func (xtbask *XoTestsBookAuthorsSurrogateKey) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsBookAuthorsSurrogateKey from the database.
func (*XoTestsBookAuthorsSurrogateKey) FKBook_BookID ¶
func (xtbask *XoTestsBookAuthorsSurrogateKey) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
FKBook_BookID returns the Book associated with the XoTestsBookAuthorsSurrogateKey's (BookID).
Generated from foreign key 'book_authors_surrogate_key_book_id_fkey'.
func (*XoTestsBookAuthorsSurrogateKey) FKUser_AuthorID ¶
func (xtbask *XoTestsBookAuthorsSurrogateKey) FKUser_AuthorID(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_AuthorID returns the User associated with the XoTestsBookAuthorsSurrogateKey's (AuthorID).
Generated from foreign key 'book_authors_surrogate_key_author_id_fkey'.
func (*XoTestsBookAuthorsSurrogateKey) Insert ¶
func (xtbask *XoTestsBookAuthorsSurrogateKey) Insert(ctx context.Context, db DB) (*XoTestsBookAuthorsSurrogateKey, error)
Insert inserts the XoTestsBookAuthorsSurrogateKey to the database.
func (*XoTestsBookAuthorsSurrogateKey) SetUpdateParams ¶
func (xtbask *XoTestsBookAuthorsSurrogateKey) SetUpdateParams(params *XoTestsBookAuthorsSurrogateKeyUpdateParams)
SetUpdateParams updates xo_tests.book_authors_surrogate_key struct fields with the specified params.
func (*XoTestsBookAuthorsSurrogateKey) Update ¶
func (xtbask *XoTestsBookAuthorsSurrogateKey) Update(ctx context.Context, db DB) (*XoTestsBookAuthorsSurrogateKey, error)
Update updates a XoTestsBookAuthorsSurrogateKey in the database.
func (*XoTestsBookAuthorsSurrogateKey) Upsert ¶
func (xtbask *XoTestsBookAuthorsSurrogateKey) Upsert(ctx context.Context, db DB, params *XoTestsBookAuthorsSurrogateKeyCreateParams) (*XoTestsBookAuthorsSurrogateKey, error)
Upsert upserts a XoTestsBookAuthorsSurrogateKey in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsBookAuthorsSurrogateKeyCreateParams ¶
type XoTestsBookAuthorsSurrogateKeyCreateParams struct { AuthorID XoTestsUserID `json:"authorID" required:"true" nullable:"false"` // author_id BookID XoTestsBookID `json:"bookID" required:"true" nullable:"false"` // book_id Pseudonym *string `json:"pseudonym"` // pseudonym }
XoTestsBookAuthorsSurrogateKeyCreateParams represents insert params for 'xo_tests.book_authors_surrogate_key'.
func (XoTestsBookAuthorsSurrogateKeyCreateParams) GetAuthorID ¶
func (p XoTestsBookAuthorsSurrogateKeyCreateParams) GetAuthorID() *XoTestsUserID
func (XoTestsBookAuthorsSurrogateKeyCreateParams) GetBookID ¶
func (p XoTestsBookAuthorsSurrogateKeyCreateParams) GetBookID() *XoTestsBookID
func (XoTestsBookAuthorsSurrogateKeyCreateParams) GetPseudonym ¶
func (p XoTestsBookAuthorsSurrogateKeyCreateParams) GetPseudonym() *string
type XoTestsBookAuthorsSurrogateKeyID ¶
type XoTestsBookAuthorsSurrogateKeyID int
type XoTestsBookAuthorsSurrogateKeyM2MAuthorBASK ¶
type XoTestsBookAuthorsSurrogateKeyM2MAuthorBASK struct { User XoTestsUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsBookAuthorsSurrogateKeyM2MAuthorBASK represents a M2M join against "xo_tests.book_authors_surrogate_key"
type XoTestsBookAuthorsSurrogateKeyM2MBookBASK ¶
type XoTestsBookAuthorsSurrogateKeyM2MBookBASK struct { Book XoTestsBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsBookAuthorsSurrogateKeyM2MBookBASK represents a M2M join against "xo_tests.book_authors_surrogate_key"
type XoTestsBookAuthorsSurrogateKeyParams ¶
type XoTestsBookAuthorsSurrogateKeyParams interface { GetAuthorID() *XoTestsUserID GetBookID() *XoTestsBookID GetPseudonym() *string }
XoTestsBookAuthorsSurrogateKeyParams represents common params for both insert and update of 'xo_tests.book_authors_surrogate_key'.
type XoTestsBookAuthorsSurrogateKeySelectConfig ¶
type XoTestsBookAuthorsSurrogateKeySelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsBookAuthorsSurrogateKeySelectConfigOption ¶
type XoTestsBookAuthorsSurrogateKeySelectConfigOption func(*XoTestsBookAuthorsSurrogateKeySelectConfig)
func WithXoTestsBookAuthorsSurrogateKeyFilters ¶
func WithXoTestsBookAuthorsSurrogateKeyFilters(filters map[string][]any) XoTestsBookAuthorsSurrogateKeySelectConfigOption
WithXoTestsBookAuthorsSurrogateKeyFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsBookAuthorsSurrogateKeyHavingClause ¶
func WithXoTestsBookAuthorsSurrogateKeyHavingClause(conditions map[string][]any) XoTestsBookAuthorsSurrogateKeySelectConfigOption
WithXoTestsBookAuthorsSurrogateKeyHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsBookAuthorsSurrogateKeyJoin ¶
func WithXoTestsBookAuthorsSurrogateKeyJoin(joins XoTestsBookAuthorsSurrogateKeyJoins) XoTestsBookAuthorsSurrogateKeySelectConfigOption
WithXoTestsBookAuthorsSurrogateKeyJoin joins with the given tables.
func WithXoTestsBookAuthorsSurrogateKeyLimit ¶
func WithXoTestsBookAuthorsSurrogateKeyLimit(limit int) XoTestsBookAuthorsSurrogateKeySelectConfigOption
WithXoTestsBookAuthorsSurrogateKeyLimit limits row selection.
func WithXoTestsBookAuthorsSurrogateKeyOrderBy ¶
func WithXoTestsBookAuthorsSurrogateKeyOrderBy(rows map[string]*Direction) XoTestsBookAuthorsSurrogateKeySelectConfigOption
WithXoTestsBookAuthorsSurrogateKeyOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsBookAuthorsSurrogateKeyUpdateParams ¶
type XoTestsBookAuthorsSurrogateKeyUpdateParams struct { AuthorID *XoTestsUserID `json:"authorID" nullable:"false"` // author_id BookID *XoTestsBookID `json:"bookID" nullable:"false"` // book_id Pseudonym **string `json:"pseudonym"` // pseudonym }
XoTestsBookAuthorsSurrogateKeyUpdateParams represents update params for 'xo_tests.book_authors_surrogate_key'.
func (XoTestsBookAuthorsSurrogateKeyUpdateParams) GetAuthorID ¶
func (p XoTestsBookAuthorsSurrogateKeyUpdateParams) GetAuthorID() *XoTestsUserID
func (XoTestsBookAuthorsSurrogateKeyUpdateParams) GetBookID ¶
func (p XoTestsBookAuthorsSurrogateKeyUpdateParams) GetBookID() *XoTestsBookID
func (XoTestsBookAuthorsSurrogateKeyUpdateParams) GetPseudonym ¶
func (p XoTestsBookAuthorsSurrogateKeyUpdateParams) GetPseudonym() *string
type XoTestsBookCreateParams ¶
type XoTestsBookCreateParams struct {
Name string `json:"name" required:"true" nullable:"false"` // name
}
XoTestsBookCreateParams represents insert params for 'xo_tests.books'.
func (XoTestsBookCreateParams) GetName ¶
func (p XoTestsBookCreateParams) GetName() *string
type XoTestsBookID ¶
type XoTestsBookID int
type XoTestsBookJoins ¶
type XoTestsBookJoins struct { Authors bool `json:"authors" required:"true" nullable:"false"` // M2M book_authors AuthorsBASK bool `json:"authorsBASK" required:"true" nullable:"false"` // M2M book_authors_surrogate_key BookReviews bool `json:"bookReviews" required:"true" nullable:"false"` // M2O book_reviews Sellers bool `json:"sellers" required:"true" nullable:"false"` // M2M book_sellers }
type XoTestsBookM2MAuthorBA ¶
type XoTestsBookM2MAuthorBA struct { User XoTestsUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsBookM2MAuthorBA represents a M2M join against "xo_tests.book_authors"
type XoTestsBookM2MAuthorBASK ¶
type XoTestsBookM2MAuthorBASK struct { User XoTestsUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsBookM2MAuthorBASK represents a M2M join against "xo_tests.book_authors_surrogate_key"
type XoTestsBookParams ¶
type XoTestsBookParams interface {
GetName() *string
}
XoTestsBookParams represents common params for both insert and update of 'xo_tests.books'.
type XoTestsBookReview ¶
type XoTestsBookReview struct { BookReviewID XoTestsBookReviewID `json:"bookReviewID" db:"book_review_id" required:"true" nullable:"false"` // book_review_id BookID XoTestsBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id Reviewer XoTestsUserID `json:"reviewer" db:"reviewer" required:"true" nullable:"false"` // reviewer BookJoin *XoTestsBook `json:"-" db:"book_book_id"` // O2O books (generated from M2O) UserJoin *XoTestsUser `json:"-" db:"user_reviewer"` // O2O users (generated from M2O) }
XoTestsBookReview represents a row from 'xo_tests.book_reviews'.
func CreateXoTestsBookReview ¶
func CreateXoTestsBookReview(ctx context.Context, db DB, params *XoTestsBookReviewCreateParams) (*XoTestsBookReview, error)
CreateXoTestsBookReview creates a new XoTestsBookReview in the database with the given params.
func XoTestsBookReviewByBookReviewID ¶
func XoTestsBookReviewByBookReviewID(ctx context.Context, db DB, bookReviewID XoTestsBookReviewID, opts ...XoTestsBookReviewSelectConfigOption) (*XoTestsBookReview, error)
XoTestsBookReviewByBookReviewID retrieves a row from 'xo_tests.book_reviews' as a XoTestsBookReview.
Generated from index 'book_reviews_pkey'.
func XoTestsBookReviewByReviewerBookID ¶
func XoTestsBookReviewByReviewerBookID(ctx context.Context, db DB, reviewer XoTestsUserID, bookID XoTestsBookID, opts ...XoTestsBookReviewSelectConfigOption) (*XoTestsBookReview, error)
XoTestsBookReviewByReviewerBookID retrieves a row from 'xo_tests.book_reviews' as a XoTestsBookReview.
Generated from index 'book_reviews_reviewer_book_id_key'.
func XoTestsBookReviewPaginated ¶
func XoTestsBookReviewPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsBookReviewSelectConfigOption) ([]XoTestsBookReview, error)
XoTestsBookReviewPaginated returns a cursor-paginated list of XoTestsBookReview. At least one cursor is required.
func XoTestsBookReviewsByBookID ¶
func XoTestsBookReviewsByBookID(ctx context.Context, db DB, bookID XoTestsBookID, opts ...XoTestsBookReviewSelectConfigOption) ([]XoTestsBookReview, error)
XoTestsBookReviewsByBookID retrieves a row from 'xo_tests.book_reviews' as a XoTestsBookReview.
Generated from index 'book_reviews_reviewer_book_id_key'.
func XoTestsBookReviewsByReviewer ¶
func XoTestsBookReviewsByReviewer(ctx context.Context, db DB, reviewer XoTestsUserID, opts ...XoTestsBookReviewSelectConfigOption) ([]XoTestsBookReview, error)
XoTestsBookReviewsByReviewer retrieves a row from 'xo_tests.book_reviews' as a XoTestsBookReview.
Generated from index 'book_reviews_reviewer_book_id_key'.
func (*XoTestsBookReview) Delete ¶
func (xtbr *XoTestsBookReview) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsBookReview from the database.
func (*XoTestsBookReview) FKBook_BookID ¶
func (xtbr *XoTestsBookReview) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
FKBook_BookID returns the Book associated with the XoTestsBookReview's (BookID).
Generated from foreign key 'book_reviews_book_id_fkey'.
func (*XoTestsBookReview) FKUser_Reviewer ¶
func (xtbr *XoTestsBookReview) FKUser_Reviewer(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_Reviewer returns the User associated with the XoTestsBookReview's (Reviewer).
Generated from foreign key 'book_reviews_reviewer_fkey'.
func (*XoTestsBookReview) Insert ¶
func (xtbr *XoTestsBookReview) Insert(ctx context.Context, db DB) (*XoTestsBookReview, error)
Insert inserts the XoTestsBookReview to the database.
func (*XoTestsBookReview) SetUpdateParams ¶
func (xtbr *XoTestsBookReview) SetUpdateParams(params *XoTestsBookReviewUpdateParams)
SetUpdateParams updates xo_tests.book_reviews struct fields with the specified params.
func (*XoTestsBookReview) Update ¶
func (xtbr *XoTestsBookReview) Update(ctx context.Context, db DB) (*XoTestsBookReview, error)
Update updates a XoTestsBookReview in the database.
func (*XoTestsBookReview) Upsert ¶
func (xtbr *XoTestsBookReview) Upsert(ctx context.Context, db DB, params *XoTestsBookReviewCreateParams) (*XoTestsBookReview, error)
Upsert upserts a XoTestsBookReview in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsBookReviewCreateParams ¶
type XoTestsBookReviewCreateParams struct { BookID XoTestsBookID `json:"bookID" required:"true" nullable:"false"` // book_id Reviewer XoTestsUserID `json:"reviewer" required:"true" nullable:"false"` // reviewer }
XoTestsBookReviewCreateParams represents insert params for 'xo_tests.book_reviews'.
func (XoTestsBookReviewCreateParams) GetBookID ¶
func (p XoTestsBookReviewCreateParams) GetBookID() *XoTestsBookID
func (XoTestsBookReviewCreateParams) GetReviewer ¶
func (p XoTestsBookReviewCreateParams) GetReviewer() *XoTestsUserID
type XoTestsBookReviewID ¶
type XoTestsBookReviewID int
type XoTestsBookReviewJoins ¶
type XoTestsBookReviewParams ¶
type XoTestsBookReviewParams interface { GetBookID() *XoTestsBookID GetReviewer() *XoTestsUserID }
XoTestsBookReviewParams represents common params for both insert and update of 'xo_tests.book_reviews'.
type XoTestsBookReviewSelectConfig ¶
type XoTestsBookReviewSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsBookReviewSelectConfigOption ¶
type XoTestsBookReviewSelectConfigOption func(*XoTestsBookReviewSelectConfig)
func WithXoTestsBookReviewFilters ¶
func WithXoTestsBookReviewFilters(filters map[string][]any) XoTestsBookReviewSelectConfigOption
WithXoTestsBookReviewFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsBookReviewHavingClause ¶
func WithXoTestsBookReviewHavingClause(conditions map[string][]any) XoTestsBookReviewSelectConfigOption
WithXoTestsBookReviewHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsBookReviewJoin ¶
func WithXoTestsBookReviewJoin(joins XoTestsBookReviewJoins) XoTestsBookReviewSelectConfigOption
WithXoTestsBookReviewJoin joins with the given tables.
func WithXoTestsBookReviewLimit ¶
func WithXoTestsBookReviewLimit(limit int) XoTestsBookReviewSelectConfigOption
WithXoTestsBookReviewLimit limits row selection.
func WithXoTestsBookReviewOrderBy ¶
func WithXoTestsBookReviewOrderBy(rows map[string]*Direction) XoTestsBookReviewSelectConfigOption
WithXoTestsBookReviewOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsBookReviewUpdateParams ¶
type XoTestsBookReviewUpdateParams struct { BookID *XoTestsBookID `json:"bookID" nullable:"false"` // book_id Reviewer *XoTestsUserID `json:"reviewer" nullable:"false"` // reviewer }
XoTestsBookReviewUpdateParams represents update params for 'xo_tests.book_reviews'.
func (XoTestsBookReviewUpdateParams) GetBookID ¶
func (p XoTestsBookReviewUpdateParams) GetBookID() *XoTestsBookID
func (XoTestsBookReviewUpdateParams) GetReviewer ¶
func (p XoTestsBookReviewUpdateParams) GetReviewer() *XoTestsUserID
type XoTestsBookSelectConfig ¶
type XoTestsBookSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsBookSelectConfigOption ¶
type XoTestsBookSelectConfigOption func(*XoTestsBookSelectConfig)
func WithXoTestsBookFilters ¶
func WithXoTestsBookFilters(filters map[string][]any) XoTestsBookSelectConfigOption
WithXoTestsBookFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsBookHavingClause ¶
func WithXoTestsBookHavingClause(conditions map[string][]any) XoTestsBookSelectConfigOption
WithXoTestsBookHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsBookJoin ¶
func WithXoTestsBookJoin(joins XoTestsBookJoins) XoTestsBookSelectConfigOption
WithXoTestsBookJoin joins with the given tables.
func WithXoTestsBookLimit ¶
func WithXoTestsBookLimit(limit int) XoTestsBookSelectConfigOption
WithXoTestsBookLimit limits row selection.
func WithXoTestsBookOrderBy ¶
func WithXoTestsBookOrderBy(rows map[string]*Direction) XoTestsBookSelectConfigOption
WithXoTestsBookOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsBookSeller ¶
type XoTestsBookSeller struct { BookID XoTestsBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id Seller XoTestsUserID `json:"seller" db:"seller" required:"true" nullable:"false"` // seller SellersJoin *[]XoTestsUser `json:"-" db:"book_sellers_sellers"` // M2M book_sellers BooksJoin *[]XoTestsBook `json:"-" db:"book_sellers_books"` // M2M book_sellers }
XoTestsBookSeller represents a row from 'xo_tests.book_sellers'.
func CreateXoTestsBookSeller ¶
func CreateXoTestsBookSeller(ctx context.Context, db DB, params *XoTestsBookSellerCreateParams) (*XoTestsBookSeller, error)
CreateXoTestsBookSeller creates a new XoTestsBookSeller in the database with the given params.
func XoTestsBookSellerPaginated ¶
func XoTestsBookSellerPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsBookSellerSelectConfigOption) ([]XoTestsBookSeller, error)
XoTestsBookSellerPaginated returns a cursor-paginated list of XoTestsBookSeller. At least one cursor is required.
func XoTestsBookSellersByBookID ¶
func XoTestsBookSellersByBookID(ctx context.Context, db DB, bookID XoTestsBookID, opts ...XoTestsBookSellerSelectConfigOption) ([]XoTestsBookSeller, error)
XoTestsBookSellersByBookID retrieves a row from 'xo_tests.book_sellers' as a XoTestsBookSeller.
Generated from index 'book_sellers_pkey'.
func XoTestsBookSellersByBookIDSeller ¶
func XoTestsBookSellersByBookIDSeller(ctx context.Context, db DB, bookID XoTestsBookID, seller XoTestsUserID, opts ...XoTestsBookSellerSelectConfigOption) ([]XoTestsBookSeller, error)
XoTestsBookSellersByBookIDSeller retrieves a row from 'xo_tests.book_sellers' as a XoTestsBookSeller.
Generated from index 'book_sellers_book_id_seller_idx'.
func XoTestsBookSellersBySeller ¶
func XoTestsBookSellersBySeller(ctx context.Context, db DB, seller XoTestsUserID, opts ...XoTestsBookSellerSelectConfigOption) ([]XoTestsBookSeller, error)
XoTestsBookSellersBySeller retrieves a row from 'xo_tests.book_sellers' as a XoTestsBookSeller.
Generated from index 'book_sellers_pkey'.
func XoTestsBookSellersBySellerBookID ¶
func XoTestsBookSellersBySellerBookID(ctx context.Context, db DB, seller XoTestsUserID, bookID XoTestsBookID, opts ...XoTestsBookSellerSelectConfigOption) ([]XoTestsBookSeller, error)
XoTestsBookSellersBySellerBookID retrieves a row from 'xo_tests.book_sellers' as a XoTestsBookSeller.
Generated from index 'book_sellers_seller_book_id_idx'.
func (*XoTestsBookSeller) Delete ¶
func (xtbs *XoTestsBookSeller) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsBookSeller from the database.
func (*XoTestsBookSeller) FKBook_BookID ¶
func (xtbs *XoTestsBookSeller) FKBook_BookID(ctx context.Context, db DB) (*XoTestsBook, error)
FKBook_BookID returns the Book associated with the XoTestsBookSeller's (BookID).
Generated from foreign key 'book_sellers_book_id_fkey'.
func (*XoTestsBookSeller) FKUser_Seller ¶
func (xtbs *XoTestsBookSeller) FKUser_Seller(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_Seller returns the User associated with the XoTestsBookSeller's (Seller).
Generated from foreign key 'book_sellers_seller_fkey'.
func (*XoTestsBookSeller) Insert ¶
func (xtbs *XoTestsBookSeller) Insert(ctx context.Context, db DB) (*XoTestsBookSeller, error)
Insert inserts the XoTestsBookSeller to the database.
func (*XoTestsBookSeller) SetUpdateParams ¶
func (xtbs *XoTestsBookSeller) SetUpdateParams(params *XoTestsBookSellerUpdateParams)
SetUpdateParams updates xo_tests.book_sellers struct fields with the specified params.
type XoTestsBookSellerCreateParams ¶
type XoTestsBookSellerCreateParams struct { BookID XoTestsBookID `json:"bookID" required:"true" nullable:"false"` // book_id Seller XoTestsUserID `json:"seller" required:"true" nullable:"false"` // seller }
XoTestsBookSellerCreateParams represents insert params for 'xo_tests.book_sellers'.
func (XoTestsBookSellerCreateParams) GetBookID ¶
func (p XoTestsBookSellerCreateParams) GetBookID() *XoTestsBookID
func (XoTestsBookSellerCreateParams) GetSeller ¶
func (p XoTestsBookSellerCreateParams) GetSeller() *XoTestsUserID
type XoTestsBookSellerJoins ¶
type XoTestsBookSellerParams ¶
type XoTestsBookSellerParams interface { GetBookID() *XoTestsBookID GetSeller() *XoTestsUserID }
XoTestsBookSellerParams represents common params for both insert and update of 'xo_tests.book_sellers'.
type XoTestsBookSellerSelectConfig ¶
type XoTestsBookSellerSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsBookSellerSelectConfigOption ¶
type XoTestsBookSellerSelectConfigOption func(*XoTestsBookSellerSelectConfig)
func WithXoTestsBookSellerFilters ¶
func WithXoTestsBookSellerFilters(filters map[string][]any) XoTestsBookSellerSelectConfigOption
WithXoTestsBookSellerFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsBookSellerHavingClause ¶
func WithXoTestsBookSellerHavingClause(conditions map[string][]any) XoTestsBookSellerSelectConfigOption
WithXoTestsBookSellerHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsBookSellerJoin ¶
func WithXoTestsBookSellerJoin(joins XoTestsBookSellerJoins) XoTestsBookSellerSelectConfigOption
WithXoTestsBookSellerJoin joins with the given tables.
func WithXoTestsBookSellerLimit ¶
func WithXoTestsBookSellerLimit(limit int) XoTestsBookSellerSelectConfigOption
WithXoTestsBookSellerLimit limits row selection.
func WithXoTestsBookSellerOrderBy ¶
func WithXoTestsBookSellerOrderBy(rows map[string]*Direction) XoTestsBookSellerSelectConfigOption
WithXoTestsBookSellerOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsBookSellerUpdateParams ¶
type XoTestsBookSellerUpdateParams struct { BookID *XoTestsBookID `json:"bookID" nullable:"false"` // book_id Seller *XoTestsUserID `json:"seller" nullable:"false"` // seller }
XoTestsBookSellerUpdateParams represents update params for 'xo_tests.book_sellers'.
func (XoTestsBookSellerUpdateParams) GetBookID ¶
func (p XoTestsBookSellerUpdateParams) GetBookID() *XoTestsBookID
func (XoTestsBookSellerUpdateParams) GetSeller ¶
func (p XoTestsBookSellerUpdateParams) GetSeller() *XoTestsUserID
type XoTestsBookUpdateParams ¶
type XoTestsBookUpdateParams struct {
Name *string `json:"name" nullable:"false"` // name
}
XoTestsBookUpdateParams represents update params for 'xo_tests.books'.
func (XoTestsBookUpdateParams) GetName ¶
func (p XoTestsBookUpdateParams) GetName() *string
type XoTestsCacheDemoWorkItem ¶
type XoTestsCacheDemoWorkItem struct { WorkItemID XoTestsWorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Title *string `json:"title" db:"title"` // title TeamID XoTestsTeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id TeamJoin *XoTestsTeam `json:"-" db:"team_team_id"` // O2O teams (inferred) TimeEntriesJoin *[]XoTestsTimeEntry `json:"-" db:"time_entries"` // M2O cache__demo_work_items AssigneesJoin *[]XoTestsCacheDemoWorkItemM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee WorkItemCommentsJoin *[]XoTestsWorkItemComment `json:"-" db:"work_item_comments"` // M2O cache__demo_work_items }
XoTestsCacheDemoWorkItem represents a row from 'xo_tests.cache__demo_work_items'.
func CreateXoTestsCacheDemoWorkItem ¶
func CreateXoTestsCacheDemoWorkItem(ctx context.Context, db DB, params *XoTestsCacheDemoWorkItemCreateParams) (*XoTestsCacheDemoWorkItem, error)
CreateXoTestsCacheDemoWorkItem creates a new XoTestsCacheDemoWorkItem in the database with the given params.
func XoTestsCacheDemoWorkItemByWorkItemID ¶
func XoTestsCacheDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID int, opts ...XoTestsCacheDemoWorkItemSelectConfigOption) (*XoTestsCacheDemoWorkItem, error)
XoTestsCacheDemoWorkItemByWorkItemID retrieves a row from 'xo_tests.cache__demo_work_items' as a XoTestsCacheDemoWorkItem.
Generated from index 'cache__demo_work_items_pkey'.
func XoTestsCacheDemoWorkItemPaginated ¶
func XoTestsCacheDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsCacheDemoWorkItemSelectConfigOption) ([]XoTestsCacheDemoWorkItem, error)
XoTestsCacheDemoWorkItemPaginated returns a cursor-paginated list of XoTestsCacheDemoWorkItem. At least one cursor is required.
func (*XoTestsCacheDemoWorkItem) Delete ¶
func (xtcdwi *XoTestsCacheDemoWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsCacheDemoWorkItem from the database.
func (*XoTestsCacheDemoWorkItem) FKTeam_TeamID ¶
func (xtcdwi *XoTestsCacheDemoWorkItem) FKTeam_TeamID(ctx context.Context, db DB) (*XoTestsTeam, error)
FKTeam_TeamID returns the Team associated with the XoTestsCacheDemoWorkItem's (TeamID).
Generated from foreign key 'cache__demo_work_items_team_id_fkey'.
func (*XoTestsCacheDemoWorkItem) FKWorkItem_WorkItemID ¶
func (xtcdwi *XoTestsCacheDemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the XoTestsCacheDemoWorkItem's (WorkItemID).
Generated from foreign key 'cache__demo_work_items_work_item_id_fkey'.
func (*XoTestsCacheDemoWorkItem) Insert ¶
func (xtcdwi *XoTestsCacheDemoWorkItem) Insert(ctx context.Context, db DB) (*XoTestsCacheDemoWorkItem, error)
Insert inserts the XoTestsCacheDemoWorkItem to the database.
func (*XoTestsCacheDemoWorkItem) SetUpdateParams ¶
func (xtcdwi *XoTestsCacheDemoWorkItem) SetUpdateParams(params *XoTestsCacheDemoWorkItemUpdateParams)
SetUpdateParams updates xo_tests.cache__demo_work_items struct fields with the specified params.
func (*XoTestsCacheDemoWorkItem) Update ¶
func (xtcdwi *XoTestsCacheDemoWorkItem) Update(ctx context.Context, db DB) (*XoTestsCacheDemoWorkItem, error)
Update updates a XoTestsCacheDemoWorkItem in the database.
func (*XoTestsCacheDemoWorkItem) Upsert ¶
func (xtcdwi *XoTestsCacheDemoWorkItem) Upsert(ctx context.Context, db DB, params *XoTestsCacheDemoWorkItemCreateParams) (*XoTestsCacheDemoWorkItem, error)
Upsert upserts a XoTestsCacheDemoWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsCacheDemoWorkItemCreateParams ¶
type XoTestsCacheDemoWorkItemCreateParams struct { TeamID XoTestsTeamID `json:"teamID" required:"true" nullable:"false"` // team_id Title *string `json:"title"` // title WorkItemID XoTestsWorkItemID `json:"-" required:"true" nullable:"false"` // work_item_id }
XoTestsCacheDemoWorkItemCreateParams represents insert params for 'xo_tests.cache__demo_work_items'.
func (XoTestsCacheDemoWorkItemCreateParams) GetTeamID ¶
func (p XoTestsCacheDemoWorkItemCreateParams) GetTeamID() *XoTestsTeamID
func (XoTestsCacheDemoWorkItemCreateParams) GetTitle ¶
func (p XoTestsCacheDemoWorkItemCreateParams) GetTitle() *string
type XoTestsCacheDemoWorkItemJoins ¶
type XoTestsCacheDemoWorkItemJoins struct { Team bool `json:"team" required:"true" nullable:"false"` // O2O teams TimeEntries bool `json:"timeEntries" required:"true" nullable:"false"` // M2O time_entries Assignees bool `json:"assignees" required:"true" nullable:"false"` // M2M work_item_assignee WorkItemComments bool `json:"workItemComments" required:"true" nullable:"false"` // M2O work_item_comments }
type XoTestsCacheDemoWorkItemM2MAssigneeWIA ¶
type XoTestsCacheDemoWorkItemM2MAssigneeWIA struct { User XoTestsUser `json:"user" db:"users" required:"true"` Role *XoTestsWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
XoTestsCacheDemoWorkItemM2MAssigneeWIA represents a M2M join against "xo_tests.work_item_assignee"
type XoTestsCacheDemoWorkItemParams ¶
type XoTestsCacheDemoWorkItemParams interface { GetTeamID() *XoTestsTeamID GetTitle() *string }
XoTestsCacheDemoWorkItemParams represents common params for both insert and update of 'xo_tests.cache__demo_work_items'.
type XoTestsCacheDemoWorkItemSelectConfig ¶
type XoTestsCacheDemoWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsCacheDemoWorkItemSelectConfigOption ¶
type XoTestsCacheDemoWorkItemSelectConfigOption func(*XoTestsCacheDemoWorkItemSelectConfig)
func WithXoTestsCacheDemoWorkItemFilters ¶
func WithXoTestsCacheDemoWorkItemFilters(filters map[string][]any) XoTestsCacheDemoWorkItemSelectConfigOption
WithXoTestsCacheDemoWorkItemFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsCacheDemoWorkItemHavingClause ¶
func WithXoTestsCacheDemoWorkItemHavingClause(conditions map[string][]any) XoTestsCacheDemoWorkItemSelectConfigOption
WithXoTestsCacheDemoWorkItemHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsCacheDemoWorkItemJoin ¶
func WithXoTestsCacheDemoWorkItemJoin(joins XoTestsCacheDemoWorkItemJoins) XoTestsCacheDemoWorkItemSelectConfigOption
WithXoTestsCacheDemoWorkItemJoin joins with the given tables.
func WithXoTestsCacheDemoWorkItemLimit ¶
func WithXoTestsCacheDemoWorkItemLimit(limit int) XoTestsCacheDemoWorkItemSelectConfigOption
WithXoTestsCacheDemoWorkItemLimit limits row selection.
func WithXoTestsCacheDemoWorkItemOrderBy ¶
func WithXoTestsCacheDemoWorkItemOrderBy(rows map[string]*Direction) XoTestsCacheDemoWorkItemSelectConfigOption
WithXoTestsCacheDemoWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsCacheDemoWorkItemUpdateParams ¶
type XoTestsCacheDemoWorkItemUpdateParams struct { TeamID *XoTestsTeamID `json:"teamID" nullable:"false"` // team_id Title **string `json:"title"` // title }
XoTestsCacheDemoWorkItemUpdateParams represents update params for 'xo_tests.cache__demo_work_items'.
func (XoTestsCacheDemoWorkItemUpdateParams) GetTeamID ¶
func (p XoTestsCacheDemoWorkItemUpdateParams) GetTeamID() *XoTestsTeamID
func (XoTestsCacheDemoWorkItemUpdateParams) GetTitle ¶
func (p XoTestsCacheDemoWorkItemUpdateParams) GetTitle() *string
type XoTestsCacheTableEntity ¶
type XoTestsCacheTableEntity string
type XoTestsDemoWorkItem ¶
type XoTestsDemoWorkItem struct { WorkItemID XoTestsWorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Checked bool `json:"checked" db:"checked" required:"true" nullable:"false"` // checked WorkItemJoin *XoTestsWorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (inferred) }
XoTestsDemoWorkItem represents a row from 'xo_tests.demo_work_items'.
func CreateXoTestsDemoWorkItem ¶
func CreateXoTestsDemoWorkItem(ctx context.Context, db DB, params *XoTestsDemoWorkItemCreateParams) (*XoTestsDemoWorkItem, error)
CreateXoTestsDemoWorkItem creates a new XoTestsDemoWorkItem in the database with the given params.
func XoTestsDemoWorkItemByWorkItemID ¶
func XoTestsDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, opts ...XoTestsDemoWorkItemSelectConfigOption) (*XoTestsDemoWorkItem, error)
XoTestsDemoWorkItemByWorkItemID retrieves a row from 'xo_tests.demo_work_items' as a XoTestsDemoWorkItem.
Generated from index 'demo_work_items_pkey'.
func XoTestsDemoWorkItemPaginated ¶
func XoTestsDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsDemoWorkItemSelectConfigOption) ([]XoTestsDemoWorkItem, error)
XoTestsDemoWorkItemPaginated returns a cursor-paginated list of XoTestsDemoWorkItem. At least one cursor is required.
func (*XoTestsDemoWorkItem) Delete ¶
func (xtdwi *XoTestsDemoWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsDemoWorkItem from the database.
func (*XoTestsDemoWorkItem) FKWorkItem_WorkItemID ¶
func (xtdwi *XoTestsDemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the XoTestsDemoWorkItem's (WorkItemID).
Generated from foreign key 'demo_work_items_work_item_id_fkey'.
func (*XoTestsDemoWorkItem) Insert ¶
func (xtdwi *XoTestsDemoWorkItem) Insert(ctx context.Context, db DB) (*XoTestsDemoWorkItem, error)
Insert inserts the XoTestsDemoWorkItem to the database.
func (*XoTestsDemoWorkItem) SetUpdateParams ¶
func (xtdwi *XoTestsDemoWorkItem) SetUpdateParams(params *XoTestsDemoWorkItemUpdateParams)
SetUpdateParams updates xo_tests.demo_work_items struct fields with the specified params.
func (*XoTestsDemoWorkItem) Update ¶
func (xtdwi *XoTestsDemoWorkItem) Update(ctx context.Context, db DB) (*XoTestsDemoWorkItem, error)
Update updates a XoTestsDemoWorkItem in the database.
func (*XoTestsDemoWorkItem) Upsert ¶
func (xtdwi *XoTestsDemoWorkItem) Upsert(ctx context.Context, db DB, params *XoTestsDemoWorkItemCreateParams) (*XoTestsDemoWorkItem, error)
Upsert upserts a XoTestsDemoWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsDemoWorkItemCreateParams ¶
type XoTestsDemoWorkItemCreateParams struct { Checked bool `json:"checked" required:"true" nullable:"false"` // checked WorkItemID XoTestsWorkItemID `json:"-" required:"true" nullable:"false"` // work_item_id }
XoTestsDemoWorkItemCreateParams represents insert params for 'xo_tests.demo_work_items'.
func (XoTestsDemoWorkItemCreateParams) GetChecked ¶
func (p XoTestsDemoWorkItemCreateParams) GetChecked() *bool
type XoTestsDemoWorkItemJoins ¶
type XoTestsDemoWorkItemJoins struct {
WorkItem bool `json:"workItem" required:"true" nullable:"false"` // O2O work_items
}
type XoTestsDemoWorkItemParams ¶
type XoTestsDemoWorkItemParams interface {
GetChecked() *bool
}
XoTestsDemoWorkItemParams represents common params for both insert and update of 'xo_tests.demo_work_items'.
type XoTestsDemoWorkItemSelectConfig ¶
type XoTestsDemoWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsDemoWorkItemSelectConfigOption ¶
type XoTestsDemoWorkItemSelectConfigOption func(*XoTestsDemoWorkItemSelectConfig)
func WithXoTestsDemoWorkItemFilters ¶
func WithXoTestsDemoWorkItemFilters(filters map[string][]any) XoTestsDemoWorkItemSelectConfigOption
WithXoTestsDemoWorkItemFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsDemoWorkItemHavingClause ¶
func WithXoTestsDemoWorkItemHavingClause(conditions map[string][]any) XoTestsDemoWorkItemSelectConfigOption
WithXoTestsDemoWorkItemHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsDemoWorkItemJoin ¶
func WithXoTestsDemoWorkItemJoin(joins XoTestsDemoWorkItemJoins) XoTestsDemoWorkItemSelectConfigOption
WithXoTestsDemoWorkItemJoin joins with the given tables.
func WithXoTestsDemoWorkItemLimit ¶
func WithXoTestsDemoWorkItemLimit(limit int) XoTestsDemoWorkItemSelectConfigOption
WithXoTestsDemoWorkItemLimit limits row selection.
func WithXoTestsDemoWorkItemOrderBy ¶
func WithXoTestsDemoWorkItemOrderBy(rows map[string]*Direction) XoTestsDemoWorkItemSelectConfigOption
WithXoTestsDemoWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsDemoWorkItemUpdateParams ¶
type XoTestsDemoWorkItemUpdateParams struct {
Checked *bool `json:"checked" nullable:"false"` // checked
}
XoTestsDemoWorkItemUpdateParams represents update params for 'xo_tests.demo_work_items'.
func (XoTestsDemoWorkItemUpdateParams) GetChecked ¶
func (p XoTestsDemoWorkItemUpdateParams) GetChecked() *bool
type XoTestsDummyJoin ¶
type XoTestsDummyJoin struct { DummyJoinID XoTestsDummyJoinID `json:"dummyJoinID" db:"dummy_join_id" required:"true" nullable:"false"` // dummy_join_id Name *string `json:"name" db:"name"` // name }
XoTestsDummyJoin represents a row from 'xo_tests.dummy_join'.
func CreateXoTestsDummyJoin ¶
func CreateXoTestsDummyJoin(ctx context.Context, db DB, params *XoTestsDummyJoinCreateParams) (*XoTestsDummyJoin, error)
CreateXoTestsDummyJoin creates a new XoTestsDummyJoin in the database with the given params.
func XoTestsDummyJoinByDummyJoinID ¶
func XoTestsDummyJoinByDummyJoinID(ctx context.Context, db DB, dummyJoinID XoTestsDummyJoinID, opts ...XoTestsDummyJoinSelectConfigOption) (*XoTestsDummyJoin, error)
XoTestsDummyJoinByDummyJoinID retrieves a row from 'xo_tests.dummy_join' as a XoTestsDummyJoin.
Generated from index 'dummy_join_pkey'.
func XoTestsDummyJoinPaginated ¶
func XoTestsDummyJoinPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsDummyJoinSelectConfigOption) ([]XoTestsDummyJoin, error)
XoTestsDummyJoinPaginated returns a cursor-paginated list of XoTestsDummyJoin. At least one cursor is required.
func (*XoTestsDummyJoin) Delete ¶
func (xtdj *XoTestsDummyJoin) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsDummyJoin from the database.
func (*XoTestsDummyJoin) Insert ¶
func (xtdj *XoTestsDummyJoin) Insert(ctx context.Context, db DB) (*XoTestsDummyJoin, error)
Insert inserts the XoTestsDummyJoin to the database.
func (*XoTestsDummyJoin) SetUpdateParams ¶
func (xtdj *XoTestsDummyJoin) SetUpdateParams(params *XoTestsDummyJoinUpdateParams)
SetUpdateParams updates xo_tests.dummy_join struct fields with the specified params.
func (*XoTestsDummyJoin) Update ¶
func (xtdj *XoTestsDummyJoin) Update(ctx context.Context, db DB) (*XoTestsDummyJoin, error)
Update updates a XoTestsDummyJoin in the database.
func (*XoTestsDummyJoin) Upsert ¶
func (xtdj *XoTestsDummyJoin) Upsert(ctx context.Context, db DB, params *XoTestsDummyJoinCreateParams) (*XoTestsDummyJoin, error)
Upsert upserts a XoTestsDummyJoin in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsDummyJoinCreateParams ¶
type XoTestsDummyJoinCreateParams struct {
Name *string `json:"name"` // name
}
XoTestsDummyJoinCreateParams represents insert params for 'xo_tests.dummy_join'.
func (XoTestsDummyJoinCreateParams) GetName ¶
func (p XoTestsDummyJoinCreateParams) GetName() *string
type XoTestsDummyJoinID ¶
type XoTestsDummyJoinID int
type XoTestsDummyJoinJoins ¶
type XoTestsDummyJoinJoins struct{}
type XoTestsDummyJoinParams ¶
type XoTestsDummyJoinParams interface {
GetName() *string
}
XoTestsDummyJoinParams represents common params for both insert and update of 'xo_tests.dummy_join'.
type XoTestsDummyJoinSelectConfig ¶
type XoTestsDummyJoinSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsDummyJoinSelectConfigOption ¶
type XoTestsDummyJoinSelectConfigOption func(*XoTestsDummyJoinSelectConfig)
func WithXoTestsDummyJoinFilters ¶
func WithXoTestsDummyJoinFilters(filters map[string][]any) XoTestsDummyJoinSelectConfigOption
WithXoTestsDummyJoinFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsDummyJoinHavingClause ¶
func WithXoTestsDummyJoinHavingClause(conditions map[string][]any) XoTestsDummyJoinSelectConfigOption
WithXoTestsDummyJoinHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsDummyJoinJoin ¶
func WithXoTestsDummyJoinJoin(joins XoTestsDummyJoinJoins) XoTestsDummyJoinSelectConfigOption
WithXoTestsDummyJoinJoin joins with the given tables.
func WithXoTestsDummyJoinLimit ¶
func WithXoTestsDummyJoinLimit(limit int) XoTestsDummyJoinSelectConfigOption
WithXoTestsDummyJoinLimit limits row selection.
func WithXoTestsDummyJoinOrderBy ¶
func WithXoTestsDummyJoinOrderBy(rows map[string]*Direction) XoTestsDummyJoinSelectConfigOption
WithXoTestsDummyJoinOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsDummyJoinUpdateParams ¶
type XoTestsDummyJoinUpdateParams struct {
Name **string `json:"name"` // name
}
XoTestsDummyJoinUpdateParams represents update params for 'xo_tests.dummy_join'.
func (XoTestsDummyJoinUpdateParams) GetName ¶
func (p XoTestsDummyJoinUpdateParams) GetName() *string
type XoTestsNotification ¶
type XoTestsNotification struct { NotificationID XoTestsNotificationID `json:"notificationID" db:"notification_id" required:"true" nullable:"false"` // notification_id Body string `json:"-" db:"body" nullable:"false" pattern:"^[A-Za-z0-9]*$"` // body Sender XoTestsUserID `json:"sender" db:"sender" required:"true" nullable:"false"` // sender Receiver *XoTestsUserID `json:"receiver" db:"receiver"` // receiver UserReceiverJoin *XoTestsUser `json:"-" db:"user_receiver"` // O2O users (generated from M2O) UserSenderJoin *XoTestsUser `json:"-" db:"user_sender"` // O2O users (generated from M2O) }
XoTestsNotification represents a row from 'xo_tests.notifications'.
func CreateXoTestsNotification ¶
func CreateXoTestsNotification(ctx context.Context, db DB, params *XoTestsNotificationCreateParams) (*XoTestsNotification, error)
CreateXoTestsNotification creates a new XoTestsNotification in the database with the given params.
func XoTestsNotificationByNotificationID ¶
func XoTestsNotificationByNotificationID(ctx context.Context, db DB, notificationID XoTestsNotificationID, opts ...XoTestsNotificationSelectConfigOption) (*XoTestsNotification, error)
XoTestsNotificationByNotificationID retrieves a row from 'xo_tests.notifications' as a XoTestsNotification.
Generated from index 'notifications_pkey'.
func XoTestsNotificationPaginated ¶
func XoTestsNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsNotificationSelectConfigOption) ([]XoTestsNotification, error)
XoTestsNotificationPaginated returns a cursor-paginated list of XoTestsNotification. At least one cursor is required.
func XoTestsNotificationsBySender ¶
func XoTestsNotificationsBySender(ctx context.Context, db DB, sender XoTestsUserID, opts ...XoTestsNotificationSelectConfigOption) ([]XoTestsNotification, error)
XoTestsNotificationsBySender retrieves a row from 'xo_tests.notifications' as a XoTestsNotification.
Generated from index 'notifications_sender_idx'.
func (*XoTestsNotification) Delete ¶
func (xtn *XoTestsNotification) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsNotification from the database.
func (*XoTestsNotification) FKUser_Receiver ¶
func (xtn *XoTestsNotification) FKUser_Receiver(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_Receiver returns the User associated with the XoTestsNotification's (Receiver).
Generated from foreign key 'notifications_receiver_fkey'.
func (*XoTestsNotification) FKUser_Sender ¶
func (xtn *XoTestsNotification) FKUser_Sender(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_Sender returns the User associated with the XoTestsNotification's (Sender).
Generated from foreign key 'notifications_sender_fkey'.
func (*XoTestsNotification) Insert ¶
func (xtn *XoTestsNotification) Insert(ctx context.Context, db DB) (*XoTestsNotification, error)
Insert inserts the XoTestsNotification to the database.
func (*XoTestsNotification) SetUpdateParams ¶
func (xtn *XoTestsNotification) SetUpdateParams(params *XoTestsNotificationUpdateParams)
SetUpdateParams updates xo_tests.notifications struct fields with the specified params.
func (*XoTestsNotification) Update ¶
func (xtn *XoTestsNotification) Update(ctx context.Context, db DB) (*XoTestsNotification, error)
Update updates a XoTestsNotification in the database.
func (*XoTestsNotification) Upsert ¶
func (xtn *XoTestsNotification) Upsert(ctx context.Context, db DB, params *XoTestsNotificationCreateParams) (*XoTestsNotification, error)
Upsert upserts a XoTestsNotification in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsNotificationCreateParams ¶
type XoTestsNotificationCreateParams struct { Body string `json:"-" nullable:"false" pattern:"^[A-Za-z0-9]*$"` // body Receiver *XoTestsUserID `json:"receiver"` // receiver Sender XoTestsUserID `json:"sender" required:"true" nullable:"false"` // sender }
XoTestsNotificationCreateParams represents insert params for 'xo_tests.notifications'.
func (XoTestsNotificationCreateParams) GetBody ¶
func (p XoTestsNotificationCreateParams) GetBody() *string
func (XoTestsNotificationCreateParams) GetReceiver ¶
func (p XoTestsNotificationCreateParams) GetReceiver() *XoTestsUserID
func (XoTestsNotificationCreateParams) GetSender ¶
func (p XoTestsNotificationCreateParams) GetSender() *XoTestsUserID
type XoTestsNotificationID ¶
type XoTestsNotificationID int
type XoTestsNotificationParams ¶
type XoTestsNotificationParams interface { GetBody() *string GetReceiver() *XoTestsUserID GetSender() *XoTestsUserID }
XoTestsNotificationParams represents common params for both insert and update of 'xo_tests.notifications'.
type XoTestsNotificationSelectConfig ¶
type XoTestsNotificationSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsNotificationSelectConfigOption ¶
type XoTestsNotificationSelectConfigOption func(*XoTestsNotificationSelectConfig)
func WithXoTestsNotificationFilters ¶
func WithXoTestsNotificationFilters(filters map[string][]any) XoTestsNotificationSelectConfigOption
WithXoTestsNotificationFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsNotificationHavingClause ¶
func WithXoTestsNotificationHavingClause(conditions map[string][]any) XoTestsNotificationSelectConfigOption
WithXoTestsNotificationHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsNotificationJoin ¶
func WithXoTestsNotificationJoin(joins XoTestsNotificationJoins) XoTestsNotificationSelectConfigOption
WithXoTestsNotificationJoin joins with the given tables.
func WithXoTestsNotificationLimit ¶
func WithXoTestsNotificationLimit(limit int) XoTestsNotificationSelectConfigOption
WithXoTestsNotificationLimit limits row selection.
func WithXoTestsNotificationOrderBy ¶
func WithXoTestsNotificationOrderBy(rows map[string]*Direction) XoTestsNotificationSelectConfigOption
WithXoTestsNotificationOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsNotificationUpdateParams ¶
type XoTestsNotificationUpdateParams struct { Body *string `json:"-" nullable:"false" pattern:"^[A-Za-z0-9]*$"` // body Receiver **XoTestsUserID `json:"receiver"` // receiver Sender *XoTestsUserID `json:"sender" nullable:"false"` // sender }
XoTestsNotificationUpdateParams represents update params for 'xo_tests.notifications'.
func (XoTestsNotificationUpdateParams) GetBody ¶
func (p XoTestsNotificationUpdateParams) GetBody() *string
func (XoTestsNotificationUpdateParams) GetReceiver ¶
func (p XoTestsNotificationUpdateParams) GetReceiver() *XoTestsUserID
func (XoTestsNotificationUpdateParams) GetSender ¶
func (p XoTestsNotificationUpdateParams) GetSender() *XoTestsUserID
type XoTestsPagElement ¶
type XoTestsPagElement struct { PaginatedElementID XoTestsPagElementID `json:"paginatedElementID" db:"paginated_element_id" required:"true" nullable:"false"` // paginated_element_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name CreatedAt time.Time `json:"createdAt" db:"created_at" required:"true" nullable:"false"` // created_at Dummy *XoTestsDummyJoinID `json:"dummy" db:"dummy"` // dummy DummyJoinJoin *XoTestsDummyJoin `json:"-" db:"dummy_join_dummy"` // O2O dummy_join (inferred) }
XoTestsPagElement represents a row from 'xo_tests.pag_element'.
func CreateXoTestsPagElement ¶
func CreateXoTestsPagElement(ctx context.Context, db DB, params *XoTestsPagElementCreateParams) (*XoTestsPagElement, error)
CreateXoTestsPagElement creates a new XoTestsPagElement in the database with the given params.
func XoTestsPagElementByCreatedAt ¶
func XoTestsPagElementByCreatedAt(ctx context.Context, db DB, createdAt time.Time, opts ...XoTestsPagElementSelectConfigOption) (*XoTestsPagElement, error)
XoTestsPagElementByCreatedAt retrieves a row from 'xo_tests.pag_element' as a XoTestsPagElement.
Generated from index 'pag_element_created_at_key'.
func XoTestsPagElementByPaginatedElementID ¶
func XoTestsPagElementByPaginatedElementID(ctx context.Context, db DB, paginatedElementID XoTestsPagElementID, opts ...XoTestsPagElementSelectConfigOption) (*XoTestsPagElement, error)
XoTestsPagElementByPaginatedElementID retrieves a row from 'xo_tests.pag_element' as a XoTestsPagElement.
Generated from index 'pag_element_pkey'.
func XoTestsPagElementPaginated ¶
func XoTestsPagElementPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsPagElementSelectConfigOption) ([]XoTestsPagElement, error)
XoTestsPagElementPaginated returns a cursor-paginated list of XoTestsPagElement. At least one cursor is required.
func (*XoTestsPagElement) Delete ¶
func (xtpe *XoTestsPagElement) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsPagElement from the database.
func (*XoTestsPagElement) FKDummyJoin_Dummy ¶
func (xtpe *XoTestsPagElement) FKDummyJoin_Dummy(ctx context.Context, db DB) (*XoTestsDummyJoin, error)
FKDummyJoin_Dummy returns the DummyJoin associated with the XoTestsPagElement's (Dummy).
Generated from foreign key 'pag_element_dummy_fkey'.
func (*XoTestsPagElement) Insert ¶
func (xtpe *XoTestsPagElement) Insert(ctx context.Context, db DB) (*XoTestsPagElement, error)
Insert inserts the XoTestsPagElement to the database.
func (*XoTestsPagElement) SetUpdateParams ¶
func (xtpe *XoTestsPagElement) SetUpdateParams(params *XoTestsPagElementUpdateParams)
SetUpdateParams updates xo_tests.pag_element struct fields with the specified params.
func (*XoTestsPagElement) Update ¶
func (xtpe *XoTestsPagElement) Update(ctx context.Context, db DB) (*XoTestsPagElement, error)
Update updates a XoTestsPagElement in the database.
func (*XoTestsPagElement) Upsert ¶
func (xtpe *XoTestsPagElement) Upsert(ctx context.Context, db DB, params *XoTestsPagElementCreateParams) (*XoTestsPagElement, error)
Upsert upserts a XoTestsPagElement in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsPagElementCreateParams ¶
type XoTestsPagElementCreateParams struct { Dummy *XoTestsDummyJoinID `json:"dummy"` // dummy Name string `json:"name" required:"true" nullable:"false"` // name }
XoTestsPagElementCreateParams represents insert params for 'xo_tests.pag_element'.
func (XoTestsPagElementCreateParams) GetDummy ¶
func (p XoTestsPagElementCreateParams) GetDummy() *XoTestsDummyJoinID
func (XoTestsPagElementCreateParams) GetName ¶
func (p XoTestsPagElementCreateParams) GetName() *string
type XoTestsPagElementID ¶
func NewXoTestsPagElementID ¶
func NewXoTestsPagElementID(id uuid.UUID) XoTestsPagElementID
type XoTestsPagElementJoins ¶
type XoTestsPagElementJoins struct {
DummyJoin bool `json:"dummyJoin" required:"true" nullable:"false"` // O2O dummy_join
}
type XoTestsPagElementParams ¶
type XoTestsPagElementParams interface { GetDummy() *XoTestsDummyJoinID GetName() *string }
XoTestsPagElementParams represents common params for both insert and update of 'xo_tests.pag_element'.
type XoTestsPagElementSelectConfig ¶
type XoTestsPagElementSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsPagElementSelectConfigOption ¶
type XoTestsPagElementSelectConfigOption func(*XoTestsPagElementSelectConfig)
func WithXoTestsPagElementFilters ¶
func WithXoTestsPagElementFilters(filters map[string][]any) XoTestsPagElementSelectConfigOption
WithXoTestsPagElementFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsPagElementHavingClause ¶
func WithXoTestsPagElementHavingClause(conditions map[string][]any) XoTestsPagElementSelectConfigOption
WithXoTestsPagElementHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsPagElementJoin ¶
func WithXoTestsPagElementJoin(joins XoTestsPagElementJoins) XoTestsPagElementSelectConfigOption
WithXoTestsPagElementJoin joins with the given tables.
func WithXoTestsPagElementLimit ¶
func WithXoTestsPagElementLimit(limit int) XoTestsPagElementSelectConfigOption
WithXoTestsPagElementLimit limits row selection.
func WithXoTestsPagElementOrderBy ¶
func WithXoTestsPagElementOrderBy(rows map[string]*Direction) XoTestsPagElementSelectConfigOption
WithXoTestsPagElementOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsPagElementUpdateParams ¶
type XoTestsPagElementUpdateParams struct { Dummy **XoTestsDummyJoinID `json:"dummy"` // dummy Name *string `json:"name" nullable:"false"` // name }
XoTestsPagElementUpdateParams represents update params for 'xo_tests.pag_element'.
func (XoTestsPagElementUpdateParams) GetDummy ¶
func (p XoTestsPagElementUpdateParams) GetDummy() *XoTestsDummyJoinID
func (XoTestsPagElementUpdateParams) GetName ¶
func (p XoTestsPagElementUpdateParams) GetName() *string
type XoTestsTableEntity ¶
type XoTestsTableEntity string
const ( XoTestsTableEntityXoTestsBook XoTestsTableEntity = "xo_tests.books" XoTestsTableEntityXoTestsBookAuthor XoTestsTableEntity = "xo_tests.book_authors" XoTestsTableEntityXoTestsBookAuthorsSurrogateKey XoTestsTableEntity = "xo_tests.book_authors_surrogate_key" XoTestsTableEntityXoTestsBookReview XoTestsTableEntity = "xo_tests.book_reviews" XoTestsTableEntityXoTestsBookSeller XoTestsTableEntity = "xo_tests.book_sellers" XoTestsTableEntityXoTestsCacheDemoWorkItem XoTestsTableEntity = "xo_tests.cache__demo_work_items" XoTestsTableEntityXoTestsDemoWorkItem XoTestsTableEntity = "xo_tests.demo_work_items" XoTestsTableEntityXoTestsDummyJoin XoTestsTableEntity = "xo_tests.dummy_join" XoTestsTableEntityXoTestsNotification XoTestsTableEntity = "xo_tests.notifications" XoTestsTableEntityXoTestsPagElement XoTestsTableEntity = "xo_tests.pag_element" XoTestsTableEntityXoTestsTeam XoTestsTableEntity = "xo_tests.teams" XoTestsTableEntityXoTestsTimeEntry XoTestsTableEntity = "xo_tests.time_entries" XoTestsTableEntityXoTestsUser XoTestsTableEntity = "xo_tests.users" XoTestsTableEntityXoTestsUserAPIKey XoTestsTableEntity = "xo_tests.user_api_keys" XoTestsTableEntityXoTestsWorkItem XoTestsTableEntity = "xo_tests.work_items" XoTestsTableEntityXoTestsWorkItemAssignee XoTestsTableEntity = "xo_tests.work_item_assignee" XoTestsTableEntityXoTestsWorkItemComment XoTestsTableEntity = "xo_tests.work_item_comments" )
type XoTestsTeam ¶
type XoTestsTeam struct { TeamID XoTestsTeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name }
XoTestsTeam represents a row from 'xo_tests.teams'.
func CreateXoTestsTeam ¶
func CreateXoTestsTeam(ctx context.Context, db DB, params *XoTestsTeamCreateParams) (*XoTestsTeam, error)
CreateXoTestsTeam creates a new XoTestsTeam in the database with the given params.
func XoTestsTeamByTeamID ¶
func XoTestsTeamByTeamID(ctx context.Context, db DB, teamID XoTestsTeamID, opts ...XoTestsTeamSelectConfigOption) (*XoTestsTeam, error)
XoTestsTeamByTeamID retrieves a row from 'xo_tests.teams' as a XoTestsTeam.
Generated from index 'teams_pkey'.
func XoTestsTeamPaginated ¶
func XoTestsTeamPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsTeamSelectConfigOption) ([]XoTestsTeam, error)
XoTestsTeamPaginated returns a cursor-paginated list of XoTestsTeam. At least one cursor is required.
func (*XoTestsTeam) Delete ¶
func (xtt *XoTestsTeam) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsTeam from the database.
func (*XoTestsTeam) Insert ¶
func (xtt *XoTestsTeam) Insert(ctx context.Context, db DB) (*XoTestsTeam, error)
Insert inserts the XoTestsTeam to the database.
func (*XoTestsTeam) SetUpdateParams ¶
func (xtt *XoTestsTeam) SetUpdateParams(params *XoTestsTeamUpdateParams)
SetUpdateParams updates xo_tests.teams struct fields with the specified params.
func (*XoTestsTeam) Update ¶
func (xtt *XoTestsTeam) Update(ctx context.Context, db DB) (*XoTestsTeam, error)
Update updates a XoTestsTeam in the database.
func (*XoTestsTeam) Upsert ¶
func (xtt *XoTestsTeam) Upsert(ctx context.Context, db DB, params *XoTestsTeamCreateParams) (*XoTestsTeam, error)
Upsert upserts a XoTestsTeam in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsTeamCreateParams ¶
type XoTestsTeamCreateParams struct {
Name string `json:"name" required:"true" nullable:"false"` // name
}
XoTestsTeamCreateParams represents insert params for 'xo_tests.teams'.
func (XoTestsTeamCreateParams) GetName ¶
func (p XoTestsTeamCreateParams) GetName() *string
type XoTestsTeamID ¶
type XoTestsTeamID int
type XoTestsTeamJoins ¶
type XoTestsTeamJoins struct{}
type XoTestsTeamParams ¶
type XoTestsTeamParams interface {
GetName() *string
}
XoTestsTeamParams represents common params for both insert and update of 'xo_tests.teams'.
type XoTestsTeamSelectConfig ¶
type XoTestsTeamSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsTeamSelectConfigOption ¶
type XoTestsTeamSelectConfigOption func(*XoTestsTeamSelectConfig)
func WithXoTestsTeamFilters ¶
func WithXoTestsTeamFilters(filters map[string][]any) XoTestsTeamSelectConfigOption
WithXoTestsTeamFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsTeamHavingClause ¶
func WithXoTestsTeamHavingClause(conditions map[string][]any) XoTestsTeamSelectConfigOption
WithXoTestsTeamHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsTeamJoin ¶
func WithXoTestsTeamJoin(joins XoTestsTeamJoins) XoTestsTeamSelectConfigOption
WithXoTestsTeamJoin joins with the given tables.
func WithXoTestsTeamLimit ¶
func WithXoTestsTeamLimit(limit int) XoTestsTeamSelectConfigOption
WithXoTestsTeamLimit limits row selection.
func WithXoTestsTeamOrderBy ¶
func WithXoTestsTeamOrderBy(rows map[string]*Direction) XoTestsTeamSelectConfigOption
WithXoTestsTeamOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsTeamUpdateParams ¶
type XoTestsTeamUpdateParams struct {
Name *string `json:"name" nullable:"false"` // name
}
XoTestsTeamUpdateParams represents update params for 'xo_tests.teams'.
func (XoTestsTeamUpdateParams) GetName ¶
func (p XoTestsTeamUpdateParams) GetName() *string
type XoTestsTimeEntry ¶
type XoTestsTimeEntry struct { TimeEntryID XoTestsTimeEntryID `json:"timeEntryID" db:"time_entry_id" required:"true" nullable:"false"` // time_entry_id WorkItemID *XoTestsWorkItemID `json:"workItemID" db:"work_item_id"` // work_item_id Start time.Time `json:"start" db:"start" required:"true" nullable:"false"` // start WorkItemJoin *XoTestsWorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (generated from M2O) }
XoTestsTimeEntry represents a row from 'xo_tests.time_entries'.
func CreateXoTestsTimeEntry ¶
func CreateXoTestsTimeEntry(ctx context.Context, db DB, params *XoTestsTimeEntryCreateParams) (*XoTestsTimeEntry, error)
CreateXoTestsTimeEntry creates a new XoTestsTimeEntry in the database with the given params.
func XoTestsTimeEntryByTimeEntryID ¶
func XoTestsTimeEntryByTimeEntryID(ctx context.Context, db DB, timeEntryID XoTestsTimeEntryID, opts ...XoTestsTimeEntrySelectConfigOption) (*XoTestsTimeEntry, error)
XoTestsTimeEntryByTimeEntryID retrieves a row from 'xo_tests.time_entries' as a XoTestsTimeEntry.
Generated from index 'time_entries_pkey'.
func XoTestsTimeEntryPaginated ¶
func XoTestsTimeEntryPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsTimeEntrySelectConfigOption) ([]XoTestsTimeEntry, error)
XoTestsTimeEntryPaginated returns a cursor-paginated list of XoTestsTimeEntry. At least one cursor is required.
func (*XoTestsTimeEntry) Delete ¶
func (xtte *XoTestsTimeEntry) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsTimeEntry from the database.
func (*XoTestsTimeEntry) FKWorkItem_WorkItemID ¶
func (xtte *XoTestsTimeEntry) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the XoTestsTimeEntry's (WorkItemID).
Generated from foreign key 'time_entries_work_item_id_fkey'.
func (*XoTestsTimeEntry) Insert ¶
func (xtte *XoTestsTimeEntry) Insert(ctx context.Context, db DB) (*XoTestsTimeEntry, error)
Insert inserts the XoTestsTimeEntry to the database.
func (*XoTestsTimeEntry) SetUpdateParams ¶
func (xtte *XoTestsTimeEntry) SetUpdateParams(params *XoTestsTimeEntryUpdateParams)
SetUpdateParams updates xo_tests.time_entries struct fields with the specified params.
func (*XoTestsTimeEntry) Update ¶
func (xtte *XoTestsTimeEntry) Update(ctx context.Context, db DB) (*XoTestsTimeEntry, error)
Update updates a XoTestsTimeEntry in the database.
func (*XoTestsTimeEntry) Upsert ¶
func (xtte *XoTestsTimeEntry) Upsert(ctx context.Context, db DB, params *XoTestsTimeEntryCreateParams) (*XoTestsTimeEntry, error)
Upsert upserts a XoTestsTimeEntry in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsTimeEntryCreateParams ¶
type XoTestsTimeEntryCreateParams struct { Start time.Time `json:"start" required:"true" nullable:"false"` // start WorkItemID *XoTestsWorkItemID `json:"workItemID"` // work_item_id }
XoTestsTimeEntryCreateParams represents insert params for 'xo_tests.time_entries'.
func (XoTestsTimeEntryCreateParams) GetStart ¶
func (p XoTestsTimeEntryCreateParams) GetStart() *time.Time
func (XoTestsTimeEntryCreateParams) GetWorkItemID ¶
func (p XoTestsTimeEntryCreateParams) GetWorkItemID() *XoTestsWorkItemID
type XoTestsTimeEntryID ¶
type XoTestsTimeEntryID int
type XoTestsTimeEntryJoins ¶
type XoTestsTimeEntryJoins struct {
WorkItem bool `json:"workItem" required:"true" nullable:"false"` // O2O work_items
}
type XoTestsTimeEntryParams ¶
type XoTestsTimeEntryParams interface { GetStart() *time.Time GetWorkItemID() *XoTestsWorkItemID }
XoTestsTimeEntryParams represents common params for both insert and update of 'xo_tests.time_entries'.
type XoTestsTimeEntrySelectConfig ¶
type XoTestsTimeEntrySelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsTimeEntrySelectConfigOption ¶
type XoTestsTimeEntrySelectConfigOption func(*XoTestsTimeEntrySelectConfig)
func WithXoTestsTimeEntryFilters ¶
func WithXoTestsTimeEntryFilters(filters map[string][]any) XoTestsTimeEntrySelectConfigOption
WithXoTestsTimeEntryFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsTimeEntryHavingClause ¶
func WithXoTestsTimeEntryHavingClause(conditions map[string][]any) XoTestsTimeEntrySelectConfigOption
WithXoTestsTimeEntryHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsTimeEntryJoin ¶
func WithXoTestsTimeEntryJoin(joins XoTestsTimeEntryJoins) XoTestsTimeEntrySelectConfigOption
WithXoTestsTimeEntryJoin joins with the given tables.
func WithXoTestsTimeEntryLimit ¶
func WithXoTestsTimeEntryLimit(limit int) XoTestsTimeEntrySelectConfigOption
WithXoTestsTimeEntryLimit limits row selection.
func WithXoTestsTimeEntryOrderBy ¶
func WithXoTestsTimeEntryOrderBy(rows map[string]*Direction) XoTestsTimeEntrySelectConfigOption
WithXoTestsTimeEntryOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsTimeEntryUpdateParams ¶
type XoTestsTimeEntryUpdateParams struct { Start *time.Time `json:"start" nullable:"false"` // start WorkItemID **XoTestsWorkItemID `json:"workItemID"` // work_item_id }
XoTestsTimeEntryUpdateParams represents update params for 'xo_tests.time_entries'.
func (XoTestsTimeEntryUpdateParams) GetStart ¶
func (p XoTestsTimeEntryUpdateParams) GetStart() *time.Time
func (XoTestsTimeEntryUpdateParams) GetWorkItemID ¶
func (p XoTestsTimeEntryUpdateParams) GetWorkItemID() *XoTestsWorkItemID
type XoTestsUser ¶
type XoTestsUser struct { UserID XoTestsUserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name APIKeyID *XoTestsUserAPIKeyID `json:"apiKeyID" db:"api_key_id"` // api_key_id CreatedAt time.Time `json:"createdAt" db:"created_at" required:"true" nullable:"false"` // created_at DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` // deleted_at AuthorBooksJoin *[]XoTestsUserM2MBookBA `json:"-" db:"book_authors_books"` // M2M book_authors AuthorBooksBASKJoin *[]XoTestsUserM2MBookBASK `json:"-" db:"book_authors_surrogate_key_books"` // M2M book_authors_surrogate_key BookReviewsJoin *[]XoTestsBookReview `json:"-" db:"book_reviews"` // M2O users SellerBooksJoin *[]XoTestsBook `json:"-" db:"book_sellers_books"` // M2M book_sellers ReceiverNotificationsJoin *[]XoTestsNotification `json:"-" db:"notifications_receiver"` // M2O users SenderNotificationsJoin *[]XoTestsNotification `json:"-" db:"notifications_sender"` // M2O users UserAPIKeyJoin *XoTestsUserAPIKey `json:"-" db:"user_api_key_api_key_id"` // O2O user_api_keys (inferred) AssigneeWorkItemsJoin *[]XoTestsUserM2MWorkItemWIA `json:"-" db:"work_item_assignee_work_items"` // M2M work_item_assignee WorkItemCommentsJoin *[]XoTestsWorkItemComment `json:"-" db:"work_item_comments"` // M2O users }
XoTestsUser represents a row from 'xo_tests.users'.
func CreateXoTestsUser ¶
func CreateXoTestsUser(ctx context.Context, db DB, params *XoTestsUserCreateParams) (*XoTestsUser, error)
CreateXoTestsUser creates a new XoTestsUser in the database with the given params.
func XoTestsUserByCreatedAt ¶
func XoTestsUserByCreatedAt(ctx context.Context, db DB, createdAt time.Time, opts ...XoTestsUserSelectConfigOption) (*XoTestsUser, error)
XoTestsUserByCreatedAt retrieves a row from 'xo_tests.users' as a XoTestsUser.
Generated from index 'users_created_at_key'.
func XoTestsUserByName ¶
func XoTestsUserByName(ctx context.Context, db DB, name string, opts ...XoTestsUserSelectConfigOption) (*XoTestsUser, error)
XoTestsUserByName retrieves a row from 'xo_tests.users' as a XoTestsUser.
Generated from index 'users_name_key'.
func XoTestsUserByUserID ¶
func XoTestsUserByUserID(ctx context.Context, db DB, userID XoTestsUserID, opts ...XoTestsUserSelectConfigOption) (*XoTestsUser, error)
XoTestsUserByUserID retrieves a row from 'xo_tests.users' as a XoTestsUser.
Generated from index 'users_pkey'.
func XoTestsUserPaginated ¶
func XoTestsUserPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsUserSelectConfigOption) ([]XoTestsUser, error)
XoTestsUserPaginated returns a cursor-paginated list of XoTestsUser. At least one cursor is required.
func (*XoTestsUser) Delete ¶
func (xtu *XoTestsUser) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsUser from the database.
func (*XoTestsUser) FKUserAPIKey_APIKeyID ¶
func (xtu *XoTestsUser) FKUserAPIKey_APIKeyID(ctx context.Context, db DB) (*XoTestsUserAPIKey, error)
FKUserAPIKey_APIKeyID returns the UserAPIKey associated with the XoTestsUser's (APIKeyID).
Generated from foreign key 'users_api_key_id_fkey'.
func (*XoTestsUser) Insert ¶
func (xtu *XoTestsUser) Insert(ctx context.Context, db DB) (*XoTestsUser, error)
Insert inserts the XoTestsUser to the database.
func (*XoTestsUser) Restore ¶
func (xtu *XoTestsUser) Restore(ctx context.Context, db DB) (*XoTestsUser, error)
Restore restores a soft deleted XoTestsUser from the database.
func (*XoTestsUser) SetUpdateParams ¶
func (xtu *XoTestsUser) SetUpdateParams(params *XoTestsUserUpdateParams)
SetUpdateParams updates xo_tests.users struct fields with the specified params.
func (*XoTestsUser) SoftDelete ¶
func (xtu *XoTestsUser) SoftDelete(ctx context.Context, db DB) error
SoftDelete soft deletes the XoTestsUser from the database via 'deleted_at'.
func (*XoTestsUser) Update ¶
func (xtu *XoTestsUser) Update(ctx context.Context, db DB) (*XoTestsUser, error)
Update updates a XoTestsUser in the database.
func (*XoTestsUser) Upsert ¶
func (xtu *XoTestsUser) Upsert(ctx context.Context, db DB, params *XoTestsUserCreateParams) (*XoTestsUser, error)
Upsert upserts a XoTestsUser in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsUserAPIKey ¶
type XoTestsUserAPIKey struct { UserAPIKeyID XoTestsUserAPIKeyID `json:"-" db:"user_api_key_id" nullable:"false"` // user_api_key_id APIKey string `json:"apiKey" db:"api_key" required:"true" nullable:"false"` // api_key ExpiresOn time.Time `json:"expiresOn" db:"expires_on" required:"true" nullable:"false"` // expires_on UserID XoTestsUserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id UserJoin *XoTestsUser `json:"-" db:"user_user_id"` // O2O users (inferred) }
XoTestsUserAPIKey represents a row from 'xo_tests.user_api_keys'.
func CreateXoTestsUserAPIKey ¶
func CreateXoTestsUserAPIKey(ctx context.Context, db DB, params *XoTestsUserAPIKeyCreateParams) (*XoTestsUserAPIKey, error)
CreateXoTestsUserAPIKey creates a new XoTestsUserAPIKey in the database with the given params.
func XoTestsUserAPIKeyByAPIKey ¶
func XoTestsUserAPIKeyByAPIKey(ctx context.Context, db DB, apiKey string, opts ...XoTestsUserAPIKeySelectConfigOption) (*XoTestsUserAPIKey, error)
XoTestsUserAPIKeyByAPIKey retrieves a row from 'xo_tests.user_api_keys' as a XoTestsUserAPIKey.
Generated from index 'user_api_keys_api_key_key'.
func XoTestsUserAPIKeyByUserAPIKeyID ¶
func XoTestsUserAPIKeyByUserAPIKeyID(ctx context.Context, db DB, userAPIKeyID XoTestsUserAPIKeyID, opts ...XoTestsUserAPIKeySelectConfigOption) (*XoTestsUserAPIKey, error)
XoTestsUserAPIKeyByUserAPIKeyID retrieves a row from 'xo_tests.user_api_keys' as a XoTestsUserAPIKey.
Generated from index 'user_api_keys_pkey'.
func XoTestsUserAPIKeyByUserID ¶
func XoTestsUserAPIKeyByUserID(ctx context.Context, db DB, userID XoTestsUserID, opts ...XoTestsUserAPIKeySelectConfigOption) (*XoTestsUserAPIKey, error)
XoTestsUserAPIKeyByUserID retrieves a row from 'xo_tests.user_api_keys' as a XoTestsUserAPIKey.
Generated from index 'user_api_keys_user_id_key'.
func XoTestsUserAPIKeyPaginated ¶
func XoTestsUserAPIKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsUserAPIKeySelectConfigOption) ([]XoTestsUserAPIKey, error)
XoTestsUserAPIKeyPaginated returns a cursor-paginated list of XoTestsUserAPIKey. At least one cursor is required.
func (*XoTestsUserAPIKey) Delete ¶
func (xtuak *XoTestsUserAPIKey) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsUserAPIKey from the database.
func (*XoTestsUserAPIKey) FKUser_UserID ¶
func (xtuak *XoTestsUserAPIKey) FKUser_UserID(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_UserID returns the User associated with the XoTestsUserAPIKey's (UserID).
Generated from foreign key 'user_api_keys_user_id_fkey'.
func (*XoTestsUserAPIKey) Insert ¶
func (xtuak *XoTestsUserAPIKey) Insert(ctx context.Context, db DB) (*XoTestsUserAPIKey, error)
Insert inserts the XoTestsUserAPIKey to the database.
func (*XoTestsUserAPIKey) SetUpdateParams ¶
func (xtuak *XoTestsUserAPIKey) SetUpdateParams(params *XoTestsUserAPIKeyUpdateParams)
SetUpdateParams updates xo_tests.user_api_keys struct fields with the specified params.
func (*XoTestsUserAPIKey) Update ¶
func (xtuak *XoTestsUserAPIKey) Update(ctx context.Context, db DB) (*XoTestsUserAPIKey, error)
Update updates a XoTestsUserAPIKey in the database.
func (*XoTestsUserAPIKey) Upsert ¶
func (xtuak *XoTestsUserAPIKey) Upsert(ctx context.Context, db DB, params *XoTestsUserAPIKeyCreateParams) (*XoTestsUserAPIKey, error)
Upsert upserts a XoTestsUserAPIKey in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsUserAPIKeyCreateParams ¶
type XoTestsUserAPIKeyCreateParams struct { APIKey string `json:"apiKey" required:"true" nullable:"false"` // api_key ExpiresOn time.Time `json:"expiresOn" required:"true" nullable:"false"` // expires_on UserID XoTestsUserID `json:"userID" required:"true" nullable:"false"` // user_id }
XoTestsUserAPIKeyCreateParams represents insert params for 'xo_tests.user_api_keys'.
func (XoTestsUserAPIKeyCreateParams) GetAPIKey ¶
func (p XoTestsUserAPIKeyCreateParams) GetAPIKey() *string
func (XoTestsUserAPIKeyCreateParams) GetExpiresOn ¶
func (p XoTestsUserAPIKeyCreateParams) GetExpiresOn() *time.Time
func (XoTestsUserAPIKeyCreateParams) GetUserID ¶
func (p XoTestsUserAPIKeyCreateParams) GetUserID() *XoTestsUserID
type XoTestsUserAPIKeyID ¶
type XoTestsUserAPIKeyID int
type XoTestsUserAPIKeyJoins ¶
type XoTestsUserAPIKeyJoins struct {
User bool `json:"user" required:"true" nullable:"false"` // O2O users
}
type XoTestsUserAPIKeyParams ¶
type XoTestsUserAPIKeyParams interface { GetAPIKey() *string GetExpiresOn() *time.Time GetUserID() *XoTestsUserID }
XoTestsUserAPIKeyParams represents common params for both insert and update of 'xo_tests.user_api_keys'.
type XoTestsUserAPIKeySelectConfig ¶
type XoTestsUserAPIKeySelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsUserAPIKeySelectConfigOption ¶
type XoTestsUserAPIKeySelectConfigOption func(*XoTestsUserAPIKeySelectConfig)
func WithXoTestsUserAPIKeyFilters ¶
func WithXoTestsUserAPIKeyFilters(filters map[string][]any) XoTestsUserAPIKeySelectConfigOption
WithXoTestsUserAPIKeyFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsUserAPIKeyHavingClause ¶
func WithXoTestsUserAPIKeyHavingClause(conditions map[string][]any) XoTestsUserAPIKeySelectConfigOption
WithXoTestsUserAPIKeyHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsUserAPIKeyJoin ¶
func WithXoTestsUserAPIKeyJoin(joins XoTestsUserAPIKeyJoins) XoTestsUserAPIKeySelectConfigOption
WithXoTestsUserAPIKeyJoin joins with the given tables.
func WithXoTestsUserAPIKeyLimit ¶
func WithXoTestsUserAPIKeyLimit(limit int) XoTestsUserAPIKeySelectConfigOption
WithXoTestsUserAPIKeyLimit limits row selection.
func WithXoTestsUserAPIKeyOrderBy ¶
func WithXoTestsUserAPIKeyOrderBy(rows map[string]*Direction) XoTestsUserAPIKeySelectConfigOption
WithXoTestsUserAPIKeyOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsUserAPIKeyUpdateParams ¶
type XoTestsUserAPIKeyUpdateParams struct { APIKey *string `json:"apiKey" nullable:"false"` // api_key ExpiresOn *time.Time `json:"expiresOn" nullable:"false"` // expires_on UserID *XoTestsUserID `json:"userID" nullable:"false"` // user_id }
XoTestsUserAPIKeyUpdateParams represents update params for 'xo_tests.user_api_keys'.
func (XoTestsUserAPIKeyUpdateParams) GetAPIKey ¶
func (p XoTestsUserAPIKeyUpdateParams) GetAPIKey() *string
func (XoTestsUserAPIKeyUpdateParams) GetExpiresOn ¶
func (p XoTestsUserAPIKeyUpdateParams) GetExpiresOn() *time.Time
func (XoTestsUserAPIKeyUpdateParams) GetUserID ¶
func (p XoTestsUserAPIKeyUpdateParams) GetUserID() *XoTestsUserID
type XoTestsUserCreateParams ¶
type XoTestsUserCreateParams struct { APIKeyID *XoTestsUserAPIKeyID `json:"apiKeyID"` // api_key_id Name string `json:"name" required:"true" nullable:"false"` // name }
XoTestsUserCreateParams represents insert params for 'xo_tests.users'.
func (XoTestsUserCreateParams) GetAPIKeyID ¶
func (p XoTestsUserCreateParams) GetAPIKeyID() *XoTestsUserAPIKeyID
func (XoTestsUserCreateParams) GetName ¶
func (p XoTestsUserCreateParams) GetName() *string
type XoTestsUserID ¶
func NewXoTestsUserID ¶
func NewXoTestsUserID(id uuid.UUID) XoTestsUserID
type XoTestsUserJoins ¶
type XoTestsUserJoins struct { AuthorBooks bool `json:"authorBooks" required:"true" nullable:"false"` // M2M book_authors AuthorBooksBASK bool `json:"authorBooksBASK" required:"true" nullable:"false"` // M2M book_authors_surrogate_key BookReviews bool `json:"bookReviews" required:"true" nullable:"false"` // M2O book_reviews SellerBooks bool `json:"sellerBooks" required:"true" nullable:"false"` // M2M book_sellers ReceiverNotifications bool `json:"receiverNotifications" required:"true" nullable:"false"` // M2O notifications SenderNotifications bool `json:"senderNotifications" required:"true" nullable:"false"` // M2O notifications UserAPIKey bool `json:"userAPIKey" required:"true" nullable:"false"` // O2O user_api_keys AssigneeWorkItems bool `json:"assigneeWorkItems" required:"true" nullable:"false"` // M2M work_item_assignee WorkItemComments bool `json:"workItemComments" required:"true" nullable:"false"` // M2O work_item_comments }
type XoTestsUserM2MBookBA ¶
type XoTestsUserM2MBookBA struct { Book XoTestsBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsUserM2MBookBA represents a M2M join against "xo_tests.book_authors"
type XoTestsUserM2MBookBASK ¶
type XoTestsUserM2MBookBASK struct { Book XoTestsBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
XoTestsUserM2MBookBASK represents a M2M join against "xo_tests.book_authors_surrogate_key"
type XoTestsUserM2MWorkItemWIA ¶
type XoTestsUserM2MWorkItemWIA struct { WorkItem XoTestsWorkItem `json:"workItem" db:"work_items" required:"true"` Role *XoTestsWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
XoTestsUserM2MWorkItemWIA represents a M2M join against "xo_tests.work_item_assignee"
type XoTestsUserParams ¶
type XoTestsUserParams interface { GetAPIKeyID() *XoTestsUserAPIKeyID GetName() *string }
XoTestsUserParams represents common params for both insert and update of 'xo_tests.users'.
type XoTestsUserSelectConfig ¶
type XoTestsUserSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsUserSelectConfigOption ¶
type XoTestsUserSelectConfigOption func(*XoTestsUserSelectConfig)
func WithDeletedXoTestsUserOnly ¶
func WithDeletedXoTestsUserOnly() XoTestsUserSelectConfigOption
WithDeletedXoTestsUserOnly limits result to records marked as deleted.
func WithXoTestsUserFilters ¶
func WithXoTestsUserFilters(filters map[string][]any) XoTestsUserSelectConfigOption
WithXoTestsUserFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsUserHavingClause ¶
func WithXoTestsUserHavingClause(conditions map[string][]any) XoTestsUserSelectConfigOption
WithXoTestsUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsUserJoin ¶
func WithXoTestsUserJoin(joins XoTestsUserJoins) XoTestsUserSelectConfigOption
WithXoTestsUserJoin joins with the given tables.
func WithXoTestsUserLimit ¶
func WithXoTestsUserLimit(limit int) XoTestsUserSelectConfigOption
WithXoTestsUserLimit limits row selection.
func WithXoTestsUserOrderBy ¶
func WithXoTestsUserOrderBy(rows map[string]*Direction) XoTestsUserSelectConfigOption
WithXoTestsUserOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsUserUpdateParams ¶
type XoTestsUserUpdateParams struct { APIKeyID **XoTestsUserAPIKeyID `json:"apiKeyID"` // api_key_id Name *string `json:"name" nullable:"false"` // name }
XoTestsUserUpdateParams represents update params for 'xo_tests.users'.
func (XoTestsUserUpdateParams) GetAPIKeyID ¶
func (p XoTestsUserUpdateParams) GetAPIKeyID() *XoTestsUserAPIKeyID
func (XoTestsUserUpdateParams) GetName ¶
func (p XoTestsUserUpdateParams) GetName() *string
type XoTestsWorkItem ¶
type XoTestsWorkItem struct { WorkItemID XoTestsWorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Title *string `json:"title" db:"title"` // title Description *string `json:"description" db:"description"` // description TeamID XoTestsTeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id DemoWorkItemJoin *XoTestsDemoWorkItem `json:"-" db:"demo_work_item_work_item_id"` // O2O demo_work_items (inferred) TimeEntriesJoin *[]XoTestsTimeEntry `json:"-" db:"time_entries"` // M2O work_items AssigneesJoin *[]XoTestsWorkItemM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee WorkItemCommentsJoin *[]XoTestsWorkItemComment `json:"-" db:"work_item_comments"` // M2O work_items TeamJoin *XoTestsTeam `json:"-" db:"team_team_id"` // O2O teams (inferred) }
XoTestsWorkItem represents a row from 'xo_tests.work_items'.
func CreateXoTestsWorkItem ¶
func CreateXoTestsWorkItem(ctx context.Context, db DB, params *XoTestsWorkItemCreateParams) (*XoTestsWorkItem, error)
CreateXoTestsWorkItem creates a new XoTestsWorkItem in the database with the given params.
func XoTestsWorkItemByWorkItemID ¶
func XoTestsWorkItemByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, opts ...XoTestsWorkItemSelectConfigOption) (*XoTestsWorkItem, error)
XoTestsWorkItemByWorkItemID retrieves a row from 'xo_tests.work_items' as a XoTestsWorkItem.
Generated from index 'work_items_pkey'.
func XoTestsWorkItemPaginated ¶
func XoTestsWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsWorkItemSelectConfigOption) ([]XoTestsWorkItem, error)
XoTestsWorkItemPaginated returns a cursor-paginated list of XoTestsWorkItem. At least one cursor is required.
func XoTestsWorkItems ¶
func XoTestsWorkItems(ctx context.Context, db DB, opts ...XoTestsWorkItemSelectConfigOption) ([]XoTestsWorkItem, error)
XoTestsWorkItems retrieves a row from 'xo_tests.work_items' as a XoTestsWorkItem.
Generated from index '[xo] base filter query'.
func XoTestsWorkItemsByTitle ¶
func XoTestsWorkItemsByTitle(ctx context.Context, db DB, title *string, opts ...XoTestsWorkItemSelectConfigOption) ([]XoTestsWorkItem, error)
XoTestsWorkItemsByTitle retrieves a row from 'xo_tests.work_items' as a XoTestsWorkItem.
Generated from index 'work_items_title_description_idx1'.
func (*XoTestsWorkItem) Delete ¶
func (xtwi *XoTestsWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsWorkItem from the database.
func (*XoTestsWorkItem) FKTeam_TeamID ¶
func (xtwi *XoTestsWorkItem) FKTeam_TeamID(ctx context.Context, db DB) (*XoTestsTeam, error)
FKTeam_TeamID returns the Team associated with the XoTestsWorkItem's (TeamID).
Generated from foreign key 'work_items_team_id_fkey'.
func (*XoTestsWorkItem) Insert ¶
func (xtwi *XoTestsWorkItem) Insert(ctx context.Context, db DB) (*XoTestsWorkItem, error)
Insert inserts the XoTestsWorkItem to the database.
func (*XoTestsWorkItem) SetUpdateParams ¶
func (xtwi *XoTestsWorkItem) SetUpdateParams(params *XoTestsWorkItemUpdateParams)
SetUpdateParams updates xo_tests.work_items struct fields with the specified params.
func (*XoTestsWorkItem) Update ¶
func (xtwi *XoTestsWorkItem) Update(ctx context.Context, db DB) (*XoTestsWorkItem, error)
Update updates a XoTestsWorkItem in the database.
func (*XoTestsWorkItem) Upsert ¶
func (xtwi *XoTestsWorkItem) Upsert(ctx context.Context, db DB, params *XoTestsWorkItemCreateParams) (*XoTestsWorkItem, error)
Upsert upserts a XoTestsWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsWorkItemAssignee ¶
type XoTestsWorkItemAssignee struct { WorkItemID XoTestsWorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Assignee XoTestsUserID `json:"assignee" db:"assignee" required:"true" nullable:"false"` // assignee XoTestsRole *XoTestsWorkItemRole `json:"role" db:"role" required:"true" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemsJoin *[]XoTestsWorkItemAssigneeM2MWorkItemWIA `json:"-" db:"work_item_assignee_work_items"` // M2M work_item_assignee AssigneesJoin *[]XoTestsWorkItemAssigneeM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee }
XoTestsWorkItemAssignee represents a row from 'xo_tests.work_item_assignee'.
func CreateXoTestsWorkItemAssignee ¶
func CreateXoTestsWorkItemAssignee(ctx context.Context, db DB, params *XoTestsWorkItemAssigneeCreateParams) (*XoTestsWorkItemAssignee, error)
CreateXoTestsWorkItemAssignee creates a new XoTestsWorkItemAssignee in the database with the given params.
func XoTestsWorkItemAssigneeByWorkItemIDAssignee ¶
func XoTestsWorkItemAssigneeByWorkItemIDAssignee(ctx context.Context, db DB, workItemID XoTestsWorkItemID, assignee XoTestsUserID, opts ...XoTestsWorkItemAssigneeSelectConfigOption) (*XoTestsWorkItemAssignee, error)
XoTestsWorkItemAssigneeByWorkItemIDAssignee retrieves a row from 'xo_tests.work_item_assignee' as a XoTestsWorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func XoTestsWorkItemAssigneePaginated ¶
func XoTestsWorkItemAssigneePaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsWorkItemAssigneeSelectConfigOption) ([]XoTestsWorkItemAssignee, error)
XoTestsWorkItemAssigneePaginated returns a cursor-paginated list of XoTestsWorkItemAssignee. At least one cursor is required.
func XoTestsWorkItemAssigneesByAssignee ¶
func XoTestsWorkItemAssigneesByAssignee(ctx context.Context, db DB, assignee XoTestsUserID, opts ...XoTestsWorkItemAssigneeSelectConfigOption) ([]XoTestsWorkItemAssignee, error)
XoTestsWorkItemAssigneesByAssignee retrieves a row from 'xo_tests.work_item_assignee' as a XoTestsWorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func XoTestsWorkItemAssigneesByAssigneeWorkItemID ¶
func XoTestsWorkItemAssigneesByAssigneeWorkItemID(ctx context.Context, db DB, assignee XoTestsUserID, workItemID XoTestsWorkItemID, opts ...XoTestsWorkItemAssigneeSelectConfigOption) ([]XoTestsWorkItemAssignee, error)
XoTestsWorkItemAssigneesByAssigneeWorkItemID retrieves a row from 'xo_tests.work_item_assignee' as a XoTestsWorkItemAssignee.
Generated from index 'work_item_assignee_assignee_work_item_id_idx'.
func XoTestsWorkItemAssigneesByWorkItemID ¶
func XoTestsWorkItemAssigneesByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, opts ...XoTestsWorkItemAssigneeSelectConfigOption) ([]XoTestsWorkItemAssignee, error)
XoTestsWorkItemAssigneesByWorkItemID retrieves a row from 'xo_tests.work_item_assignee' as a XoTestsWorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func (*XoTestsWorkItemAssignee) Delete ¶
func (xtwia *XoTestsWorkItemAssignee) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsWorkItemAssignee from the database.
func (*XoTestsWorkItemAssignee) FKUser_Assignee ¶
func (xtwia *XoTestsWorkItemAssignee) FKUser_Assignee(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_Assignee returns the User associated with the XoTestsWorkItemAssignee's (Assignee).
Generated from foreign key 'work_item_assignee_assignee_fkey'.
func (*XoTestsWorkItemAssignee) FKWorkItem_WorkItemID ¶
func (xtwia *XoTestsWorkItemAssignee) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the XoTestsWorkItemAssignee's (WorkItemID).
Generated from foreign key 'work_item_assignee_work_item_id_fkey'.
func (*XoTestsWorkItemAssignee) Insert ¶
func (xtwia *XoTestsWorkItemAssignee) Insert(ctx context.Context, db DB) (*XoTestsWorkItemAssignee, error)
Insert inserts the XoTestsWorkItemAssignee to the database.
func (*XoTestsWorkItemAssignee) SetUpdateParams ¶
func (xtwia *XoTestsWorkItemAssignee) SetUpdateParams(params *XoTestsWorkItemAssigneeUpdateParams)
SetUpdateParams updates xo_tests.work_item_assignee struct fields with the specified params.
func (*XoTestsWorkItemAssignee) Update ¶
func (xtwia *XoTestsWorkItemAssignee) Update(ctx context.Context, db DB) (*XoTestsWorkItemAssignee, error)
Update updates a XoTestsWorkItemAssignee in the database.
func (*XoTestsWorkItemAssignee) Upsert ¶
func (xtwia *XoTestsWorkItemAssignee) Upsert(ctx context.Context, db DB, params *XoTestsWorkItemAssigneeCreateParams) (*XoTestsWorkItemAssignee, error)
Upsert upserts a XoTestsWorkItemAssignee in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsWorkItemAssigneeCreateParams ¶
type XoTestsWorkItemAssigneeCreateParams struct { Assignee XoTestsUserID `json:"assignee" required:"true" nullable:"false"` // assignee XoTestsRole *XoTestsWorkItemRole `json:"role" required:"true" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemID XoTestsWorkItemID `json:"workItemID" required:"true" nullable:"false"` // work_item_id }
XoTestsWorkItemAssigneeCreateParams represents insert params for 'xo_tests.work_item_assignee'.
func (XoTestsWorkItemAssigneeCreateParams) GetAssignee ¶
func (p XoTestsWorkItemAssigneeCreateParams) GetAssignee() *XoTestsUserID
func (XoTestsWorkItemAssigneeCreateParams) GetWorkItemID ¶
func (p XoTestsWorkItemAssigneeCreateParams) GetWorkItemID() *XoTestsWorkItemID
func (XoTestsWorkItemAssigneeCreateParams) GetXoTestsRole ¶
func (p XoTestsWorkItemAssigneeCreateParams) GetXoTestsRole() *XoTestsWorkItemRole
type XoTestsWorkItemAssigneeM2MAssigneeWIA ¶
type XoTestsWorkItemAssigneeM2MAssigneeWIA struct { User XoTestsUser `json:"user" db:"users" required:"true"` Role *XoTestsWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
XoTestsWorkItemAssigneeM2MAssigneeWIA represents a M2M join against "xo_tests.work_item_assignee"
type XoTestsWorkItemAssigneeM2MWorkItemWIA ¶
type XoTestsWorkItemAssigneeM2MWorkItemWIA struct { WorkItem XoTestsWorkItem `json:"workItem" db:"work_items" required:"true"` Role *XoTestsWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
XoTestsWorkItemAssigneeM2MWorkItemWIA represents a M2M join against "xo_tests.work_item_assignee"
type XoTestsWorkItemAssigneeParams ¶
type XoTestsWorkItemAssigneeParams interface { GetAssignee() *XoTestsUserID GetXoTestsRole() *XoTestsWorkItemRole GetWorkItemID() *XoTestsWorkItemID }
XoTestsWorkItemAssigneeParams represents common params for both insert and update of 'xo_tests.work_item_assignee'.
type XoTestsWorkItemAssigneeSelectConfig ¶
type XoTestsWorkItemAssigneeSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsWorkItemAssigneeSelectConfigOption ¶
type XoTestsWorkItemAssigneeSelectConfigOption func(*XoTestsWorkItemAssigneeSelectConfig)
func WithXoTestsWorkItemAssigneeFilters ¶
func WithXoTestsWorkItemAssigneeFilters(filters map[string][]any) XoTestsWorkItemAssigneeSelectConfigOption
WithXoTestsWorkItemAssigneeFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsWorkItemAssigneeHavingClause ¶
func WithXoTestsWorkItemAssigneeHavingClause(conditions map[string][]any) XoTestsWorkItemAssigneeSelectConfigOption
WithXoTestsWorkItemAssigneeHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsWorkItemAssigneeJoin ¶
func WithXoTestsWorkItemAssigneeJoin(joins XoTestsWorkItemAssigneeJoins) XoTestsWorkItemAssigneeSelectConfigOption
WithXoTestsWorkItemAssigneeJoin joins with the given tables.
func WithXoTestsWorkItemAssigneeLimit ¶
func WithXoTestsWorkItemAssigneeLimit(limit int) XoTestsWorkItemAssigneeSelectConfigOption
WithXoTestsWorkItemAssigneeLimit limits row selection.
func WithXoTestsWorkItemAssigneeOrderBy ¶
func WithXoTestsWorkItemAssigneeOrderBy(rows map[string]*Direction) XoTestsWorkItemAssigneeSelectConfigOption
WithXoTestsWorkItemAssigneeOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsWorkItemAssigneeUpdateParams ¶
type XoTestsWorkItemAssigneeUpdateParams struct { Assignee *XoTestsUserID `json:"assignee" nullable:"false"` // assignee XoTestsRole **XoTestsWorkItemRole `json:"role" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemID *XoTestsWorkItemID `json:"workItemID" nullable:"false"` // work_item_id }
XoTestsWorkItemAssigneeUpdateParams represents update params for 'xo_tests.work_item_assignee'.
func (XoTestsWorkItemAssigneeUpdateParams) GetAssignee ¶
func (p XoTestsWorkItemAssigneeUpdateParams) GetAssignee() *XoTestsUserID
func (XoTestsWorkItemAssigneeUpdateParams) GetWorkItemID ¶
func (p XoTestsWorkItemAssigneeUpdateParams) GetWorkItemID() *XoTestsWorkItemID
func (XoTestsWorkItemAssigneeUpdateParams) GetXoTestsRole ¶
func (p XoTestsWorkItemAssigneeUpdateParams) GetXoTestsRole() *XoTestsWorkItemRole
type XoTestsWorkItemComment ¶
type XoTestsWorkItemComment struct { WorkItemCommentID XoTestsWorkItemCommentID `json:"workItemCommentID" db:"work_item_comment_id" required:"true" nullable:"false"` // work_item_comment_id WorkItemID XoTestsWorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id UserID XoTestsUserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id Message string `json:"message" db:"message" required:"true" nullable:"false"` // message CreatedAt time.Time `json:"createdAt" db:"created_at" required:"true" nullable:"false"` // created_at UpdatedAt time.Time `json:"updatedAt" db:"updated_at" required:"true" nullable:"false"` // updated_at UserJoin *XoTestsUser `json:"-" db:"user_user_id"` // O2O users (generated from M2O) WorkItemJoin *XoTestsWorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (generated from M2O) }
XoTestsWorkItemComment represents a row from 'xo_tests.work_item_comments'.
func CreateXoTestsWorkItemComment ¶
func CreateXoTestsWorkItemComment(ctx context.Context, db DB, params *XoTestsWorkItemCommentCreateParams) (*XoTestsWorkItemComment, error)
CreateXoTestsWorkItemComment creates a new XoTestsWorkItemComment in the database with the given params.
func XoTestsWorkItemCommentByWorkItemCommentID ¶
func XoTestsWorkItemCommentByWorkItemCommentID(ctx context.Context, db DB, workItemCommentID XoTestsWorkItemCommentID, opts ...XoTestsWorkItemCommentSelectConfigOption) (*XoTestsWorkItemComment, error)
XoTestsWorkItemCommentByWorkItemCommentID retrieves a row from 'xo_tests.work_item_comments' as a XoTestsWorkItemComment.
Generated from index 'work_item_comments_pkey'.
func XoTestsWorkItemCommentPaginated ¶
func XoTestsWorkItemCommentPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...XoTestsWorkItemCommentSelectConfigOption) ([]XoTestsWorkItemComment, error)
XoTestsWorkItemCommentPaginated returns a cursor-paginated list of XoTestsWorkItemComment. At least one cursor is required.
func XoTestsWorkItemCommentsByWorkItemID ¶
func XoTestsWorkItemCommentsByWorkItemID(ctx context.Context, db DB, workItemID XoTestsWorkItemID, opts ...XoTestsWorkItemCommentSelectConfigOption) ([]XoTestsWorkItemComment, error)
XoTestsWorkItemCommentsByWorkItemID retrieves a row from 'xo_tests.work_item_comments' as a XoTestsWorkItemComment.
Generated from index 'work_item_comments_work_item_id_idx'.
func (*XoTestsWorkItemComment) Delete ¶
func (xtwic *XoTestsWorkItemComment) Delete(ctx context.Context, db DB) error
Delete deletes the XoTestsWorkItemComment from the database.
func (*XoTestsWorkItemComment) FKUser_UserID ¶
func (xtwic *XoTestsWorkItemComment) FKUser_UserID(ctx context.Context, db DB) (*XoTestsUser, error)
FKUser_UserID returns the User associated with the XoTestsWorkItemComment's (UserID).
Generated from foreign key 'work_item_comments_user_id_fkey'.
func (*XoTestsWorkItemComment) FKWorkItem_WorkItemID ¶
func (xtwic *XoTestsWorkItemComment) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*XoTestsWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the XoTestsWorkItemComment's (WorkItemID).
Generated from foreign key 'work_item_comments_work_item_id_fkey'.
func (*XoTestsWorkItemComment) Insert ¶
func (xtwic *XoTestsWorkItemComment) Insert(ctx context.Context, db DB) (*XoTestsWorkItemComment, error)
Insert inserts the XoTestsWorkItemComment to the database.
func (*XoTestsWorkItemComment) SetUpdateParams ¶
func (xtwic *XoTestsWorkItemComment) SetUpdateParams(params *XoTestsWorkItemCommentUpdateParams)
SetUpdateParams updates xo_tests.work_item_comments struct fields with the specified params.
func (*XoTestsWorkItemComment) Update ¶
func (xtwic *XoTestsWorkItemComment) Update(ctx context.Context, db DB) (*XoTestsWorkItemComment, error)
Update updates a XoTestsWorkItemComment in the database.
func (*XoTestsWorkItemComment) Upsert ¶
func (xtwic *XoTestsWorkItemComment) Upsert(ctx context.Context, db DB, params *XoTestsWorkItemCommentCreateParams) (*XoTestsWorkItemComment, error)
Upsert upserts a XoTestsWorkItemComment in the database. Requires appropriate PK(s) to be set beforehand.
type XoTestsWorkItemCommentCreateParams ¶
type XoTestsWorkItemCommentCreateParams struct { Message string `json:"message" required:"true" nullable:"false"` // message UserID XoTestsUserID `json:"userID" required:"true" nullable:"false"` // user_id WorkItemID XoTestsWorkItemID `json:"workItemID" required:"true" nullable:"false"` // work_item_id }
XoTestsWorkItemCommentCreateParams represents insert params for 'xo_tests.work_item_comments'.
func (XoTestsWorkItemCommentCreateParams) GetMessage ¶
func (p XoTestsWorkItemCommentCreateParams) GetMessage() *string
func (XoTestsWorkItemCommentCreateParams) GetUserID ¶
func (p XoTestsWorkItemCommentCreateParams) GetUserID() *XoTestsUserID
func (XoTestsWorkItemCommentCreateParams) GetWorkItemID ¶
func (p XoTestsWorkItemCommentCreateParams) GetWorkItemID() *XoTestsWorkItemID
type XoTestsWorkItemCommentID ¶
type XoTestsWorkItemCommentID int
type XoTestsWorkItemCommentParams ¶
type XoTestsWorkItemCommentParams interface { GetMessage() *string GetUserID() *XoTestsUserID GetWorkItemID() *XoTestsWorkItemID }
XoTestsWorkItemCommentParams represents common params for both insert and update of 'xo_tests.work_item_comments'.
type XoTestsWorkItemCommentSelectConfig ¶
type XoTestsWorkItemCommentSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsWorkItemCommentSelectConfigOption ¶
type XoTestsWorkItemCommentSelectConfigOption func(*XoTestsWorkItemCommentSelectConfig)
func WithXoTestsWorkItemCommentFilters ¶
func WithXoTestsWorkItemCommentFilters(filters map[string][]any) XoTestsWorkItemCommentSelectConfigOption
WithXoTestsWorkItemCommentFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsWorkItemCommentHavingClause ¶
func WithXoTestsWorkItemCommentHavingClause(conditions map[string][]any) XoTestsWorkItemCommentSelectConfigOption
WithXoTestsWorkItemCommentHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsWorkItemCommentJoin ¶
func WithXoTestsWorkItemCommentJoin(joins XoTestsWorkItemCommentJoins) XoTestsWorkItemCommentSelectConfigOption
WithXoTestsWorkItemCommentJoin joins with the given tables.
func WithXoTestsWorkItemCommentLimit ¶
func WithXoTestsWorkItemCommentLimit(limit int) XoTestsWorkItemCommentSelectConfigOption
WithXoTestsWorkItemCommentLimit limits row selection.
func WithXoTestsWorkItemCommentOrderBy ¶
func WithXoTestsWorkItemCommentOrderBy(rows map[string]*Direction) XoTestsWorkItemCommentSelectConfigOption
WithXoTestsWorkItemCommentOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsWorkItemCommentUpdateParams ¶
type XoTestsWorkItemCommentUpdateParams struct { Message *string `json:"message" nullable:"false"` // message UserID *XoTestsUserID `json:"userID" nullable:"false"` // user_id WorkItemID *XoTestsWorkItemID `json:"workItemID" nullable:"false"` // work_item_id }
XoTestsWorkItemCommentUpdateParams represents update params for 'xo_tests.work_item_comments'.
func (XoTestsWorkItemCommentUpdateParams) GetMessage ¶
func (p XoTestsWorkItemCommentUpdateParams) GetMessage() *string
func (XoTestsWorkItemCommentUpdateParams) GetUserID ¶
func (p XoTestsWorkItemCommentUpdateParams) GetUserID() *XoTestsUserID
func (XoTestsWorkItemCommentUpdateParams) GetWorkItemID ¶
func (p XoTestsWorkItemCommentUpdateParams) GetWorkItemID() *XoTestsWorkItemID
type XoTestsWorkItemCreateParams ¶
type XoTestsWorkItemCreateParams struct { Description *string `json:"description"` // description TeamID XoTestsTeamID `json:"teamID" required:"true" nullable:"false"` // team_id Title *string `json:"title"` // title }
XoTestsWorkItemCreateParams represents insert params for 'xo_tests.work_items'.
func (XoTestsWorkItemCreateParams) GetDescription ¶
func (p XoTestsWorkItemCreateParams) GetDescription() *string
func (XoTestsWorkItemCreateParams) GetTeamID ¶
func (p XoTestsWorkItemCreateParams) GetTeamID() *XoTestsTeamID
func (XoTestsWorkItemCreateParams) GetTitle ¶
func (p XoTestsWorkItemCreateParams) GetTitle() *string
type XoTestsWorkItemID ¶
type XoTestsWorkItemID int
type XoTestsWorkItemJoins ¶
type XoTestsWorkItemJoins struct { DemoWorkItem bool `json:"demoWorkItem" required:"true" nullable:"false"` // O2O demo_work_items TimeEntries bool `json:"timeEntries" required:"true" nullable:"false"` // M2O time_entries Assignees bool `json:"assignees" required:"true" nullable:"false"` // M2M work_item_assignee WorkItemComments bool `json:"workItemComments" required:"true" nullable:"false"` // M2O work_item_comments Team bool `json:"team" required:"true" nullable:"false"` // O2O teams }
type XoTestsWorkItemM2MAssigneeWIA ¶
type XoTestsWorkItemM2MAssigneeWIA struct { User XoTestsUser `json:"user" db:"users" required:"true"` Role *XoTestsWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
XoTestsWorkItemM2MAssigneeWIA represents a M2M join against "xo_tests.work_item_assignee"
type XoTestsWorkItemParams ¶
type XoTestsWorkItemParams interface { GetDescription() *string GetTeamID() *XoTestsTeamID GetTitle() *string }
XoTestsWorkItemParams represents common params for both insert and update of 'xo_tests.work_items'.
type XoTestsWorkItemRole ¶
type XoTestsWorkItemRole string
XoTestsWorkItemRole is the 'work_item_role' enum type from schema 'xo_tests'.
const ( // XoTestsWorkItemRolePreparer is the 'preparer' work_item_role. XoTestsWorkItemRolePreparer XoTestsWorkItemRole = "preparer" // XoTestsWorkItemRoleReviewer is the 'reviewer' work_item_role. XoTestsWorkItemRoleReviewer XoTestsWorkItemRole = "reviewer" )
XoTestsWorkItemRole values.
func AllXoTestsWorkItemRoleValues ¶
func AllXoTestsWorkItemRoleValues() []XoTestsWorkItemRole
func (*XoTestsWorkItemRole) Scan ¶
func (xtwir *XoTestsWorkItemRole) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface.
type XoTestsWorkItemSelectConfig ¶
type XoTestsWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type XoTestsWorkItemSelectConfigOption ¶
type XoTestsWorkItemSelectConfigOption func(*XoTestsWorkItemSelectConfig)
func WithXoTestsWorkItemFilters ¶
func WithXoTestsWorkItemFilters(filters map[string][]any) XoTestsWorkItemSelectConfigOption
WithXoTestsWorkItemFilters adds the given WHERE clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
filters := map[string][]any{ "NOT (col.name = any ($i))": {[]string{"excl_name_1", "excl_name_2"}}, `(col.created_at > $i OR col.is_closed = $i)`: {time.Now().Add(-24 * time.Hour), true}, }
func WithXoTestsWorkItemHavingClause ¶
func WithXoTestsWorkItemHavingClause(conditions map[string][]any) XoTestsWorkItemSelectConfigOption
WithXoTestsWorkItemHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example: WithUserHavingClause adds the given HAVING clause conditions, which can be dynamically parameterized with $i to prevent SQL injection. Example:
// filter a given aggregate of assigned users to return results where at least one of them has id of userId. // See xo_join_* alias used by the join db tag in the SelectSQL string. filters := map[string][]any{ "$i = ANY(ARRAY_AGG(xo_join_assigned_users_join.user_id))": {userId}, }
func WithXoTestsWorkItemJoin ¶
func WithXoTestsWorkItemJoin(joins XoTestsWorkItemJoins) XoTestsWorkItemSelectConfigOption
WithXoTestsWorkItemJoin joins with the given tables.
func WithXoTestsWorkItemLimit ¶
func WithXoTestsWorkItemLimit(limit int) XoTestsWorkItemSelectConfigOption
WithXoTestsWorkItemLimit limits row selection.
func WithXoTestsWorkItemOrderBy ¶
func WithXoTestsWorkItemOrderBy(rows map[string]*Direction) XoTestsWorkItemSelectConfigOption
WithXoTestsWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type XoTestsWorkItemUpdateParams ¶
type XoTestsWorkItemUpdateParams struct { Description **string `json:"description"` // description TeamID *XoTestsTeamID `json:"teamID" nullable:"false"` // team_id Title **string `json:"title"` // title }
XoTestsWorkItemUpdateParams represents update params for 'xo_tests.work_items'.
func (XoTestsWorkItemUpdateParams) GetDescription ¶
func (p XoTestsWorkItemUpdateParams) GetDescription() *string
func (XoTestsWorkItemUpdateParams) GetTeamID ¶
func (p XoTestsWorkItemUpdateParams) GetTeamID() *XoTestsTeamID
func (XoTestsWorkItemUpdateParams) GetTitle ¶
func (p XoTestsWorkItemUpdateParams) GetTitle() *string
Source Files ¶
- db.xo.go
- extra.xo.go
- models.gen.go
- public_extra.xo.go
- xo_tests_cache_extra.xo.go
- xo_tests_extra.xo.go
- xotestsbook.xo.go
- xotestsbookauthor.xo.go
- xotestsbookauthorssurrogatekey.xo.go
- xotestsbookreview.xo.go
- xotestsbookseller.xo.go
- xotestscachedemoworkitem.xo.go
- xotestsdemoworkitem.xo.go
- xotestsdummyjoin.xo.go
- xotestsnotification.xo.go
- xotestspagelement.xo.go
- xoteststeam.xo.go
- xoteststimeentry.xo.go
- xotestsuser.xo.go
- xotestsuserapikey.xo.go
- xotestsworkitem.xo.go
- xotestsworkitemassignee.xo.go
- xotestsworkitemcomment.xo.go
- xotestsworkitemrole.xo.go