Documentation
¶
Overview ¶
Package models provides primitives to interact with the openapi HTTP API.
Code generated by unknown module path version unknown version DO NOT EDIT.
Index ¶
- Constants
- Variables
- func CreateOrUpdateIndex(ctx context.Context, db DB, idxName string, projectName string, idxDef string) error
- func CreateOrUpdateWorkItemCacheTable(ctx context.Context, db DB, projectName string) error
- func Errorf(s string, v ...interface{})
- func GetSwagger() (swagger *openapi3.T, err error)
- func JsonbSetDeep(ctx context.Context, db DB, target map[string]any, path []string, ...) (map[string]any, error)
- func Logf(s string, v ...interface{})
- func NormalizeIndexDef(ctx context.Context, db DB, inputString string) (string, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func ProjectExists(ctx context.Context, db DB, projectName string) (bool, error)
- func RowEstimator(ctx context.Context, db DB, query string) (int, error)
- func SameIndexDefinition(ctx context.Context, db DB, indexName string, newIndexDef string) (bool, error)
- func SetErrorLogger(logger interface{})
- func SetLogger(logger interface{})
- type Activity
- func ActivitiesByName(ctx context.Context, db DB, name string, opts ...ActivitySelectConfigOption) ([]Activity, error)
- func ActivitiesByProjectID(ctx context.Context, db DB, projectID ProjectID, ...) ([]Activity, error)
- func ActivityByActivityID(ctx context.Context, db DB, activityID ActivityID, ...) (*Activity, error)
- func ActivityByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, ...) (*Activity, error)
- func ActivityPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]Activity, error)
- func CreateActivity(ctx context.Context, db DB, params *ActivityCreateParams) (*Activity, error)
- func (a *Activity) Delete(ctx context.Context, db DB) error
- func (a *Activity) FKProject_ProjectID(ctx context.Context, db DB) (*Project, error)
- func (a *Activity) Insert(ctx context.Context, db DB) (*Activity, error)
- func (a *Activity) Restore(ctx context.Context, db DB) (*Activity, error)
- func (a *Activity) SetUpdateParams(params *ActivityUpdateParams)
- func (a *Activity) SoftDelete(ctx context.Context, db DB) error
- func (a *Activity) Update(ctx context.Context, db DB) (*Activity, error)
- func (a *Activity) Upsert(ctx context.Context, db DB, params *ActivityCreateParams) (*Activity, error)
- type ActivityCreateParams
- type ActivityID
- type ActivityJoins
- type ActivityParams
- type ActivityResponse
- type ActivitySelectConfig
- type ActivitySelectConfigOption
- func WithActivityFilters(filters map[string][]any) ActivitySelectConfigOption
- func WithActivityHavingClause(conditions map[string][]any) ActivitySelectConfigOption
- func WithActivityJoin(joins ActivityJoins) ActivitySelectConfigOption
- func WithActivityLimit(limit int) ActivitySelectConfigOption
- func WithActivityOrderBy(rows map[string]*Direction) ActivitySelectConfigOption
- func WithDeletedActivityOnly() ActivitySelectConfigOption
- type ActivityUpdateParams
- type CacheDemoTwoWorkItem
- func CacheDemoTwoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID int, ...) (*CacheDemoTwoWorkItem, error)
- func CacheDemoTwoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]CacheDemoTwoWorkItem, error)
- func CacheDemoTwoWorkItems(ctx context.Context, db DB, opts ...CacheDemoTwoWorkItemSelectConfigOption) ([]CacheDemoTwoWorkItem, error)
- func CreateCacheDemoTwoWorkItem(ctx context.Context, db DB, params *CacheDemoTwoWorkItemCreateParams) (*CacheDemoTwoWorkItem, error)
- func (cdtwi *CacheDemoTwoWorkItem) Delete(ctx context.Context, db DB) error
- func (cdtwi *CacheDemoTwoWorkItem) FKKanbanStep_KanbanStepID(ctx context.Context, db DB) (*KanbanStep, error)
- func (cdtwi *CacheDemoTwoWorkItem) FKTeam_TeamID(ctx context.Context, db DB) (*Team, error)
- func (cdtwi *CacheDemoTwoWorkItem) FKWorkItemType_WorkItemTypeID(ctx context.Context, db DB) (*WorkItemType, error)
- func (cdtwi *CacheDemoTwoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (cdtwi *CacheDemoTwoWorkItem) Insert(ctx context.Context, db DB) (*CacheDemoTwoWorkItem, error)
- func (cdtwi *CacheDemoTwoWorkItem) Restore(ctx context.Context, db DB) (*CacheDemoTwoWorkItem, error)
- func (cdtwi *CacheDemoTwoWorkItem) SetUpdateParams(params *CacheDemoTwoWorkItemUpdateParams)
- func (cdtwi *CacheDemoTwoWorkItem) SoftDelete(ctx context.Context, db DB) error
- func (cdtwi *CacheDemoTwoWorkItem) Update(ctx context.Context, db DB) (*CacheDemoTwoWorkItem, error)
- func (cdtwi *CacheDemoTwoWorkItem) Upsert(ctx context.Context, db DB, params *CacheDemoTwoWorkItemCreateParams) (*CacheDemoTwoWorkItem, error)
- type CacheDemoTwoWorkItemCreateParams
- func (p CacheDemoTwoWorkItemCreateParams) GetClosedAt() *time.Time
- func (p CacheDemoTwoWorkItemCreateParams) GetCustomDateForProject2() *time.Time
- func (p CacheDemoTwoWorkItemCreateParams) GetDescription() *string
- func (p CacheDemoTwoWorkItemCreateParams) GetKanbanStepID() *KanbanStepID
- func (p CacheDemoTwoWorkItemCreateParams) GetMetadata() *map[string]any
- func (p CacheDemoTwoWorkItemCreateParams) GetTargetDate() *time.Time
- func (p CacheDemoTwoWorkItemCreateParams) GetTeamID() *TeamID
- func (p CacheDemoTwoWorkItemCreateParams) GetTitle() *string
- func (p CacheDemoTwoWorkItemCreateParams) GetWorkItemTypeID() *WorkItemTypeID
- type CacheDemoTwoWorkItemJoins
- type CacheDemoTwoWorkItemM2MAssigneeWIA
- type CacheDemoTwoWorkItemParams
- type CacheDemoTwoWorkItemSelectConfig
- type CacheDemoTwoWorkItemSelectConfigOption
- func WithCacheDemoTwoWorkItemFilters(filters map[string][]any) CacheDemoTwoWorkItemSelectConfigOption
- func WithCacheDemoTwoWorkItemHavingClause(conditions map[string][]any) CacheDemoTwoWorkItemSelectConfigOption
- func WithCacheDemoTwoWorkItemJoin(joins CacheDemoTwoWorkItemJoins) CacheDemoTwoWorkItemSelectConfigOption
- func WithCacheDemoTwoWorkItemLimit(limit int) CacheDemoTwoWorkItemSelectConfigOption
- func WithCacheDemoTwoWorkItemOrderBy(rows map[string]*Direction) CacheDemoTwoWorkItemSelectConfigOption
- func WithDeletedCacheDemoTwoWorkItemOnly() CacheDemoTwoWorkItemSelectConfigOption
- type CacheDemoTwoWorkItemUpdateParams
- func (p CacheDemoTwoWorkItemUpdateParams) GetClosedAt() *time.Time
- func (p CacheDemoTwoWorkItemUpdateParams) GetCustomDateForProject2() *time.Time
- func (p CacheDemoTwoWorkItemUpdateParams) GetDescription() *string
- func (p CacheDemoTwoWorkItemUpdateParams) GetKanbanStepID() *KanbanStepID
- func (p CacheDemoTwoWorkItemUpdateParams) GetMetadata() *map[string]any
- func (p CacheDemoTwoWorkItemUpdateParams) GetTargetDate() *time.Time
- func (p CacheDemoTwoWorkItemUpdateParams) GetTeamID() *TeamID
- func (p CacheDemoTwoWorkItemUpdateParams) GetTitle() *string
- func (p CacheDemoTwoWorkItemUpdateParams) GetWorkItemTypeID() *WorkItemTypeID
- type CacheDemoWorkItem
- func CacheDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID int, ...) (*CacheDemoWorkItem, error)
- func CacheDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]CacheDemoWorkItem, error)
- func CacheDemoWorkItemsByLastMessageAt(ctx context.Context, db DB, lastMessageAt time.Time, ...) ([]CacheDemoWorkItem, error)
- func CacheDemoWorkItemsByReopened(ctx context.Context, db DB, reopened bool, ...) ([]CacheDemoWorkItem, error)
- func CreateCacheDemoWorkItem(ctx context.Context, db DB, params *CacheDemoWorkItemCreateParams) (*CacheDemoWorkItem, error)
- func (cdwi *CacheDemoWorkItem) Delete(ctx context.Context, db DB) error
- func (cdwi *CacheDemoWorkItem) FKKanbanStep_KanbanStepID(ctx context.Context, db DB) (*KanbanStep, error)
- func (cdwi *CacheDemoWorkItem) FKTeam_TeamID(ctx context.Context, db DB) (*Team, error)
- func (cdwi *CacheDemoWorkItem) FKWorkItemType_WorkItemTypeID(ctx context.Context, db DB) (*WorkItemType, error)
- func (cdwi *CacheDemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (cdwi *CacheDemoWorkItem) Insert(ctx context.Context, db DB) (*CacheDemoWorkItem, error)
- func (cdwi *CacheDemoWorkItem) Restore(ctx context.Context, db DB) (*CacheDemoWorkItem, error)
- func (cdwi *CacheDemoWorkItem) SetUpdateParams(params *CacheDemoWorkItemUpdateParams)
- func (cdwi *CacheDemoWorkItem) SoftDelete(ctx context.Context, db DB) error
- func (cdwi *CacheDemoWorkItem) Update(ctx context.Context, db DB) (*CacheDemoWorkItem, error)
- func (cdwi *CacheDemoWorkItem) Upsert(ctx context.Context, db DB, params *CacheDemoWorkItemCreateParams) (*CacheDemoWorkItem, error)
- type CacheDemoWorkItemCreateParams
- func (p CacheDemoWorkItemCreateParams) GetClosedAt() *time.Time
- func (p CacheDemoWorkItemCreateParams) GetDescription() *string
- func (p CacheDemoWorkItemCreateParams) GetKanbanStepID() *KanbanStepID
- func (p CacheDemoWorkItemCreateParams) GetLastMessageAt() *time.Time
- func (p CacheDemoWorkItemCreateParams) GetLine() *string
- func (p CacheDemoWorkItemCreateParams) GetMetadata() *map[string]any
- func (p CacheDemoWorkItemCreateParams) GetRef() *string
- func (p CacheDemoWorkItemCreateParams) GetReopened() *bool
- func (p CacheDemoWorkItemCreateParams) GetTargetDate() *time.Time
- func (p CacheDemoWorkItemCreateParams) GetTeamID() *TeamID
- func (p CacheDemoWorkItemCreateParams) GetTitle() *string
- func (p CacheDemoWorkItemCreateParams) GetWorkItemTypeID() *WorkItemTypeID
- type CacheDemoWorkItemJoins
- type CacheDemoWorkItemM2MAssigneeWIA
- type CacheDemoWorkItemParams
- type CacheDemoWorkItemResponse
- type CacheDemoWorkItemSelectConfig
- type CacheDemoWorkItemSelectConfigOption
- func WithCacheDemoWorkItemFilters(filters map[string][]any) CacheDemoWorkItemSelectConfigOption
- func WithCacheDemoWorkItemHavingClause(conditions map[string][]any) CacheDemoWorkItemSelectConfigOption
- func WithCacheDemoWorkItemJoin(joins CacheDemoWorkItemJoins) CacheDemoWorkItemSelectConfigOption
- func WithCacheDemoWorkItemLimit(limit int) CacheDemoWorkItemSelectConfigOption
- func WithCacheDemoWorkItemOrderBy(rows map[string]*Direction) CacheDemoWorkItemSelectConfigOption
- func WithDeletedCacheDemoWorkItemOnly() CacheDemoWorkItemSelectConfigOption
- type CacheDemoWorkItemUpdateParams
- func (p CacheDemoWorkItemUpdateParams) GetClosedAt() *time.Time
- func (p CacheDemoWorkItemUpdateParams) GetDescription() *string
- func (p CacheDemoWorkItemUpdateParams) GetKanbanStepID() *KanbanStepID
- func (p CacheDemoWorkItemUpdateParams) GetLastMessageAt() *time.Time
- func (p CacheDemoWorkItemUpdateParams) GetLine() *string
- func (p CacheDemoWorkItemUpdateParams) GetMetadata() *map[string]any
- func (p CacheDemoWorkItemUpdateParams) GetRef() *string
- func (p CacheDemoWorkItemUpdateParams) GetReopened() *bool
- func (p CacheDemoWorkItemUpdateParams) GetTargetDate() *time.Time
- func (p CacheDemoWorkItemUpdateParams) GetTeamID() *TeamID
- func (p CacheDemoWorkItemUpdateParams) GetTitle() *string
- func (p CacheDemoWorkItemUpdateParams) GetWorkItemTypeID() *WorkItemTypeID
- type CacheTableEntity
- type ColumnSimpleType
- type CreateActivityJSONRequestBody
- type CreateActivityRequest
- type CreateDemoTwoWorkItemRequest
- type CreateDemoWorkItemRequest
- type CreateProjectBoardRequest
- type CreateTeamJSONRequestBody
- type CreateTeamRequest
- type CreateTimeEntryJSONRequestBody
- type CreateTimeEntryRequest
- type CreateWorkItemCommentJSONRequestBody
- type CreateWorkItemCommentRequest
- type CreateWorkItemRequest
- func (t CreateWorkItemRequest) AsCreateDemoTwoWorkItemRequest() (CreateDemoTwoWorkItemRequest, error)
- func (t CreateWorkItemRequest) AsCreateDemoWorkItemRequest() (CreateDemoWorkItemRequest, error)
- func (t CreateWorkItemRequest) Discriminator() (string, error)
- func (t CreateWorkItemRequest) MarshalJSON() ([]byte, error)
- func (t *CreateWorkItemRequest) UnmarshalJSON(b []byte) error
- func (t CreateWorkItemRequest) ValueByDiscriminator() (interface{}, error)
- type CreateWorkItemTagJSONRequestBody
- type CreateWorkItemTagRequest
- type CreateWorkItemTypeJSONRequestBody
- type CreateWorkItemTypeRequest
- type CreateWorkitemJSONRequestBody
- type Cursor
- type DB
- type DBTX
- type DbField
- type DemoKanbanSteps
- type DemoTwoKanbanSteps
- type DemoTwoWorkItem
- func CreateDemoTwoWorkItem(ctx context.Context, db DB, params *DemoTwoWorkItemCreateParams) (*DemoTwoWorkItem, error)
- func DemoTwoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, ...) (*DemoTwoWorkItem, error)
- func DemoTwoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]DemoTwoWorkItem, error)
- func (dtwi *DemoTwoWorkItem) Delete(ctx context.Context, db DB) error
- func (dtwi *DemoTwoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (dtwi *DemoTwoWorkItem) Insert(ctx context.Context, db DB) (*DemoTwoWorkItem, error)
- func (dtwi *DemoTwoWorkItem) SetUpdateParams(params *DemoTwoWorkItemUpdateParams)
- func (dtwi *DemoTwoWorkItem) Update(ctx context.Context, db DB) (*DemoTwoWorkItem, error)
- func (dtwi *DemoTwoWorkItem) Upsert(ctx context.Context, db DB, params *DemoTwoWorkItemCreateParams) (*DemoTwoWorkItem, error)
- type DemoTwoWorkItemCreateParams
- type DemoTwoWorkItemJoins
- type DemoTwoWorkItemParams
- type DemoTwoWorkItemResponse
- type DemoTwoWorkItemSelectConfig
- type DemoTwoWorkItemSelectConfigOption
- func WithDemoTwoWorkItemFilters(filters map[string][]any) DemoTwoWorkItemSelectConfigOption
- func WithDemoTwoWorkItemHavingClause(conditions map[string][]any) DemoTwoWorkItemSelectConfigOption
- func WithDemoTwoWorkItemJoin(joins DemoTwoWorkItemJoins) DemoTwoWorkItemSelectConfigOption
- func WithDemoTwoWorkItemLimit(limit int) DemoTwoWorkItemSelectConfigOption
- func WithDemoTwoWorkItemOrderBy(rows map[string]*Direction) DemoTwoWorkItemSelectConfigOption
- type DemoTwoWorkItemTypes
- type DemoTwoWorkItemUpdateParams
- type DemoWorkItem
- func CreateDemoWorkItem(ctx context.Context, db DB, params *DemoWorkItemCreateParams) (*DemoWorkItem, error)
- func DemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, ...) (*DemoWorkItem, error)
- func DemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]DemoWorkItem, error)
- func DemoWorkItemsByRefLine(ctx context.Context, db DB, ref string, line string, ...) ([]DemoWorkItem, error)
- func (dwi *DemoWorkItem) Delete(ctx context.Context, db DB) error
- func (dwi *DemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (dwi *DemoWorkItem) Insert(ctx context.Context, db DB) (*DemoWorkItem, error)
- func (dwi *DemoWorkItem) SetUpdateParams(params *DemoWorkItemUpdateParams)
- func (dwi *DemoWorkItem) Update(ctx context.Context, db DB) (*DemoWorkItem, error)
- func (dwi *DemoWorkItem) Upsert(ctx context.Context, db DB, params *DemoWorkItemCreateParams) (*DemoWorkItem, error)
- type DemoWorkItemCreateParams
- type DemoWorkItemJoins
- type DemoWorkItemParams
- type DemoWorkItemResponse
- type DemoWorkItemSelectConfig
- type DemoWorkItemSelectConfigOption
- func WithDemoWorkItemFilters(filters map[string][]any) DemoWorkItemSelectConfigOption
- func WithDemoWorkItemHavingClause(conditions map[string][]any) DemoWorkItemSelectConfigOption
- func WithDemoWorkItemJoin(joins DemoWorkItemJoins) DemoWorkItemSelectConfigOption
- func WithDemoWorkItemLimit(limit int) DemoWorkItemSelectConfigOption
- func WithDemoWorkItemOrderBy(rows map[string]*Direction) DemoWorkItemSelectConfigOption
- type DemoWorkItemTypes
- type DemoWorkItemUpdateParams
- type Direction
- type EntityNotification
- func CreateEntityNotification(ctx context.Context, db DB, params *EntityNotificationCreateParams) (*EntityNotification, error)
- func EntityNotificationByEntityNotificationID(ctx context.Context, db DB, entityNotificationID EntityNotificationID, ...) (*EntityNotification, error)
- func EntityNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]EntityNotification, error)
- func (en *EntityNotification) Delete(ctx context.Context, db DB) error
- func (en *EntityNotification) Insert(ctx context.Context, db DB) (*EntityNotification, error)
- func (en *EntityNotification) SetUpdateParams(params *EntityNotificationUpdateParams)
- func (en *EntityNotification) Update(ctx context.Context, db DB) (*EntityNotification, error)
- func (en *EntityNotification) Upsert(ctx context.Context, db DB, params *EntityNotificationCreateParams) (*EntityNotification, error)
- type EntityNotificationCreateParams
- type EntityNotificationID
- type EntityNotificationJoins
- type EntityNotificationParams
- type EntityNotificationSelectConfig
- type EntityNotificationSelectConfigOption
- func WithEntityNotificationFilters(filters map[string][]any) EntityNotificationSelectConfigOption
- func WithEntityNotificationHavingClause(conditions map[string][]any) EntityNotificationSelectConfigOption
- func WithEntityNotificationJoin(joins EntityNotificationJoins) EntityNotificationSelectConfigOption
- func WithEntityNotificationLimit(limit int) EntityNotificationSelectConfigOption
- func WithEntityNotificationOrderBy(rows map[string]*Direction) EntityNotificationSelectConfigOption
- type EntityNotificationUpdateParams
- type ErrInsertFailed
- type ErrInvalidExtraSchemaNotificationType
- type ErrInvalidExtraSchemaWorkItemRole
- type ErrInvalidNotificationType
- type ErrInvalidWorkItemRole
- type ErrUpdateFailed
- type ErrUpsertFailed
- type Error
- type ErrorCode
- type EventsParams
- type ExtraSchemaBook
- func CreateExtraSchemaBook(ctx context.Context, db DB, params *ExtraSchemaBookCreateParams) (*ExtraSchemaBook, error)
- func ExtraSchemaBookByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, ...) (*ExtraSchemaBook, error)
- func ExtraSchemaBookPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaBook, error)
- func (esb *ExtraSchemaBook) Delete(ctx context.Context, db DB) error
- func (esb *ExtraSchemaBook) Insert(ctx context.Context, db DB) (*ExtraSchemaBook, error)
- func (esb *ExtraSchemaBook) SetUpdateParams(params *ExtraSchemaBookUpdateParams)
- func (esb *ExtraSchemaBook) Update(ctx context.Context, db DB) (*ExtraSchemaBook, error)
- func (esb *ExtraSchemaBook) Upsert(ctx context.Context, db DB, params *ExtraSchemaBookCreateParams) (*ExtraSchemaBook, error)
- type ExtraSchemaBookAuthor
- func CreateExtraSchemaBookAuthor(ctx context.Context, db DB, params *ExtraSchemaBookAuthorCreateParams) (*ExtraSchemaBookAuthor, error)
- func ExtraSchemaBookAuthorByBookIDAuthorID(ctx context.Context, db DB, bookID ExtraSchemaBookID, ...) (*ExtraSchemaBookAuthor, error)
- func ExtraSchemaBookAuthorPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaBookAuthor, error)
- func ExtraSchemaBookAuthorsByAuthorID(ctx context.Context, db DB, authorID ExtraSchemaUserID, ...) ([]ExtraSchemaBookAuthor, error)
- func ExtraSchemaBookAuthorsByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, ...) ([]ExtraSchemaBookAuthor, error)
- func (esba *ExtraSchemaBookAuthor) Delete(ctx context.Context, db DB) error
- func (esba *ExtraSchemaBookAuthor) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
- func (esba *ExtraSchemaBookAuthor) FKUser_AuthorID(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esba *ExtraSchemaBookAuthor) Insert(ctx context.Context, db DB) (*ExtraSchemaBookAuthor, error)
- func (esba *ExtraSchemaBookAuthor) SetUpdateParams(params *ExtraSchemaBookAuthorUpdateParams)
- func (esba *ExtraSchemaBookAuthor) Update(ctx context.Context, db DB) (*ExtraSchemaBookAuthor, error)
- func (esba *ExtraSchemaBookAuthor) Upsert(ctx context.Context, db DB, params *ExtraSchemaBookAuthorCreateParams) (*ExtraSchemaBookAuthor, error)
- type ExtraSchemaBookAuthorCreateParams
- type ExtraSchemaBookAuthorJoins
- type ExtraSchemaBookAuthorM2MAuthorBA
- type ExtraSchemaBookAuthorM2MBookBA
- type ExtraSchemaBookAuthorParams
- type ExtraSchemaBookAuthorSelectConfig
- type ExtraSchemaBookAuthorSelectConfigOption
- func WithExtraSchemaBookAuthorFilters(filters map[string][]any) ExtraSchemaBookAuthorSelectConfigOption
- func WithExtraSchemaBookAuthorHavingClause(conditions map[string][]any) ExtraSchemaBookAuthorSelectConfigOption
- func WithExtraSchemaBookAuthorJoin(joins ExtraSchemaBookAuthorJoins) ExtraSchemaBookAuthorSelectConfigOption
- func WithExtraSchemaBookAuthorLimit(limit int) ExtraSchemaBookAuthorSelectConfigOption
- func WithExtraSchemaBookAuthorOrderBy(rows map[string]*Direction) ExtraSchemaBookAuthorSelectConfigOption
- type ExtraSchemaBookAuthorUpdateParams
- type ExtraSchemaBookAuthorsSurrogateKey
- func CreateExtraSchemaBookAuthorsSurrogateKey(ctx context.Context, db DB, ...) (*ExtraSchemaBookAuthorsSurrogateKey, error)
- func ExtraSchemaBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID(ctx context.Context, db DB, ...) (*ExtraSchemaBookAuthorsSurrogateKey, error)
- func ExtraSchemaBookAuthorsSurrogateKeyByBookIDAuthorID(ctx context.Context, db DB, bookID ExtraSchemaBookID, ...) (*ExtraSchemaBookAuthorsSurrogateKey, error)
- func ExtraSchemaBookAuthorsSurrogateKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaBookAuthorsSurrogateKey, error)
- func ExtraSchemaBookAuthorsSurrogateKeysByAuthorID(ctx context.Context, db DB, authorID ExtraSchemaUserID, ...) ([]ExtraSchemaBookAuthorsSurrogateKey, error)
- func ExtraSchemaBookAuthorsSurrogateKeysByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, ...) ([]ExtraSchemaBookAuthorsSurrogateKey, error)
- func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Delete(ctx context.Context, db DB) error
- func (esbask *ExtraSchemaBookAuthorsSurrogateKey) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
- func (esbask *ExtraSchemaBookAuthorsSurrogateKey) FKUser_AuthorID(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Insert(ctx context.Context, db DB) (*ExtraSchemaBookAuthorsSurrogateKey, error)
- func (esbask *ExtraSchemaBookAuthorsSurrogateKey) SetUpdateParams(params *ExtraSchemaBookAuthorsSurrogateKeyUpdateParams)
- func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Update(ctx context.Context, db DB) (*ExtraSchemaBookAuthorsSurrogateKey, error)
- func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Upsert(ctx context.Context, db DB, ...) (*ExtraSchemaBookAuthorsSurrogateKey, error)
- type ExtraSchemaBookAuthorsSurrogateKeyCreateParams
- type ExtraSchemaBookAuthorsSurrogateKeyID
- type ExtraSchemaBookAuthorsSurrogateKeyJoins
- type ExtraSchemaBookAuthorsSurrogateKeyM2MAuthorBASK
- type ExtraSchemaBookAuthorsSurrogateKeyM2MBookBASK
- type ExtraSchemaBookAuthorsSurrogateKeyParams
- type ExtraSchemaBookAuthorsSurrogateKeySelectConfig
- type ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
- func WithExtraSchemaBookAuthorsSurrogateKeyFilters(filters map[string][]any) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
- func WithExtraSchemaBookAuthorsSurrogateKeyHavingClause(conditions map[string][]any) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
- func WithExtraSchemaBookAuthorsSurrogateKeyJoin(joins ExtraSchemaBookAuthorsSurrogateKeyJoins) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
- func WithExtraSchemaBookAuthorsSurrogateKeyLimit(limit int) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
- func WithExtraSchemaBookAuthorsSurrogateKeyOrderBy(rows map[string]*Direction) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
- type ExtraSchemaBookAuthorsSurrogateKeyUpdateParams
- type ExtraSchemaBookCreateParams
- type ExtraSchemaBookID
- type ExtraSchemaBookJoins
- type ExtraSchemaBookM2MAuthorBA
- type ExtraSchemaBookM2MAuthorBASK
- type ExtraSchemaBookParams
- type ExtraSchemaBookReview
- func CreateExtraSchemaBookReview(ctx context.Context, db DB, params *ExtraSchemaBookReviewCreateParams) (*ExtraSchemaBookReview, error)
- func ExtraSchemaBookReviewByBookReviewID(ctx context.Context, db DB, bookReviewID ExtraSchemaBookReviewID, ...) (*ExtraSchemaBookReview, error)
- func ExtraSchemaBookReviewByReviewerBookID(ctx context.Context, db DB, reviewer ExtraSchemaUserID, ...) (*ExtraSchemaBookReview, error)
- func ExtraSchemaBookReviewPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaBookReview, error)
- func ExtraSchemaBookReviewsByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, ...) ([]ExtraSchemaBookReview, error)
- func ExtraSchemaBookReviewsByReviewer(ctx context.Context, db DB, reviewer ExtraSchemaUserID, ...) ([]ExtraSchemaBookReview, error)
- func (esbr *ExtraSchemaBookReview) Delete(ctx context.Context, db DB) error
- func (esbr *ExtraSchemaBookReview) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
- func (esbr *ExtraSchemaBookReview) FKUser_Reviewer(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esbr *ExtraSchemaBookReview) Insert(ctx context.Context, db DB) (*ExtraSchemaBookReview, error)
- func (esbr *ExtraSchemaBookReview) SetUpdateParams(params *ExtraSchemaBookReviewUpdateParams)
- func (esbr *ExtraSchemaBookReview) Update(ctx context.Context, db DB) (*ExtraSchemaBookReview, error)
- func (esbr *ExtraSchemaBookReview) Upsert(ctx context.Context, db DB, params *ExtraSchemaBookReviewCreateParams) (*ExtraSchemaBookReview, error)
- type ExtraSchemaBookReviewCreateParams
- type ExtraSchemaBookReviewID
- type ExtraSchemaBookReviewJoins
- type ExtraSchemaBookReviewParams
- type ExtraSchemaBookReviewSelectConfig
- type ExtraSchemaBookReviewSelectConfigOption
- func WithExtraSchemaBookReviewFilters(filters map[string][]any) ExtraSchemaBookReviewSelectConfigOption
- func WithExtraSchemaBookReviewHavingClause(conditions map[string][]any) ExtraSchemaBookReviewSelectConfigOption
- func WithExtraSchemaBookReviewJoin(joins ExtraSchemaBookReviewJoins) ExtraSchemaBookReviewSelectConfigOption
- func WithExtraSchemaBookReviewLimit(limit int) ExtraSchemaBookReviewSelectConfigOption
- func WithExtraSchemaBookReviewOrderBy(rows map[string]*Direction) ExtraSchemaBookReviewSelectConfigOption
- type ExtraSchemaBookReviewUpdateParams
- type ExtraSchemaBookSelectConfig
- type ExtraSchemaBookSelectConfigOption
- func WithExtraSchemaBookFilters(filters map[string][]any) ExtraSchemaBookSelectConfigOption
- func WithExtraSchemaBookHavingClause(conditions map[string][]any) ExtraSchemaBookSelectConfigOption
- func WithExtraSchemaBookJoin(joins ExtraSchemaBookJoins) ExtraSchemaBookSelectConfigOption
- func WithExtraSchemaBookLimit(limit int) ExtraSchemaBookSelectConfigOption
- func WithExtraSchemaBookOrderBy(rows map[string]*Direction) ExtraSchemaBookSelectConfigOption
- type ExtraSchemaBookSeller
- func CreateExtraSchemaBookSeller(ctx context.Context, db DB, params *ExtraSchemaBookSellerCreateParams) (*ExtraSchemaBookSeller, error)
- func ExtraSchemaBookSellerPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaBookSeller, error)
- func ExtraSchemaBookSellersByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, ...) ([]ExtraSchemaBookSeller, error)
- func ExtraSchemaBookSellersByBookIDSeller(ctx context.Context, db DB, bookID ExtraSchemaBookID, seller ExtraSchemaUserID, ...) ([]ExtraSchemaBookSeller, error)
- func ExtraSchemaBookSellersBySeller(ctx context.Context, db DB, seller ExtraSchemaUserID, ...) ([]ExtraSchemaBookSeller, error)
- func ExtraSchemaBookSellersBySellerBookID(ctx context.Context, db DB, seller ExtraSchemaUserID, bookID ExtraSchemaBookID, ...) ([]ExtraSchemaBookSeller, error)
- func (esbs *ExtraSchemaBookSeller) Delete(ctx context.Context, db DB) error
- func (esbs *ExtraSchemaBookSeller) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
- func (esbs *ExtraSchemaBookSeller) FKUser_Seller(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esbs *ExtraSchemaBookSeller) Insert(ctx context.Context, db DB) (*ExtraSchemaBookSeller, error)
- func (esbs *ExtraSchemaBookSeller) SetUpdateParams(params *ExtraSchemaBookSellerUpdateParams)
- type ExtraSchemaBookSellerCreateParams
- type ExtraSchemaBookSellerJoins
- type ExtraSchemaBookSellerParams
- type ExtraSchemaBookSellerSelectConfig
- type ExtraSchemaBookSellerSelectConfigOption
- func WithExtraSchemaBookSellerFilters(filters map[string][]any) ExtraSchemaBookSellerSelectConfigOption
- func WithExtraSchemaBookSellerHavingClause(conditions map[string][]any) ExtraSchemaBookSellerSelectConfigOption
- func WithExtraSchemaBookSellerJoin(joins ExtraSchemaBookSellerJoins) ExtraSchemaBookSellerSelectConfigOption
- func WithExtraSchemaBookSellerLimit(limit int) ExtraSchemaBookSellerSelectConfigOption
- func WithExtraSchemaBookSellerOrderBy(rows map[string]*Direction) ExtraSchemaBookSellerSelectConfigOption
- type ExtraSchemaBookSellerUpdateParams
- type ExtraSchemaBookUpdateParams
- type ExtraSchemaDemoWorkItem
- func CreateExtraSchemaDemoWorkItem(ctx context.Context, db DB, params *ExtraSchemaDemoWorkItemCreateParams) (*ExtraSchemaDemoWorkItem, error)
- func ExtraSchemaDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, ...) (*ExtraSchemaDemoWorkItem, error)
- func ExtraSchemaDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaDemoWorkItem, error)
- func (esdwi *ExtraSchemaDemoWorkItem) Delete(ctx context.Context, db DB) error
- func (esdwi *ExtraSchemaDemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
- func (esdwi *ExtraSchemaDemoWorkItem) Insert(ctx context.Context, db DB) (*ExtraSchemaDemoWorkItem, error)
- func (esdwi *ExtraSchemaDemoWorkItem) SetUpdateParams(params *ExtraSchemaDemoWorkItemUpdateParams)
- func (esdwi *ExtraSchemaDemoWorkItem) Update(ctx context.Context, db DB) (*ExtraSchemaDemoWorkItem, error)
- func (esdwi *ExtraSchemaDemoWorkItem) Upsert(ctx context.Context, db DB, params *ExtraSchemaDemoWorkItemCreateParams) (*ExtraSchemaDemoWorkItem, error)
- type ExtraSchemaDemoWorkItemCreateParams
- type ExtraSchemaDemoWorkItemJoins
- type ExtraSchemaDemoWorkItemParams
- type ExtraSchemaDemoWorkItemSelectConfig
- type ExtraSchemaDemoWorkItemSelectConfigOption
- func WithExtraSchemaDemoWorkItemFilters(filters map[string][]any) ExtraSchemaDemoWorkItemSelectConfigOption
- func WithExtraSchemaDemoWorkItemHavingClause(conditions map[string][]any) ExtraSchemaDemoWorkItemSelectConfigOption
- func WithExtraSchemaDemoWorkItemJoin(joins ExtraSchemaDemoWorkItemJoins) ExtraSchemaDemoWorkItemSelectConfigOption
- func WithExtraSchemaDemoWorkItemLimit(limit int) ExtraSchemaDemoWorkItemSelectConfigOption
- func WithExtraSchemaDemoWorkItemOrderBy(rows map[string]*Direction) ExtraSchemaDemoWorkItemSelectConfigOption
- type ExtraSchemaDemoWorkItemUpdateParams
- type ExtraSchemaDummyJoin
- func CreateExtraSchemaDummyJoin(ctx context.Context, db DB, params *ExtraSchemaDummyJoinCreateParams) (*ExtraSchemaDummyJoin, error)
- func ExtraSchemaDummyJoinByDummyJoinID(ctx context.Context, db DB, dummyJoinID ExtraSchemaDummyJoinID, ...) (*ExtraSchemaDummyJoin, error)
- func ExtraSchemaDummyJoinPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaDummyJoin, error)
- func (esdj *ExtraSchemaDummyJoin) Delete(ctx context.Context, db DB) error
- func (esdj *ExtraSchemaDummyJoin) Insert(ctx context.Context, db DB) (*ExtraSchemaDummyJoin, error)
- func (esdj *ExtraSchemaDummyJoin) SetUpdateParams(params *ExtraSchemaDummyJoinUpdateParams)
- func (esdj *ExtraSchemaDummyJoin) Update(ctx context.Context, db DB) (*ExtraSchemaDummyJoin, error)
- func (esdj *ExtraSchemaDummyJoin) Upsert(ctx context.Context, db DB, params *ExtraSchemaDummyJoinCreateParams) (*ExtraSchemaDummyJoin, error)
- type ExtraSchemaDummyJoinCreateParams
- type ExtraSchemaDummyJoinID
- type ExtraSchemaDummyJoinJoins
- type ExtraSchemaDummyJoinParams
- type ExtraSchemaDummyJoinSelectConfig
- type ExtraSchemaDummyJoinSelectConfigOption
- func WithExtraSchemaDummyJoinFilters(filters map[string][]any) ExtraSchemaDummyJoinSelectConfigOption
- func WithExtraSchemaDummyJoinHavingClause(conditions map[string][]any) ExtraSchemaDummyJoinSelectConfigOption
- func WithExtraSchemaDummyJoinJoin(joins ExtraSchemaDummyJoinJoins) ExtraSchemaDummyJoinSelectConfigOption
- func WithExtraSchemaDummyJoinLimit(limit int) ExtraSchemaDummyJoinSelectConfigOption
- func WithExtraSchemaDummyJoinOrderBy(rows map[string]*Direction) ExtraSchemaDummyJoinSelectConfigOption
- type ExtraSchemaDummyJoinUpdateParams
- type ExtraSchemaNotification
- func CreateExtraSchemaNotification(ctx context.Context, db DB, params *ExtraSchemaNotificationCreateParams) (*ExtraSchemaNotification, error)
- func ExtraSchemaNotificationByNotificationID(ctx context.Context, db DB, notificationID ExtraSchemaNotificationID, ...) (*ExtraSchemaNotification, error)
- func ExtraSchemaNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaNotification, error)
- func ExtraSchemaNotificationsBySender(ctx context.Context, db DB, sender ExtraSchemaUserID, ...) ([]ExtraSchemaNotification, error)
- func (esn *ExtraSchemaNotification) Delete(ctx context.Context, db DB) error
- func (esn *ExtraSchemaNotification) FKUser_Receiver(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esn *ExtraSchemaNotification) FKUser_Sender(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esn *ExtraSchemaNotification) Insert(ctx context.Context, db DB) (*ExtraSchemaNotification, error)
- func (esn *ExtraSchemaNotification) SetUpdateParams(params *ExtraSchemaNotificationUpdateParams)
- func (esn *ExtraSchemaNotification) Update(ctx context.Context, db DB) (*ExtraSchemaNotification, error)
- func (esn *ExtraSchemaNotification) Upsert(ctx context.Context, db DB, params *ExtraSchemaNotificationCreateParams) (*ExtraSchemaNotification, error)
- type ExtraSchemaNotificationCreateParams
- func (p ExtraSchemaNotificationCreateParams) GetBody() *string
- func (p ExtraSchemaNotificationCreateParams) GetExtraSchemaNotificationType() *ExtraSchemaNotificationType
- func (p ExtraSchemaNotificationCreateParams) GetReceiver() *ExtraSchemaUserID
- func (p ExtraSchemaNotificationCreateParams) GetSender() *ExtraSchemaUserID
- type ExtraSchemaNotificationID
- type ExtraSchemaNotificationJoins
- type ExtraSchemaNotificationParams
- type ExtraSchemaNotificationSelectConfig
- type ExtraSchemaNotificationSelectConfigOption
- func WithExtraSchemaNotificationFilters(filters map[string][]any) ExtraSchemaNotificationSelectConfigOption
- func WithExtraSchemaNotificationHavingClause(conditions map[string][]any) ExtraSchemaNotificationSelectConfigOption
- func WithExtraSchemaNotificationJoin(joins ExtraSchemaNotificationJoins) ExtraSchemaNotificationSelectConfigOption
- func WithExtraSchemaNotificationLimit(limit int) ExtraSchemaNotificationSelectConfigOption
- func WithExtraSchemaNotificationOrderBy(rows map[string]*Direction) ExtraSchemaNotificationSelectConfigOption
- type ExtraSchemaNotificationType
- type ExtraSchemaNotificationUpdateParams
- func (p ExtraSchemaNotificationUpdateParams) GetBody() *string
- func (p ExtraSchemaNotificationUpdateParams) GetExtraSchemaNotificationType() *ExtraSchemaNotificationType
- func (p ExtraSchemaNotificationUpdateParams) GetReceiver() *ExtraSchemaUserID
- func (p ExtraSchemaNotificationUpdateParams) GetSender() *ExtraSchemaUserID
- type ExtraSchemaPagElement
- func CreateExtraSchemaPagElement(ctx context.Context, db DB, params *ExtraSchemaPagElementCreateParams) (*ExtraSchemaPagElement, error)
- func ExtraSchemaPagElementByCreatedAt(ctx context.Context, db DB, createdAt time.Time, ...) (*ExtraSchemaPagElement, error)
- func ExtraSchemaPagElementByPaginatedElementID(ctx context.Context, db DB, paginatedElementID ExtraSchemaPagElementID, ...) (*ExtraSchemaPagElement, error)
- func ExtraSchemaPagElementPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaPagElement, error)
- func (espe *ExtraSchemaPagElement) Delete(ctx context.Context, db DB) error
- func (espe *ExtraSchemaPagElement) FKDummyJoin_Dummy(ctx context.Context, db DB) (*ExtraSchemaDummyJoin, error)
- func (espe *ExtraSchemaPagElement) Insert(ctx context.Context, db DB) (*ExtraSchemaPagElement, error)
- func (espe *ExtraSchemaPagElement) SetUpdateParams(params *ExtraSchemaPagElementUpdateParams)
- func (espe *ExtraSchemaPagElement) Update(ctx context.Context, db DB) (*ExtraSchemaPagElement, error)
- func (espe *ExtraSchemaPagElement) Upsert(ctx context.Context, db DB, params *ExtraSchemaPagElementCreateParams) (*ExtraSchemaPagElement, error)
- type ExtraSchemaPagElementCreateParams
- type ExtraSchemaPagElementID
- type ExtraSchemaPagElementJoins
- type ExtraSchemaPagElementParams
- type ExtraSchemaPagElementSelectConfig
- type ExtraSchemaPagElementSelectConfigOption
- func WithExtraSchemaPagElementFilters(filters map[string][]any) ExtraSchemaPagElementSelectConfigOption
- func WithExtraSchemaPagElementHavingClause(conditions map[string][]any) ExtraSchemaPagElementSelectConfigOption
- func WithExtraSchemaPagElementJoin(joins ExtraSchemaPagElementJoins) ExtraSchemaPagElementSelectConfigOption
- func WithExtraSchemaPagElementLimit(limit int) ExtraSchemaPagElementSelectConfigOption
- func WithExtraSchemaPagElementOrderBy(rows map[string]*Direction) ExtraSchemaPagElementSelectConfigOption
- type ExtraSchemaPagElementUpdateParams
- type ExtraSchemaTableEntity
- type ExtraSchemaUser
- func CreateExtraSchemaUser(ctx context.Context, db DB, params *ExtraSchemaUserCreateParams) (*ExtraSchemaUser, error)
- func ExtraSchemaUserByCreatedAt(ctx context.Context, db DB, createdAt time.Time, ...) (*ExtraSchemaUser, error)
- func ExtraSchemaUserByName(ctx context.Context, db DB, name string, ...) (*ExtraSchemaUser, error)
- func ExtraSchemaUserByUserID(ctx context.Context, db DB, userID ExtraSchemaUserID, ...) (*ExtraSchemaUser, error)
- func ExtraSchemaUserPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaUser, error)
- func (esu *ExtraSchemaUser) Delete(ctx context.Context, db DB) error
- func (esu *ExtraSchemaUser) FKUserAPIKey_APIKeyID(ctx context.Context, db DB) (*ExtraSchemaUserAPIKey, error)
- func (esu *ExtraSchemaUser) Insert(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esu *ExtraSchemaUser) Restore(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esu *ExtraSchemaUser) SetUpdateParams(params *ExtraSchemaUserUpdateParams)
- func (esu *ExtraSchemaUser) SoftDelete(ctx context.Context, db DB) error
- func (esu *ExtraSchemaUser) Update(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esu *ExtraSchemaUser) Upsert(ctx context.Context, db DB, params *ExtraSchemaUserCreateParams) (*ExtraSchemaUser, error)
- type ExtraSchemaUserAPIKey
- func CreateExtraSchemaUserAPIKey(ctx context.Context, db DB, params *ExtraSchemaUserAPIKeyCreateParams) (*ExtraSchemaUserAPIKey, error)
- func ExtraSchemaUserAPIKeyByAPIKey(ctx context.Context, db DB, apiKey string, ...) (*ExtraSchemaUserAPIKey, error)
- func ExtraSchemaUserAPIKeyByUserAPIKeyID(ctx context.Context, db DB, userAPIKeyID ExtraSchemaUserAPIKeyID, ...) (*ExtraSchemaUserAPIKey, error)
- func ExtraSchemaUserAPIKeyByUserID(ctx context.Context, db DB, userID ExtraSchemaUserID, ...) (*ExtraSchemaUserAPIKey, error)
- func ExtraSchemaUserAPIKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaUserAPIKey, error)
- func (esuak *ExtraSchemaUserAPIKey) Delete(ctx context.Context, db DB) error
- func (esuak *ExtraSchemaUserAPIKey) FKUser_UserID(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (esuak *ExtraSchemaUserAPIKey) Insert(ctx context.Context, db DB) (*ExtraSchemaUserAPIKey, error)
- func (esuak *ExtraSchemaUserAPIKey) SetUpdateParams(params *ExtraSchemaUserAPIKeyUpdateParams)
- func (esuak *ExtraSchemaUserAPIKey) Update(ctx context.Context, db DB) (*ExtraSchemaUserAPIKey, error)
- func (esuak *ExtraSchemaUserAPIKey) Upsert(ctx context.Context, db DB, params *ExtraSchemaUserAPIKeyCreateParams) (*ExtraSchemaUserAPIKey, error)
- type ExtraSchemaUserAPIKeyCreateParams
- type ExtraSchemaUserAPIKeyID
- type ExtraSchemaUserAPIKeyJoins
- type ExtraSchemaUserAPIKeyParams
- type ExtraSchemaUserAPIKeySelectConfig
- type ExtraSchemaUserAPIKeySelectConfigOption
- func WithExtraSchemaUserAPIKeyFilters(filters map[string][]any) ExtraSchemaUserAPIKeySelectConfigOption
- func WithExtraSchemaUserAPIKeyHavingClause(conditions map[string][]any) ExtraSchemaUserAPIKeySelectConfigOption
- func WithExtraSchemaUserAPIKeyJoin(joins ExtraSchemaUserAPIKeyJoins) ExtraSchemaUserAPIKeySelectConfigOption
- func WithExtraSchemaUserAPIKeyLimit(limit int) ExtraSchemaUserAPIKeySelectConfigOption
- func WithExtraSchemaUserAPIKeyOrderBy(rows map[string]*Direction) ExtraSchemaUserAPIKeySelectConfigOption
- type ExtraSchemaUserAPIKeyUpdateParams
- type ExtraSchemaUserCreateParams
- type ExtraSchemaUserID
- type ExtraSchemaUserJoins
- type ExtraSchemaUserM2MBookBA
- type ExtraSchemaUserM2MBookBASK
- type ExtraSchemaUserM2MWorkItemWIA
- type ExtraSchemaUserParams
- type ExtraSchemaUserSelectConfig
- type ExtraSchemaUserSelectConfigOption
- func WithDeletedExtraSchemaUserOnly() ExtraSchemaUserSelectConfigOption
- func WithExtraSchemaUserFilters(filters map[string][]any) ExtraSchemaUserSelectConfigOption
- func WithExtraSchemaUserHavingClause(conditions map[string][]any) ExtraSchemaUserSelectConfigOption
- func WithExtraSchemaUserJoin(joins ExtraSchemaUserJoins) ExtraSchemaUserSelectConfigOption
- func WithExtraSchemaUserLimit(limit int) ExtraSchemaUserSelectConfigOption
- func WithExtraSchemaUserOrderBy(rows map[string]*Direction) ExtraSchemaUserSelectConfigOption
- type ExtraSchemaUserUpdateParams
- type ExtraSchemaWorkItem
- func CreateExtraSchemaWorkItem(ctx context.Context, db DB, params *ExtraSchemaWorkItemCreateParams) (*ExtraSchemaWorkItem, error)
- func ExtraSchemaWorkItemByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, ...) (*ExtraSchemaWorkItem, error)
- func ExtraSchemaWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaWorkItem, error)
- func ExtraSchemaWorkItems(ctx context.Context, db DB, opts ...ExtraSchemaWorkItemSelectConfigOption) ([]ExtraSchemaWorkItem, error)
- func ExtraSchemaWorkItemsByTitle(ctx context.Context, db DB, title *string, ...) ([]ExtraSchemaWorkItem, error)
- func (eswi *ExtraSchemaWorkItem) Delete(ctx context.Context, db DB) error
- func (eswi *ExtraSchemaWorkItem) Insert(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
- func (eswi *ExtraSchemaWorkItem) SetUpdateParams(params *ExtraSchemaWorkItemUpdateParams)
- func (eswi *ExtraSchemaWorkItem) Update(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
- func (eswi *ExtraSchemaWorkItem) Upsert(ctx context.Context, db DB, params *ExtraSchemaWorkItemCreateParams) (*ExtraSchemaWorkItem, error)
- type ExtraSchemaWorkItemAdmin
- func CreateExtraSchemaWorkItemAdmin(ctx context.Context, db DB, params *ExtraSchemaWorkItemAdminCreateParams) (*ExtraSchemaWorkItemAdmin, error)
- func ExtraSchemaWorkItemAdminByWorkItemIDAdmin(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, ...) (*ExtraSchemaWorkItemAdmin, error)
- func ExtraSchemaWorkItemAdminPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaWorkItemAdmin, error)
- func ExtraSchemaWorkItemAdminsByAdmin(ctx context.Context, db DB, admin ExtraSchemaUserID, ...) ([]ExtraSchemaWorkItemAdmin, error)
- func ExtraSchemaWorkItemAdminsByAdminWorkItemID(ctx context.Context, db DB, admin ExtraSchemaUserID, ...) ([]ExtraSchemaWorkItemAdmin, error)
- func ExtraSchemaWorkItemAdminsByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, ...) ([]ExtraSchemaWorkItemAdmin, error)
- func (eswia *ExtraSchemaWorkItemAdmin) Delete(ctx context.Context, db DB) error
- func (eswia *ExtraSchemaWorkItemAdmin) FKUser_Admin(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (eswia *ExtraSchemaWorkItemAdmin) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
- func (eswia *ExtraSchemaWorkItemAdmin) Insert(ctx context.Context, db DB) (*ExtraSchemaWorkItemAdmin, error)
- func (eswia *ExtraSchemaWorkItemAdmin) SetUpdateParams(params *ExtraSchemaWorkItemAdminUpdateParams)
- type ExtraSchemaWorkItemAdminCreateParams
- type ExtraSchemaWorkItemAdminJoins
- type ExtraSchemaWorkItemAdminParams
- type ExtraSchemaWorkItemAdminSelectConfig
- type ExtraSchemaWorkItemAdminSelectConfigOption
- func WithExtraSchemaWorkItemAdminFilters(filters map[string][]any) ExtraSchemaWorkItemAdminSelectConfigOption
- func WithExtraSchemaWorkItemAdminHavingClause(conditions map[string][]any) ExtraSchemaWorkItemAdminSelectConfigOption
- func WithExtraSchemaWorkItemAdminJoin(joins ExtraSchemaWorkItemAdminJoins) ExtraSchemaWorkItemAdminSelectConfigOption
- func WithExtraSchemaWorkItemAdminLimit(limit int) ExtraSchemaWorkItemAdminSelectConfigOption
- func WithExtraSchemaWorkItemAdminOrderBy(rows map[string]*Direction) ExtraSchemaWorkItemAdminSelectConfigOption
- type ExtraSchemaWorkItemAdminUpdateParams
- type ExtraSchemaWorkItemAssignee
- func CreateExtraSchemaWorkItemAssignee(ctx context.Context, db DB, params *ExtraSchemaWorkItemAssigneeCreateParams) (*ExtraSchemaWorkItemAssignee, error)
- func ExtraSchemaWorkItemAssigneeByWorkItemIDAssignee(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, ...) (*ExtraSchemaWorkItemAssignee, error)
- func ExtraSchemaWorkItemAssigneePaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]ExtraSchemaWorkItemAssignee, error)
- func ExtraSchemaWorkItemAssigneesByAssignee(ctx context.Context, db DB, assignee ExtraSchemaUserID, ...) ([]ExtraSchemaWorkItemAssignee, error)
- func ExtraSchemaWorkItemAssigneesByAssigneeWorkItemID(ctx context.Context, db DB, assignee ExtraSchemaUserID, ...) ([]ExtraSchemaWorkItemAssignee, error)
- func ExtraSchemaWorkItemAssigneesByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, ...) ([]ExtraSchemaWorkItemAssignee, error)
- func (eswia *ExtraSchemaWorkItemAssignee) Delete(ctx context.Context, db DB) error
- func (eswia *ExtraSchemaWorkItemAssignee) FKUser_Assignee(ctx context.Context, db DB) (*ExtraSchemaUser, error)
- func (eswia *ExtraSchemaWorkItemAssignee) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
- func (eswia *ExtraSchemaWorkItemAssignee) Insert(ctx context.Context, db DB) (*ExtraSchemaWorkItemAssignee, error)
- func (eswia *ExtraSchemaWorkItemAssignee) SetUpdateParams(params *ExtraSchemaWorkItemAssigneeUpdateParams)
- func (eswia *ExtraSchemaWorkItemAssignee) Update(ctx context.Context, db DB) (*ExtraSchemaWorkItemAssignee, error)
- func (eswia *ExtraSchemaWorkItemAssignee) Upsert(ctx context.Context, db DB, params *ExtraSchemaWorkItemAssigneeCreateParams) (*ExtraSchemaWorkItemAssignee, error)
- type ExtraSchemaWorkItemAssigneeCreateParams
- type ExtraSchemaWorkItemAssigneeJoins
- type ExtraSchemaWorkItemAssigneeM2MAssigneeWIA
- type ExtraSchemaWorkItemAssigneeM2MWorkItemWIA
- type ExtraSchemaWorkItemAssigneeParams
- type ExtraSchemaWorkItemAssigneeSelectConfig
- type ExtraSchemaWorkItemAssigneeSelectConfigOption
- func WithExtraSchemaWorkItemAssigneeFilters(filters map[string][]any) ExtraSchemaWorkItemAssigneeSelectConfigOption
- func WithExtraSchemaWorkItemAssigneeHavingClause(conditions map[string][]any) ExtraSchemaWorkItemAssigneeSelectConfigOption
- func WithExtraSchemaWorkItemAssigneeJoin(joins ExtraSchemaWorkItemAssigneeJoins) ExtraSchemaWorkItemAssigneeSelectConfigOption
- func WithExtraSchemaWorkItemAssigneeLimit(limit int) ExtraSchemaWorkItemAssigneeSelectConfigOption
- func WithExtraSchemaWorkItemAssigneeOrderBy(rows map[string]*Direction) ExtraSchemaWorkItemAssigneeSelectConfigOption
- type ExtraSchemaWorkItemAssigneeUpdateParams
- type ExtraSchemaWorkItemCreateParams
- type ExtraSchemaWorkItemID
- type ExtraSchemaWorkItemJoins
- type ExtraSchemaWorkItemM2MAssigneeWIA
- type ExtraSchemaWorkItemParams
- type ExtraSchemaWorkItemRole
- type ExtraSchemaWorkItemSelectConfig
- type ExtraSchemaWorkItemSelectConfigOption
- func WithExtraSchemaWorkItemFilters(filters map[string][]any) ExtraSchemaWorkItemSelectConfigOption
- func WithExtraSchemaWorkItemHavingClause(conditions map[string][]any) ExtraSchemaWorkItemSelectConfigOption
- func WithExtraSchemaWorkItemJoin(joins ExtraSchemaWorkItemJoins) ExtraSchemaWorkItemSelectConfigOption
- func WithExtraSchemaWorkItemLimit(limit int) ExtraSchemaWorkItemSelectConfigOption
- func WithExtraSchemaWorkItemOrderBy(rows map[string]*Direction) ExtraSchemaWorkItemSelectConfigOption
- type ExtraSchemaWorkItemUpdateParams
- type GetCacheDemoWorkItemQueryParameters
- type GetCurrentUserQueryParameters
- type GetExtraSchemaNotificationsParams
- type GetExtraSchemaNotificationsRow
- type GetPaginatedNotificationsParams
- type GetPaginatedUsersParams
- type GetPaginatedUsersQueryParameters
- type GetPaginatedWorkItemParams
- type GetProjectWorkitemsParams
- type GetUserNotificationsParams
- type GetUserNotificationsRow
- type GetUserParams
- type GetUserRow
- type HTTPError
- type HTTPValidationError
- type InitializeProjectJSONRequestBody
- type IsTeamInProjectParams
- type KanbanStep
- func CreateKanbanStep(ctx context.Context, db DB, params *KanbanStepCreateParams) (*KanbanStep, error)
- func KanbanStepByKanbanStepID(ctx context.Context, db DB, kanbanStepID KanbanStepID, ...) (*KanbanStep, error)
- func KanbanStepByProjectIDNameStepOrder(ctx context.Context, db DB, projectID ProjectID, name string, stepOrder int, ...) (*KanbanStep, error)
- func KanbanStepByProjectIDStepOrder(ctx context.Context, db DB, projectID ProjectID, stepOrder int, ...) (*KanbanStep, error)
- func KanbanStepPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]KanbanStep, error)
- func KanbanStepsByName(ctx context.Context, db DB, name string, opts ...KanbanStepSelectConfigOption) ([]KanbanStep, error)
- func KanbanStepsByProjectID(ctx context.Context, db DB, projectID ProjectID, ...) ([]KanbanStep, error)
- func KanbanStepsByStepOrder(ctx context.Context, db DB, stepOrder int, ...) ([]KanbanStep, error)
- func (ks *KanbanStep) Delete(ctx context.Context, db DB) error
- func (ks *KanbanStep) FKProject_ProjectID(ctx context.Context, db DB) (*Project, error)
- func (ks *KanbanStep) Insert(ctx context.Context, db DB) (*KanbanStep, error)
- func (ks *KanbanStep) SetUpdateParams(params *KanbanStepUpdateParams)
- func (ks *KanbanStep) Update(ctx context.Context, db DB) (*KanbanStep, error)
- func (ks *KanbanStep) Upsert(ctx context.Context, db DB, params *KanbanStepCreateParams) (*KanbanStep, error)
- type KanbanStepCreateParams
- func (p KanbanStepCreateParams) GetColor() *string
- func (p KanbanStepCreateParams) GetDescription() *string
- func (p KanbanStepCreateParams) GetName() *string
- func (p KanbanStepCreateParams) GetProjectID() *ProjectID
- func (p KanbanStepCreateParams) GetStepOrder() *int
- func (p KanbanStepCreateParams) GetTimeTrackable() *bool
- type KanbanStepID
- type KanbanStepJoins
- type KanbanStepParams
- type KanbanStepSelectConfig
- type KanbanStepSelectConfigOption
- func WithKanbanStepFilters(filters map[string][]any) KanbanStepSelectConfigOption
- func WithKanbanStepHavingClause(conditions map[string][]any) KanbanStepSelectConfigOption
- func WithKanbanStepJoin(joins KanbanStepJoins) KanbanStepSelectConfigOption
- func WithKanbanStepLimit(limit int) KanbanStepSelectConfigOption
- func WithKanbanStepOrderBy(rows map[string]*Direction) KanbanStepSelectConfigOption
- type KanbanStepUpdateParams
- func (p KanbanStepUpdateParams) GetColor() *string
- func (p KanbanStepUpdateParams) GetDescription() *string
- func (p KanbanStepUpdateParams) GetName() *string
- func (p KanbanStepUpdateParams) GetProjectID() *ProjectID
- func (p KanbanStepUpdateParams) GetStepOrder() *int
- func (p KanbanStepUpdateParams) GetTimeTrackable() *bool
- type ModelsCacheDemoWorkItemJoins
- type ModelsDemoTwoWorkItem
- type ModelsDemoTwoWorkItemCreateParams
- type ModelsDemoWorkItem
- type ModelsDemoWorkItemCreateParams
- type ModelsKanbanStep
- type ModelsNotification
- type ModelsProject
- type ModelsProjectConfig
- type ModelsProjectConfigField
- type ModelsTeam
- type ModelsTeamCreateParams
- type ModelsTimeEntry
- type ModelsUser
- type ModelsUserAPIKey
- type ModelsUserID
- type ModelsUserJoins
- type ModelsWorkItem
- type ModelsWorkItemComment
- type ModelsWorkItemCreateParams
- type ModelsWorkItemM2MAssigneeWIA
- type ModelsWorkItemTag
- type ModelsWorkItemTagCreateParams
- type ModelsWorkItemType
- type Movie
- func (m *Movie) Delete(ctx context.Context, db DB) error
- func (m *Movie) Insert(ctx context.Context, db DB) (*Movie, error)
- func (m *Movie) SetUpdateParams(params *MovieUpdateParams)
- func (m *Movie) Update(ctx context.Context, db DB) (*Movie, error)
- func (m *Movie) Upsert(ctx context.Context, db DB, params *MovieCreateParams) (*Movie, error)
- type MovieCreateParams
- type MovieID
- type MovieJoins
- type MovieParams
- type MovieSelectConfig
- type MovieSelectConfigOption
- func WithMovieFilters(filters map[string][]any) MovieSelectConfigOption
- func WithMovieHavingClause(conditions map[string][]any) MovieSelectConfigOption
- func WithMovieJoin(joins MovieJoins) MovieSelectConfigOption
- func WithMovieLimit(limit int) MovieSelectConfigOption
- func WithMovieOrderBy(rows map[string]*Direction) MovieSelectConfigOption
- type MovieUpdateParams
- type MyProviderLoginParams
- type Notification
- func CreateNotification(ctx context.Context, db DB, params *NotificationCreateParams) (*Notification, error)
- func NotificationByNotificationID(ctx context.Context, db DB, notificationID NotificationID, ...) (*Notification, error)
- func NotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]Notification, error)
- func NotificationsByReceiverRankNotificationTypeCreatedAt(ctx context.Context, db DB, receiverRank *int, ...) ([]Notification, error)
- func (n *Notification) Delete(ctx context.Context, db DB) error
- func (n *Notification) FKUser_Receiver(ctx context.Context, db DB) (*User, error)
- func (n *Notification) FKUser_Sender(ctx context.Context, db DB) (*User, error)
- func (n *Notification) Insert(ctx context.Context, db DB) (*Notification, error)
- func (n *Notification) SetUpdateParams(params *NotificationUpdateParams)
- func (n *Notification) Update(ctx context.Context, db DB) (*Notification, error)
- func (n *Notification) Upsert(ctx context.Context, db DB, params *NotificationCreateParams) (*Notification, error)
- type NotificationCreateParams
- func (p NotificationCreateParams) GetBody() *string
- func (p NotificationCreateParams) GetLabels() *[]string
- func (p NotificationCreateParams) GetLink() *string
- func (p NotificationCreateParams) GetNotificationType() *NotificationType
- func (p NotificationCreateParams) GetReceiver() *UserID
- func (p NotificationCreateParams) GetReceiverRank() *int
- func (p NotificationCreateParams) GetSender() *UserID
- func (p NotificationCreateParams) GetTitle() *string
- type NotificationID
- type NotificationJoins
- type NotificationParams
- type NotificationResponse
- type NotificationSelectConfig
- type NotificationSelectConfigOption
- func WithNotificationFilters(filters map[string][]any) NotificationSelectConfigOption
- func WithNotificationHavingClause(conditions map[string][]any) NotificationSelectConfigOption
- func WithNotificationJoin(joins NotificationJoins) NotificationSelectConfigOption
- func WithNotificationLimit(limit int) NotificationSelectConfigOption
- func WithNotificationOrderBy(rows map[string]*Direction) NotificationSelectConfigOption
- type NotificationType
- type NotificationUpdateParams
- func (p NotificationUpdateParams) GetBody() *string
- func (p NotificationUpdateParams) GetLabels() *[]string
- func (p NotificationUpdateParams) GetLink() *string
- func (p NotificationUpdateParams) GetNotificationType() *NotificationType
- func (p NotificationUpdateParams) GetReceiver() *UserID
- func (p NotificationUpdateParams) GetReceiverRank() *int
- func (p NotificationUpdateParams) GetSender() *UserID
- func (p NotificationUpdateParams) GetTitle() *string
- type PaginatedDemoWorkItemsResponse
- type PaginatedNotificationsResponse
- type PaginatedUsersResponse
- type Pagination
- type PaginationCursor
- type PaginationFilter
- func (t PaginationFilter) AsPaginationFilterArray() (PaginationFilterArray, error)
- func (t PaginationFilter) AsPaginationFilterPrimitive() (PaginationFilterPrimitive, error)
- func (t PaginationFilter) Discriminator() (string, error)
- func (t PaginationFilter) MarshalJSON() ([]byte, error)
- func (t *PaginationFilter) UnmarshalJSON(b []byte) error
- func (t PaginationFilter) ValueByDiscriminator() (interface{}, error)
- type PaginationFilterArray
- type PaginationFilterModes
- type PaginationFilterPrimitive
- type PaginationItems
- type PaginationPage
- type Project
- func CreateProject(ctx context.Context, db DB, params *ProjectCreateParams) (*Project, error)
- func ProjectByName(ctx context.Context, db DB, name ProjectName, ...) (*Project, error)
- func ProjectByProjectID(ctx context.Context, db DB, projectID ProjectID, ...) (*Project, error)
- func ProjectByWorkItemsTableName(ctx context.Context, db DB, workItemsTableName string, ...) (*Project, error)
- func ProjectPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]Project, error)
- func (p *Project) Delete(ctx context.Context, db DB) error
- func (p *Project) Insert(ctx context.Context, db DB) (*Project, error)
- func (p *Project) SetUpdateParams(params *ProjectUpdateParams)
- func (p *Project) Update(ctx context.Context, db DB) (*Project, error)
- func (p *Project) Upsert(ctx context.Context, db DB, params *ProjectCreateParams) (*Project, error)
- type ProjectBoard
- type ProjectConfig
- type ProjectConfigField
- type ProjectCreateParams
- type ProjectID
- type ProjectJoins
- type ProjectName
- type ProjectParams
- type ProjectSelectConfig
- type ProjectSelectConfigOption
- func WithProjectFilters(filters map[string][]any) ProjectSelectConfigOption
- func WithProjectHavingClause(conditions map[string][]any) ProjectSelectConfigOption
- func WithProjectJoin(joins ProjectJoins) ProjectSelectConfigOption
- func WithProjectLimit(limit int) ProjectSelectConfigOption
- func WithProjectOrderBy(rows map[string]*Direction) ProjectSelectConfigOption
- type ProjectUpdateParams
- type Querier
- type Queries
- func (q *Queries) GetExtraSchemaNotifications(ctx context.Context, db DBTX, arg GetExtraSchemaNotificationsParams) ([]GetExtraSchemaNotificationsRow, error)
- func (q *Queries) GetUser(ctx context.Context, db DBTX, arg GetUserParams) (GetUserRow, error)
- func (q *Queries) GetUserNotifications(ctx context.Context, db DBTX, arg GetUserNotificationsParams) ([]GetUserNotificationsRow, error)
- func (q *Queries) IsTeamInProject(ctx context.Context, db DBTX, arg IsTeamInProjectParams) (bool, error)
- type Role
- type Scope
- type Scopes
- type ServicesMember
- type SharedWorkItemJoins
- type TableEntity
- type Team
- func CreateTeam(ctx context.Context, db DB, params *TeamCreateParams) (*Team, error)
- func TeamByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, ...) (*Team, error)
- func TeamByTeamID(ctx context.Context, db DB, teamID TeamID, opts ...TeamSelectConfigOption) (*Team, error)
- func TeamPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]Team, error)
- func TeamsByName(ctx context.Context, db DB, name string, opts ...TeamSelectConfigOption) ([]Team, error)
- func TeamsByProjectID(ctx context.Context, db DB, projectID ProjectID, ...) ([]Team, error)
- func (t *Team) Delete(ctx context.Context, db DB) error
- func (t *Team) FKProject_ProjectID(ctx context.Context, db DB) (*Project, error)
- func (t *Team) Insert(ctx context.Context, db DB) (*Team, error)
- func (t *Team) SetUpdateParams(params *TeamUpdateParams)
- func (t *Team) Update(ctx context.Context, db DB) (*Team, error)
- func (t *Team) Upsert(ctx context.Context, db DB, params *TeamCreateParams) (*Team, error)
- type TeamCreateParams
- type TeamID
- type TeamJoins
- type TeamParams
- type TeamResponse
- type TeamSelectConfig
- type TeamSelectConfigOption
- func WithTeamFilters(filters map[string][]any) TeamSelectConfigOption
- func WithTeamHavingClause(conditions map[string][]any) TeamSelectConfigOption
- func WithTeamJoin(joins TeamJoins) TeamSelectConfigOption
- func WithTeamLimit(limit int) TeamSelectConfigOption
- func WithTeamOrderBy(rows map[string]*Direction) TeamSelectConfigOption
- type TeamUpdateParams
- type TimeEntry
- func CreateTimeEntry(ctx context.Context, db DB, params *TimeEntryCreateParams) (*TimeEntry, error)
- func TimeEntriesByUserIDTeamID(ctx context.Context, db DB, userID UserID, teamID TeamID, ...) ([]TimeEntry, error)
- func TimeEntriesByWorkItemIDTeamID(ctx context.Context, db DB, workItemID WorkItemID, teamID TeamID, ...) ([]TimeEntry, error)
- func TimeEntryByTimeEntryID(ctx context.Context, db DB, timeEntryID TimeEntryID, ...) (*TimeEntry, error)
- func TimeEntryPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]TimeEntry, error)
- func (te *TimeEntry) Delete(ctx context.Context, db DB) error
- func (te *TimeEntry) FKActivity_ActivityID(ctx context.Context, db DB) (*Activity, error)
- func (te *TimeEntry) FKTeam_TeamID(ctx context.Context, db DB) (*Team, error)
- func (te *TimeEntry) FKUser_UserID(ctx context.Context, db DB) (*User, error)
- func (te *TimeEntry) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (te *TimeEntry) Insert(ctx context.Context, db DB) (*TimeEntry, error)
- func (te *TimeEntry) SetUpdateParams(params *TimeEntryUpdateParams)
- func (te *TimeEntry) Update(ctx context.Context, db DB) (*TimeEntry, error)
- func (te *TimeEntry) Upsert(ctx context.Context, db DB, params *TimeEntryCreateParams) (*TimeEntry, error)
- type TimeEntryCreateParams
- func (p TimeEntryCreateParams) GetActivityID() *ActivityID
- func (p TimeEntryCreateParams) GetComment() *string
- func (p TimeEntryCreateParams) GetDurationMinutes() *int
- func (p TimeEntryCreateParams) GetStart() *time.Time
- func (p TimeEntryCreateParams) GetTeamID() *TeamID
- func (p TimeEntryCreateParams) GetUserID() *UserID
- func (p TimeEntryCreateParams) GetWorkItemID() *WorkItemID
- type TimeEntryID
- type TimeEntryJoins
- type TimeEntryParams
- type TimeEntryResponse
- type TimeEntrySelectConfig
- type TimeEntrySelectConfigOption
- func WithTimeEntryFilters(filters map[string][]any) TimeEntrySelectConfigOption
- func WithTimeEntryHavingClause(conditions map[string][]any) TimeEntrySelectConfigOption
- func WithTimeEntryJoin(joins TimeEntryJoins) TimeEntrySelectConfigOption
- func WithTimeEntryLimit(limit int) TimeEntrySelectConfigOption
- func WithTimeEntryOrderBy(rows map[string]*Direction) TimeEntrySelectConfigOption
- type TimeEntryUpdateParams
- func (p TimeEntryUpdateParams) GetActivityID() *ActivityID
- func (p TimeEntryUpdateParams) GetComment() *string
- func (p TimeEntryUpdateParams) GetDurationMinutes() *int
- func (p TimeEntryUpdateParams) GetStart() *time.Time
- func (p TimeEntryUpdateParams) GetTeamID() *TeamID
- func (p TimeEntryUpdateParams) GetUserID() *UserID
- func (p TimeEntryUpdateParams) GetWorkItemID() *WorkItemID
- type Topic
- type Topics
- type Trigger
- func BeforeUpdateUpdatedAt(ctx context.Context, db DB) (Trigger, error)
- func NotificationFanOut(ctx context.Context, db DB) (Trigger, error)
- func SyncUserProjects(ctx context.Context, db DB) (Trigger, error)
- func SyncUserTeams(ctx context.Context, db DB) (Trigger, error)
- func SyncWorkItems(ctx context.Context, db DB) (Trigger, error)
- type UUID
- type UpdateActivityJSONRequestBody
- type UpdateActivityRequest
- type UpdateProjectConfigJSONRequestBody
- type UpdateTeamJSONRequestBody
- type UpdateTeamRequest
- type UpdateTimeEntryJSONRequestBody
- type UpdateTimeEntryRequest
- type UpdateUserAuthRequest
- type UpdateUserAuthorizationJSONRequestBody
- type UpdateUserJSONRequestBody
- type UpdateUserRequest
- type UpdateWorkItemCommentJSONRequestBody
- type UpdateWorkItemCommentRequest
- type UpdateWorkItemTagJSONRequestBody
- type UpdateWorkItemTagRequest
- type UpdateWorkItemTypeJSONRequestBody
- type UpdateWorkItemTypeRequest
- type User
- func CreateUser(ctx context.Context, db DB, params *UserCreateParams) (*User, error)
- func UserByCreatedAt(ctx context.Context, db DB, createdAt time.Time, ...) (*User, error)
- func UserByEmail(ctx context.Context, db DB, email string, opts ...UserSelectConfigOption) (*User, error)
- func UserByExternalID(ctx context.Context, db DB, externalID string, opts ...UserSelectConfigOption) (*User, error)
- func UserByUserID(ctx context.Context, db DB, userID UserID, opts ...UserSelectConfigOption) (*User, error)
- func UserByUsername(ctx context.Context, db DB, username string, opts ...UserSelectConfigOption) (*User, error)
- func UserPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]User, error)
- func UsersByDeletedAt_WhereDeletedAtIsNotNull(ctx context.Context, db DB, deletedAt *time.Time, ...) ([]User, error)
- func UsersByRoleRankAge(ctx context.Context, db DB, roleRank int, age *int, ...) ([]User, error)
- func (u *User) Delete(ctx context.Context, db DB) error
- func (u *User) FKUserAPIKey_APIKeyID(ctx context.Context, db DB) (*UserAPIKey, error)
- func (u *User) Insert(ctx context.Context, db DB) (*User, error)
- func (u *User) Restore(ctx context.Context, db DB) (*User, error)
- func (u *User) SetUpdateParams(params *UserUpdateParams)
- func (u *User) SoftDelete(ctx context.Context, db DB) error
- func (u *User) Update(ctx context.Context, db DB) (*User, error)
- func (u *User) Upsert(ctx context.Context, db DB, params *UserCreateParams) (*User, error)
- type UserAPIKey
- func CreateUserAPIKey(ctx context.Context, db DB, params *UserAPIKeyCreateParams) (*UserAPIKey, error)
- func UserAPIKeyByAPIKey(ctx context.Context, db DB, apiKey string, ...) (*UserAPIKey, error)
- func UserAPIKeyByUserAPIKeyID(ctx context.Context, db DB, userAPIKeyID UserAPIKeyID, ...) (*UserAPIKey, error)
- func UserAPIKeyByUserID(ctx context.Context, db DB, userID UserID, ...) (*UserAPIKey, error)
- func UserAPIKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]UserAPIKey, error)
- func (uak *UserAPIKey) Delete(ctx context.Context, db DB) error
- func (uak *UserAPIKey) FKUser_UserID(ctx context.Context, db DB) (*User, error)
- func (uak *UserAPIKey) Insert(ctx context.Context, db DB) (*UserAPIKey, error)
- func (uak *UserAPIKey) SetUpdateParams(params *UserAPIKeyUpdateParams)
- func (uak *UserAPIKey) Update(ctx context.Context, db DB) (*UserAPIKey, error)
- func (uak *UserAPIKey) Upsert(ctx context.Context, db DB, params *UserAPIKeyCreateParams) (*UserAPIKey, error)
- type UserAPIKeyCreateParams
- type UserAPIKeyID
- type UserAPIKeyJoins
- type UserAPIKeyParams
- type UserAPIKeySelectConfig
- type UserAPIKeySelectConfigOption
- func WithUserAPIKeyFilters(filters map[string][]any) UserAPIKeySelectConfigOption
- func WithUserAPIKeyHavingClause(conditions map[string][]any) UserAPIKeySelectConfigOption
- func WithUserAPIKeyJoin(joins UserAPIKeyJoins) UserAPIKeySelectConfigOption
- func WithUserAPIKeyLimit(limit int) UserAPIKeySelectConfigOption
- func WithUserAPIKeyOrderBy(rows map[string]*Direction) UserAPIKeySelectConfigOption
- type UserAPIKeyUpdateParams
- type UserCreateParams
- func (p UserCreateParams) GetAPIKeyID() *UserAPIKeyID
- func (p UserCreateParams) GetAge() *int
- func (p UserCreateParams) GetEmail() *string
- func (p UserCreateParams) GetExternalID() *string
- func (p UserCreateParams) GetFirstName() *string
- func (p UserCreateParams) GetHasGlobalNotifications() *bool
- func (p UserCreateParams) GetHasPersonalNotifications() *bool
- func (p UserCreateParams) GetLastName() *string
- func (p UserCreateParams) GetRoleRank() *int
- func (p UserCreateParams) GetScopes() *Scopes
- func (p UserCreateParams) GetUsername() *string
- type UserID
- type UserJoins
- type UserM2MWorkItemWIA
- type UserNotification
- func CreateUserNotification(ctx context.Context, db DB, params *UserNotificationCreateParams) (*UserNotification, error)
- func UserNotificationByNotificationIDUserID(ctx context.Context, db DB, notificationID NotificationID, userID UserID, ...) (*UserNotification, error)
- func UserNotificationByUserNotificationID(ctx context.Context, db DB, userNotificationID UserNotificationID, ...) (*UserNotification, error)
- func UserNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]UserNotification, error)
- func UserNotificationsByNotificationID(ctx context.Context, db DB, notificationID NotificationID, ...) ([]UserNotification, error)
- func UserNotificationsByUserID(ctx context.Context, db DB, userID UserID, ...) ([]UserNotification, error)
- func (un *UserNotification) Delete(ctx context.Context, db DB) error
- func (un *UserNotification) FKNotification_NotificationID(ctx context.Context, db DB) (*Notification, error)
- func (un *UserNotification) FKUser_UserID(ctx context.Context, db DB) (*User, error)
- func (un *UserNotification) Insert(ctx context.Context, db DB) (*UserNotification, error)
- func (un *UserNotification) SetUpdateParams(params *UserNotificationUpdateParams)
- func (un *UserNotification) Update(ctx context.Context, db DB) (*UserNotification, error)
- func (un *UserNotification) Upsert(ctx context.Context, db DB, params *UserNotificationCreateParams) (*UserNotification, error)
- type UserNotificationCreateParams
- type UserNotificationID
- type UserNotificationJoins
- type UserNotificationParams
- type UserNotificationSelectConfig
- type UserNotificationSelectConfigOption
- func WithUserNotificationFilters(filters map[string][]any) UserNotificationSelectConfigOption
- func WithUserNotificationHavingClause(conditions map[string][]any) UserNotificationSelectConfigOption
- func WithUserNotificationJoin(joins UserNotificationJoins) UserNotificationSelectConfigOption
- func WithUserNotificationLimit(limit int) UserNotificationSelectConfigOption
- func WithUserNotificationOrderBy(rows map[string]*Direction) UserNotificationSelectConfigOption
- type UserNotificationUpdateParams
- type UserParams
- type UserProject
- func CreateUserProject(ctx context.Context, db DB, params *UserProjectCreateParams) (*UserProject, error)
- func UserProjectByMemberProjectID(ctx context.Context, db DB, member UserID, projectID ProjectID, ...) (*UserProject, error)
- func UserProjectPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]UserProject, error)
- func UserProjectsByMember(ctx context.Context, db DB, member UserID, ...) ([]UserProject, error)
- func UserProjectsByProjectID(ctx context.Context, db DB, projectID ProjectID, ...) ([]UserProject, error)
- func UserProjectsByProjectIDMember(ctx context.Context, db DB, projectID ProjectID, member UserID, ...) ([]UserProject, error)
- func (up *UserProject) Delete(ctx context.Context, db DB) error
- func (up *UserProject) FKProject_ProjectID(ctx context.Context, db DB) (*Project, error)
- func (up *UserProject) FKUser_Member(ctx context.Context, db DB) (*User, error)
- func (up *UserProject) Insert(ctx context.Context, db DB) (*UserProject, error)
- func (up *UserProject) SetUpdateParams(params *UserProjectUpdateParams)
- type UserProjectCreateParams
- type UserProjectJoins
- type UserProjectParams
- type UserProjectSelectConfig
- type UserProjectSelectConfigOption
- func WithUserProjectFilters(filters map[string][]any) UserProjectSelectConfigOption
- func WithUserProjectHavingClause(conditions map[string][]any) UserProjectSelectConfigOption
- func WithUserProjectJoin(joins UserProjectJoins) UserProjectSelectConfigOption
- func WithUserProjectLimit(limit int) UserProjectSelectConfigOption
- func WithUserProjectOrderBy(rows map[string]*Direction) UserProjectSelectConfigOption
- type UserProjectUpdateParams
- type UserResponse
- type UserSelectConfig
- type UserSelectConfigOption
- func WithDeletedUserOnly() UserSelectConfigOption
- func WithUserFilters(filters map[string][]any) UserSelectConfigOption
- func WithUserHavingClause(conditions map[string][]any) UserSelectConfigOption
- func WithUserJoin(joins UserJoins) UserSelectConfigOption
- func WithUserLimit(limit int) UserSelectConfigOption
- func WithUserOrderBy(rows map[string]*Direction) UserSelectConfigOption
- type UserTeam
- func CreateUserTeam(ctx context.Context, db DB, params *UserTeamCreateParams) (*UserTeam, error)
- func UserTeamByMemberTeamID(ctx context.Context, db DB, member UserID, teamID TeamID, ...) (*UserTeam, error)
- func UserTeamPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]UserTeam, error)
- func UserTeamsByMember(ctx context.Context, db DB, member UserID, opts ...UserTeamSelectConfigOption) ([]UserTeam, error)
- func UserTeamsByTeamID(ctx context.Context, db DB, teamID TeamID, opts ...UserTeamSelectConfigOption) ([]UserTeam, error)
- func UserTeamsByTeamIDMember(ctx context.Context, db DB, teamID TeamID, member UserID, ...) ([]UserTeam, error)
- func (ut *UserTeam) Delete(ctx context.Context, db DB) error
- func (ut *UserTeam) FKTeam_TeamID(ctx context.Context, db DB) (*Team, error)
- func (ut *UserTeam) FKUser_Member(ctx context.Context, db DB) (*User, error)
- func (ut *UserTeam) Insert(ctx context.Context, db DB) (*UserTeam, error)
- func (ut *UserTeam) SetUpdateParams(params *UserTeamUpdateParams)
- type UserTeamCreateParams
- type UserTeamJoins
- type UserTeamParams
- type UserTeamSelectConfig
- type UserTeamSelectConfigOption
- func WithUserTeamFilters(filters map[string][]any) UserTeamSelectConfigOption
- func WithUserTeamHavingClause(conditions map[string][]any) UserTeamSelectConfigOption
- func WithUserTeamJoin(joins UserTeamJoins) UserTeamSelectConfigOption
- func WithUserTeamLimit(limit int) UserTeamSelectConfigOption
- func WithUserTeamOrderBy(rows map[string]*Direction) UserTeamSelectConfigOption
- type UserTeamUpdateParams
- type UserUpdateParams
- func (p UserUpdateParams) GetAPIKeyID() *UserAPIKeyID
- func (p UserUpdateParams) GetAge() *int
- func (p UserUpdateParams) GetEmail() *string
- func (p UserUpdateParams) GetExternalID() *string
- func (p UserUpdateParams) GetFirstName() *string
- func (p UserUpdateParams) GetHasGlobalNotifications() *bool
- func (p UserUpdateParams) GetHasPersonalNotifications() *bool
- func (p UserUpdateParams) GetLastName() *string
- func (p UserUpdateParams) GetRoleRank() *int
- func (p UserUpdateParams) GetScopes() *Scopes
- func (p UserUpdateParams) GetUsername() *string
- type UuidUUID
- type ValidationError
- type WorkItem
- func CreateWorkItem(ctx context.Context, db DB, params *WorkItemCreateParams) (*WorkItem, error)
- func WorkItemByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, ...) (*WorkItem, error)
- func WorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]WorkItem, error)
- func WorkItemsByDeletedAt_WhereDeletedAtIsNotNull(ctx context.Context, db DB, deletedAt *time.Time, ...) ([]WorkItem, error)
- func WorkItemsByTeamID(ctx context.Context, db DB, teamID TeamID, opts ...WorkItemSelectConfigOption) ([]WorkItem, error)
- func (wi *WorkItem) Delete(ctx context.Context, db DB) error
- func (wi *WorkItem) FKKanbanStep_KanbanStepID(ctx context.Context, db DB) (*KanbanStep, error)
- func (wi *WorkItem) FKTeam_TeamID(ctx context.Context, db DB) (*Team, error)
- func (wi *WorkItem) FKWorkItemType_WorkItemTypeID(ctx context.Context, db DB) (*WorkItemType, error)
- func (wi *WorkItem) Insert(ctx context.Context, db DB) (*WorkItem, error)
- func (wi *WorkItem) Restore(ctx context.Context, db DB) (*WorkItem, error)
- func (wi *WorkItem) SetUpdateParams(params *WorkItemUpdateParams)
- func (wi *WorkItem) SoftDelete(ctx context.Context, db DB) error
- func (wi *WorkItem) Update(ctx context.Context, db DB) (*WorkItem, error)
- func (wi *WorkItem) Upsert(ctx context.Context, db DB, params *WorkItemCreateParams) (*WorkItem, error)
- type WorkItemAssignee
- func CreateWorkItemAssignee(ctx context.Context, db DB, params *WorkItemAssigneeCreateParams) (*WorkItemAssignee, error)
- func WorkItemAssigneeByWorkItemIDAssignee(ctx context.Context, db DB, workItemID WorkItemID, assignee UserID, ...) (*WorkItemAssignee, error)
- func WorkItemAssigneePaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]WorkItemAssignee, error)
- func WorkItemAssigneesByAssignee(ctx context.Context, db DB, assignee UserID, ...) ([]WorkItemAssignee, error)
- func WorkItemAssigneesByAssigneeWorkItemID(ctx context.Context, db DB, assignee UserID, workItemID WorkItemID, ...) ([]WorkItemAssignee, error)
- func WorkItemAssigneesByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, ...) ([]WorkItemAssignee, error)
- func (wia *WorkItemAssignee) Delete(ctx context.Context, db DB) error
- func (wia *WorkItemAssignee) FKUser_Assignee(ctx context.Context, db DB) (*User, error)
- func (wia *WorkItemAssignee) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (wia *WorkItemAssignee) Insert(ctx context.Context, db DB) (*WorkItemAssignee, error)
- func (wia *WorkItemAssignee) SetUpdateParams(params *WorkItemAssigneeUpdateParams)
- func (wia *WorkItemAssignee) Update(ctx context.Context, db DB) (*WorkItemAssignee, error)
- func (wia *WorkItemAssignee) Upsert(ctx context.Context, db DB, params *WorkItemAssigneeCreateParams) (*WorkItemAssignee, error)
- type WorkItemAssigneeCreateParams
- type WorkItemAssigneeJoins
- type WorkItemAssigneeM2MAssigneeWIA
- type WorkItemAssigneeM2MWorkItemWIA
- type WorkItemAssigneeParams
- type WorkItemAssigneeSelectConfig
- type WorkItemAssigneeSelectConfigOption
- func WithWorkItemAssigneeFilters(filters map[string][]any) WorkItemAssigneeSelectConfigOption
- func WithWorkItemAssigneeHavingClause(conditions map[string][]any) WorkItemAssigneeSelectConfigOption
- func WithWorkItemAssigneeJoin(joins WorkItemAssigneeJoins) WorkItemAssigneeSelectConfigOption
- func WithWorkItemAssigneeLimit(limit int) WorkItemAssigneeSelectConfigOption
- func WithWorkItemAssigneeOrderBy(rows map[string]*Direction) WorkItemAssigneeSelectConfigOption
- type WorkItemAssigneeUpdateParams
- type WorkItemBase
- type WorkItemComment
- func CreateWorkItemComment(ctx context.Context, db DB, params *WorkItemCommentCreateParams) (*WorkItemComment, error)
- func WorkItemCommentByWorkItemCommentID(ctx context.Context, db DB, workItemCommentID WorkItemCommentID, ...) (*WorkItemComment, error)
- func WorkItemCommentPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]WorkItemComment, error)
- func WorkItemCommentsByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, ...) ([]WorkItemComment, error)
- func (wic *WorkItemComment) Delete(ctx context.Context, db DB) error
- func (wic *WorkItemComment) FKUser_UserID(ctx context.Context, db DB) (*User, error)
- func (wic *WorkItemComment) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (wic *WorkItemComment) Insert(ctx context.Context, db DB) (*WorkItemComment, error)
- func (wic *WorkItemComment) SetUpdateParams(params *WorkItemCommentUpdateParams)
- func (wic *WorkItemComment) Update(ctx context.Context, db DB) (*WorkItemComment, error)
- func (wic *WorkItemComment) Upsert(ctx context.Context, db DB, params *WorkItemCommentCreateParams) (*WorkItemComment, error)
- type WorkItemCommentCreateParams
- type WorkItemCommentID
- type WorkItemCommentJoins
- type WorkItemCommentParams
- type WorkItemCommentResponse
- type WorkItemCommentSelectConfig
- type WorkItemCommentSelectConfigOption
- func WithWorkItemCommentFilters(filters map[string][]any) WorkItemCommentSelectConfigOption
- func WithWorkItemCommentHavingClause(conditions map[string][]any) WorkItemCommentSelectConfigOption
- func WithWorkItemCommentJoin(joins WorkItemCommentJoins) WorkItemCommentSelectConfigOption
- func WithWorkItemCommentLimit(limit int) WorkItemCommentSelectConfigOption
- func WithWorkItemCommentOrderBy(rows map[string]*Direction) WorkItemCommentSelectConfigOption
- type WorkItemCommentUpdateParams
- type WorkItemCreateParams
- func (p WorkItemCreateParams) GetClosedAt() *time.Time
- func (p WorkItemCreateParams) GetDescription() *string
- func (p WorkItemCreateParams) GetKanbanStepID() *KanbanStepID
- func (p WorkItemCreateParams) GetMetadata() *map[string]any
- func (p WorkItemCreateParams) GetTargetDate() *time.Time
- func (p WorkItemCreateParams) GetTeamID() *TeamID
- func (p WorkItemCreateParams) GetTitle() *string
- func (p WorkItemCreateParams) GetWorkItemTypeID() *WorkItemTypeID
- type WorkItemID
- type WorkItemJoins
- type WorkItemM2MAssigneeWIA
- type WorkItemParams
- type WorkItemResponse
- func (t WorkItemResponse) AsDemoTwoWorkItemResponse() (DemoTwoWorkItemResponse, error)
- func (t WorkItemResponse) AsDemoWorkItemResponse() (DemoWorkItemResponse, error)
- func (t WorkItemResponse) Discriminator() (string, error)
- func (t WorkItemResponse) MarshalJSON() ([]byte, error)
- func (t *WorkItemResponse) UnmarshalJSON(b []byte) error
- func (t WorkItemResponse) ValueByDiscriminator() (interface{}, error)
- type WorkItemRole
- type WorkItemSelectConfig
- type WorkItemSelectConfigOption
- func WithDeletedWorkItemOnly() WorkItemSelectConfigOption
- func WithWorkItemFilters(filters map[string][]any) WorkItemSelectConfigOption
- func WithWorkItemHavingClause(conditions map[string][]any) WorkItemSelectConfigOption
- func WithWorkItemJoin(joins WorkItemJoins) WorkItemSelectConfigOption
- func WithWorkItemLimit(limit int) WorkItemSelectConfigOption
- func WithWorkItemOrderBy(rows map[string]*Direction) WorkItemSelectConfigOption
- type WorkItemTag
- func CreateWorkItemTag(ctx context.Context, db DB, params *WorkItemTagCreateParams) (*WorkItemTag, error)
- func WorkItemTagByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, ...) (*WorkItemTag, error)
- func WorkItemTagByWorkItemTagID(ctx context.Context, db DB, workItemTagID WorkItemTagID, ...) (*WorkItemTag, error)
- func WorkItemTagPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]WorkItemTag, error)
- func WorkItemTagsByName(ctx context.Context, db DB, name string, opts ...WorkItemTagSelectConfigOption) ([]WorkItemTag, error)
- func WorkItemTagsByProjectID(ctx context.Context, db DB, projectID ProjectID, ...) ([]WorkItemTag, error)
- func (wit *WorkItemTag) Delete(ctx context.Context, db DB) error
- func (wit *WorkItemTag) FKProject_ProjectID(ctx context.Context, db DB) (*Project, error)
- func (wit *WorkItemTag) Insert(ctx context.Context, db DB) (*WorkItemTag, error)
- func (wit *WorkItemTag) Restore(ctx context.Context, db DB) (*WorkItemTag, error)
- func (wit *WorkItemTag) SetUpdateParams(params *WorkItemTagUpdateParams)
- func (wit *WorkItemTag) SoftDelete(ctx context.Context, db DB) error
- func (wit *WorkItemTag) Update(ctx context.Context, db DB) (*WorkItemTag, error)
- func (wit *WorkItemTag) Upsert(ctx context.Context, db DB, params *WorkItemTagCreateParams) (*WorkItemTag, error)
- type WorkItemTagCreateParams
- type WorkItemTagID
- type WorkItemTagJoins
- type WorkItemTagParams
- type WorkItemTagResponse
- type WorkItemTagSelectConfig
- type WorkItemTagSelectConfigOption
- func WithDeletedWorkItemTagOnly() WorkItemTagSelectConfigOption
- func WithWorkItemTagFilters(filters map[string][]any) WorkItemTagSelectConfigOption
- func WithWorkItemTagHavingClause(conditions map[string][]any) WorkItemTagSelectConfigOption
- func WithWorkItemTagJoin(joins WorkItemTagJoins) WorkItemTagSelectConfigOption
- func WithWorkItemTagLimit(limit int) WorkItemTagSelectConfigOption
- func WithWorkItemTagOrderBy(rows map[string]*Direction) WorkItemTagSelectConfigOption
- type WorkItemTagUpdateParams
- type WorkItemType
- func CreateWorkItemType(ctx context.Context, db DB, params *WorkItemTypeCreateParams) (*WorkItemType, error)
- func WorkItemTypeByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, ...) (*WorkItemType, error)
- func WorkItemTypeByWorkItemTypeID(ctx context.Context, db DB, workItemTypeID WorkItemTypeID, ...) (*WorkItemType, error)
- func WorkItemTypePaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]WorkItemType, error)
- func WorkItemTypesByName(ctx context.Context, db DB, name string, ...) ([]WorkItemType, error)
- func WorkItemTypesByProjectID(ctx context.Context, db DB, projectID ProjectID, ...) ([]WorkItemType, error)
- func (wit *WorkItemType) Delete(ctx context.Context, db DB) error
- func (wit *WorkItemType) FKProject_ProjectID(ctx context.Context, db DB) (*Project, error)
- func (wit *WorkItemType) Insert(ctx context.Context, db DB) (*WorkItemType, error)
- func (wit *WorkItemType) SetUpdateParams(params *WorkItemTypeUpdateParams)
- func (wit *WorkItemType) Update(ctx context.Context, db DB) (*WorkItemType, error)
- func (wit *WorkItemType) Upsert(ctx context.Context, db DB, params *WorkItemTypeCreateParams) (*WorkItemType, error)
- type WorkItemTypeCreateParams
- type WorkItemTypeID
- type WorkItemTypeJoins
- type WorkItemTypeParams
- type WorkItemTypeResponse
- type WorkItemTypeSelectConfig
- type WorkItemTypeSelectConfigOption
- func WithWorkItemTypeFilters(filters map[string][]any) WorkItemTypeSelectConfigOption
- func WithWorkItemTypeHavingClause(conditions map[string][]any) WorkItemTypeSelectConfigOption
- func WithWorkItemTypeJoin(joins WorkItemTypeJoins) WorkItemTypeSelectConfigOption
- func WithWorkItemTypeLimit(limit int) WorkItemTypeSelectConfigOption
- func WithWorkItemTypeOrderBy(rows map[string]*Direction) WorkItemTypeSelectConfigOption
- type WorkItemTypeUpdateParams
- type WorkItemUpdateParams
- func (p WorkItemUpdateParams) GetClosedAt() *time.Time
- func (p WorkItemUpdateParams) GetDescription() *string
- func (p WorkItemUpdateParams) GetKanbanStepID() *KanbanStepID
- func (p WorkItemUpdateParams) GetMetadata() *map[string]any
- func (p WorkItemUpdateParams) GetTargetDate() *time.Time
- func (p WorkItemUpdateParams) GetTeamID() *TeamID
- func (p WorkItemUpdateParams) GetTitle() *string
- func (p WorkItemUpdateParams) GetWorkItemTypeID() *WorkItemTypeID
- type WorkItemWorkItemTag
- func CreateWorkItemWorkItemTag(ctx context.Context, db DB, params *WorkItemWorkItemTagCreateParams) (*WorkItemWorkItemTag, error)
- func WorkItemWorkItemTagByWorkItemIDWorkItemTagID(ctx context.Context, db DB, workItemID WorkItemID, workItemTagID WorkItemTagID, ...) (*WorkItemWorkItemTag, error)
- func WorkItemWorkItemTagPaginated(ctx context.Context, db DB, cursor PaginationCursor, ...) ([]WorkItemWorkItemTag, error)
- func WorkItemWorkItemTagsByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, ...) ([]WorkItemWorkItemTag, error)
- func WorkItemWorkItemTagsByWorkItemTagID(ctx context.Context, db DB, workItemTagID WorkItemTagID, ...) ([]WorkItemWorkItemTag, error)
- func WorkItemWorkItemTagsByWorkItemTagIDWorkItemID(ctx context.Context, db DB, workItemTagID WorkItemTagID, workItemID WorkItemID, ...) ([]WorkItemWorkItemTag, error)
- func (wiwit *WorkItemWorkItemTag) Delete(ctx context.Context, db DB) error
- func (wiwit *WorkItemWorkItemTag) FKWorkItemTag_WorkItemTagID(ctx context.Context, db DB) (*WorkItemTag, error)
- func (wiwit *WorkItemWorkItemTag) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
- func (wiwit *WorkItemWorkItemTag) Insert(ctx context.Context, db DB) (*WorkItemWorkItemTag, error)
- func (wiwit *WorkItemWorkItemTag) SetUpdateParams(params *WorkItemWorkItemTagUpdateParams)
- type WorkItemWorkItemTagCreateParams
- type WorkItemWorkItemTagJoins
- type WorkItemWorkItemTagParams
- type WorkItemWorkItemTagSelectConfig
- type WorkItemWorkItemTagSelectConfigOption
- func WithWorkItemWorkItemTagFilters(filters map[string][]any) WorkItemWorkItemTagSelectConfigOption
- func WithWorkItemWorkItemTagHavingClause(conditions map[string][]any) WorkItemWorkItemTagSelectConfigOption
- func WithWorkItemWorkItemTagJoin(joins WorkItemWorkItemTagJoins) WorkItemWorkItemTagSelectConfigOption
- func WithWorkItemWorkItemTagLimit(limit int) WorkItemWorkItemTagSelectConfigOption
- func WithWorkItemWorkItemTagOrderBy(rows map[string]*Direction) WorkItemWorkItemTagSelectConfigOption
- type WorkItemWorkItemTagUpdateParams
- type XoError
Constants ¶
const ( Api_keyScopes = "api_key.Scopes" Bearer_authScopes = "bearer_auth.Scopes" )
const GetExtraSchemaNotifications = `` /* 196-byte string literal not displayed */
const GetUser = `` /* 356-byte string literal not displayed */
const GetUserNotifications = `` /* 646-byte string literal not displayed */
const IsTeamInProject = `` /* 198-byte string literal not displayed */
Variables ¶
var CacheEntityFields = map[CacheTableEntity]map[string]DbField{}
var EntityFields = map[TableEntity]map[string]DbField{ TableEntityActivity: { "activityID": DbField{Type: ColumnSimpleTypeInteger, Db: "activity_id", Nullable: false, Public: true}, "deletedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "deleted_at", Nullable: true, Public: true}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "isProductive": DbField{Type: ColumnSimpleTypeBoolean, Db: "is_productive", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "projectID": DbField{Type: ColumnSimpleTypeInteger, Db: "project_id", Nullable: false, Public: true}, }, TableEntityCacheDemoTwoWorkItem: { "closedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "closed_at", Nullable: true, Public: true}, "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "customDateForProject2": DbField{Type: ColumnSimpleTypeDateTime, Db: "custom_date_for_project_2", Nullable: true, Public: true}, "deletedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "deleted_at", Nullable: true, Public: true}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "kanbanStepID": DbField{Type: ColumnSimpleTypeInteger, Db: "kanban_step_id", Nullable: false, Public: true}, "metadata": DbField{Type: ColumnSimpleTypeObject, Db: "metadata", Nullable: false, Public: true}, "targetDate": DbField{Type: ColumnSimpleTypeDateTime, Db: "target_date", Nullable: false, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: false, Public: true}, "updatedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "updated_at", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, "workItemTypeID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_type_id", Nullable: false, Public: true}, }, TableEntityCacheDemoWorkItem: { "closedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "closed_at", 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}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "kanbanStepID": DbField{Type: ColumnSimpleTypeInteger, Db: "kanban_step_id", Nullable: false, Public: true}, "lastMessageAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "last_message_at", Nullable: false, Public: true}, "line": DbField{Type: ColumnSimpleTypeString, Db: "line", Nullable: false, Public: true}, "metadata": DbField{Type: ColumnSimpleTypeObject, Db: "metadata", Nullable: false, Public: true}, "ref": DbField{Type: ColumnSimpleTypeString, Db: "ref", Nullable: false, Public: true}, "reopened": DbField{Type: ColumnSimpleTypeBoolean, Db: "reopened", Nullable: false, Public: true}, "targetDate": DbField{Type: ColumnSimpleTypeDateTime, Db: "target_date", Nullable: false, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: false, Public: true}, "updatedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "updated_at", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, "workItemTypeID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_type_id", Nullable: false, Public: true}, }, TableEntityDemoTwoWorkItem: { "customDateForProject2": DbField{Type: ColumnSimpleTypeDateTime, Db: "custom_date_for_project_2", Nullable: true, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, TableEntityDemoWorkItem: { "lastMessageAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "last_message_at", Nullable: false, Public: true}, "line": DbField{Type: ColumnSimpleTypeString, Db: "line", Nullable: false, Public: true}, "ref": DbField{Type: ColumnSimpleTypeString, Db: "ref", Nullable: false, Public: true}, "reopened": DbField{Type: ColumnSimpleTypeBoolean, Db: "reopened", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, TableEntityEntityNotification: { "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "entityNotificationID": DbField{Type: ColumnSimpleTypeInteger, Db: "entity_notification_id", Nullable: false, Public: true}, "id": DbField{Type: ColumnSimpleTypeString, Db: "id", Nullable: false, Public: true}, "message": DbField{Type: ColumnSimpleTypeString, Db: "message", Nullable: false, Public: true}, "topic": DbField{Type: ColumnSimpleTypeString, Db: "topic", Nullable: false, Public: true}, }, TableEntityKanbanStep: { "color": DbField{Type: ColumnSimpleTypeString, Db: "color", Nullable: false, Public: true}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "kanbanStepID": DbField{Type: ColumnSimpleTypeInteger, Db: "kanban_step_id", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "projectID": DbField{Type: ColumnSimpleTypeInteger, Db: "project_id", Nullable: false, Public: true}, "stepOrder": DbField{Type: ColumnSimpleTypeInteger, Db: "step_order", Nullable: false, Public: true}, "timeTrackable": DbField{Type: ColumnSimpleTypeBoolean, Db: "time_trackable", Nullable: false, Public: true}, }, TableEntityMovie: { "movieID": DbField{Type: ColumnSimpleTypeInteger, Db: "movie_id", Nullable: false, Public: true}, "synopsis": DbField{Type: ColumnSimpleTypeString, Db: "synopsis", Nullable: false, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: false, Public: true}, "year": DbField{Type: ColumnSimpleTypeInteger, Db: "year", Nullable: false, Public: true}, }, TableEntityNotification: { "body": DbField{Type: ColumnSimpleTypeString, Db: "body", Nullable: false, Public: true}, "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "labels": DbField{Type: ColumnSimpleTypeArray, Db: "labels", Nullable: false, Public: true}, "link": DbField{Type: ColumnSimpleTypeString, Db: "link", Nullable: true, Public: true}, "notificationID": DbField{Type: ColumnSimpleTypeInteger, Db: "notification_id", Nullable: false, Public: true}, "receiver": DbField{Type: ColumnSimpleTypeString, Db: "receiver", Nullable: true, Public: true}, "receiverRank": DbField{Type: ColumnSimpleTypeInteger, Db: "receiver_rank", Nullable: true, Public: true}, "sender": DbField{Type: ColumnSimpleTypeString, Db: "sender", Nullable: false, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: false, Public: true}, }, TableEntityProject: { "boardConfig": DbField{Type: ColumnSimpleTypeObject, Db: "board_config", Nullable: false, Public: true}, "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "projectID": DbField{Type: ColumnSimpleTypeInteger, Db: "project_id", Nullable: false, Public: true}, "updatedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "updated_at", Nullable: false, Public: true}, "workItemsTableName": DbField{Type: ColumnSimpleTypeString, Db: "work_items_table_name", Nullable: false, Public: true}, }, TableEntityTeam: { "createdAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "created_at", Nullable: false, Public: true}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "projectID": DbField{Type: ColumnSimpleTypeInteger, Db: "project_id", Nullable: false, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, "updatedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "updated_at", Nullable: false, Public: true}, }, TableEntityTimeEntry: { "activityID": DbField{Type: ColumnSimpleTypeInteger, Db: "activity_id", Nullable: false, Public: true}, "comment": DbField{Type: ColumnSimpleTypeString, Db: "comment", Nullable: false, Public: true}, "durationMinutes": DbField{Type: ColumnSimpleTypeInteger, Db: "duration_minutes", Nullable: true, Public: true}, "start": DbField{Type: ColumnSimpleTypeDateTime, Db: "start", Nullable: false, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: true, Public: true}, "timeEntryID": DbField{Type: ColumnSimpleTypeInteger, Db: "time_entry_id", Nullable: false, Public: true}, "userID": DbField{Type: ColumnSimpleTypeString, Db: "user_id", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: true, Public: true}, }, TableEntityUser: { "age": DbField{Type: ColumnSimpleTypeInteger, Db: "age", Nullable: true, Public: true}, "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}, "email": DbField{Type: ColumnSimpleTypeString, Db: "email", Nullable: false, Public: true}, "externalID": DbField{Type: ColumnSimpleTypeString, Db: "external_id", Nullable: false, Public: true}, "firstName": DbField{Type: ColumnSimpleTypeString, Db: "first_name", Nullable: true, Public: true}, "fullName": DbField{Type: ColumnSimpleTypeString, Db: "full_name", Nullable: true, Public: true}, "hasGlobalNotifications": DbField{Type: ColumnSimpleTypeBoolean, Db: "has_global_notifications", Nullable: false, Public: true}, "hasPersonalNotifications": DbField{Type: ColumnSimpleTypeBoolean, Db: "has_personal_notifications", Nullable: false, Public: true}, "lastName": DbField{Type: ColumnSimpleTypeString, Db: "last_name", Nullable: true, Public: true}, "roleRank": DbField{Type: ColumnSimpleTypeInteger, Db: "role_rank", Nullable: false, Public: true}, "scopes": DbField{Type: ColumnSimpleTypeArray, Db: "scopes", 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}, "username": DbField{Type: ColumnSimpleTypeString, Db: "username", Nullable: false, Public: true}, }, TableEntityUserAPIKey: { "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}, }, TableEntityUserNotification: { "notificationID": DbField{Type: ColumnSimpleTypeInteger, Db: "notification_id", Nullable: false, Public: true}, "read": DbField{Type: ColumnSimpleTypeBoolean, Db: "read", Nullable: false, Public: true}, "userID": DbField{Type: ColumnSimpleTypeString, Db: "user_id", Nullable: false, Public: true}, "userNotificationID": DbField{Type: ColumnSimpleTypeInteger, Db: "user_notification_id", Nullable: false, Public: true}, }, TableEntityUserProject: { "member": DbField{Type: ColumnSimpleTypeString, Db: "member", Nullable: false, Public: true}, "projectID": DbField{Type: ColumnSimpleTypeInteger, Db: "project_id", Nullable: false, Public: true}, }, TableEntityUserTeam: { "member": DbField{Type: ColumnSimpleTypeString, Db: "member", Nullable: false, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, }, TableEntityWorkItem: { "closedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "closed_at", 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}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "kanbanStepID": DbField{Type: ColumnSimpleTypeInteger, Db: "kanban_step_id", Nullable: false, Public: true}, "metadata": DbField{Type: ColumnSimpleTypeObject, Db: "metadata", Nullable: false, Public: true}, "targetDate": DbField{Type: ColumnSimpleTypeDateTime, Db: "target_date", Nullable: false, Public: true}, "teamID": DbField{Type: ColumnSimpleTypeInteger, Db: "team_id", Nullable: false, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: false, Public: true}, "updatedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "updated_at", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, "workItemTypeID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_type_id", Nullable: false, Public: true}, }, TableEntityWorkItemAssignee: { "assignee": DbField{Type: ColumnSimpleTypeString, Db: "assignee", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, TableEntityWorkItemComment: { "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}, }, TableEntityWorkItemTag: { "color": DbField{Type: ColumnSimpleTypeString, Db: "color", Nullable: false, Public: true}, "deletedAt": DbField{Type: ColumnSimpleTypeDateTime, Db: "deleted_at", Nullable: true, Public: true}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "projectID": DbField{Type: ColumnSimpleTypeInteger, Db: "project_id", Nullable: false, Public: true}, "workItemTagID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_tag_id", Nullable: false, Public: true}, }, TableEntityWorkItemType: { "color": DbField{Type: ColumnSimpleTypeString, Db: "color", Nullable: false, Public: true}, "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, "projectID": DbField{Type: ColumnSimpleTypeInteger, Db: "project_id", Nullable: false, Public: true}, "workItemTypeID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_type_id", Nullable: false, Public: true}, }, TableEntityWorkItemWorkItemTag: { "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, "workItemTagID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_tag_id", Nullable: false, Public: true}, }, }
var ExtraSchemaEntityFields = map[ExtraSchemaTableEntity]map[string]DbField{ ExtraSchemaTableEntityExtraSchemaBook: { "bookID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_id", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: false, Public: true}, }, ExtraSchemaTableEntityExtraSchemaBookAuthor: { "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}, }, ExtraSchemaTableEntityExtraSchemaBookAuthorsSurrogateKey: { "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}, }, ExtraSchemaTableEntityExtraSchemaBookReview: { "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}, }, ExtraSchemaTableEntityExtraSchemaBookSeller: { "bookID": DbField{Type: ColumnSimpleTypeInteger, Db: "book_id", Nullable: false, Public: true}, "seller": DbField{Type: ColumnSimpleTypeString, Db: "seller", Nullable: false, Public: true}, }, ExtraSchemaTableEntityExtraSchemaDemoWorkItem: { "checked": DbField{Type: ColumnSimpleTypeBoolean, Db: "checked", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, ExtraSchemaTableEntityExtraSchemaDummyJoin: { "dummyJoinID": DbField{Type: ColumnSimpleTypeInteger, Db: "dummy_join_id", Nullable: false, Public: true}, "name": DbField{Type: ColumnSimpleTypeString, Db: "name", Nullable: true, Public: true}, }, ExtraSchemaTableEntityExtraSchemaNotification: { "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}, }, ExtraSchemaTableEntityExtraSchemaPagElement: { "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}, }, ExtraSchemaTableEntityExtraSchemaUser: { "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}, }, ExtraSchemaTableEntityExtraSchemaUserAPIKey: { "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}, }, ExtraSchemaTableEntityExtraSchemaWorkItem: { "description": DbField{Type: ColumnSimpleTypeString, Db: "description", Nullable: true, Public: true}, "title": DbField{Type: ColumnSimpleTypeString, Db: "title", Nullable: true, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, ExtraSchemaTableEntityExtraSchemaWorkItemAdmin: { "admin": DbField{Type: ColumnSimpleTypeString, Db: "admin", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, ExtraSchemaTableEntityExtraSchemaWorkItemAssignee: { "assignee": DbField{Type: ColumnSimpleTypeString, Db: "assignee", Nullable: false, Public: true}, "workItemID": DbField{Type: ColumnSimpleTypeInteger, Db: "work_item_id", Nullable: false, Public: true}, }, }
Functions ¶
func CreateOrUpdateIndex ¶
func CreateOrUpdateIndex(ctx context.Context, db DB, idxName string, projectName string, idxDef string) error
CreateOrUpdateIndex calls the stored function 'public.create_or_update_index(text, text, text)' on db.
func CreateOrUpdateWorkItemCacheTable ¶
CreateOrUpdateWorkItemCacheTable calls the stored function 'public.create_or_update_work_item_cache_table(text)' on db.
func Errorf ¶
func Errorf(s string, v ...interface{})
Errorf logs an error message using the package error logger.
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func JsonbSetDeep ¶
func JsonbSetDeep(ctx context.Context, db DB, target map[string]any, path []string, val map[string]any) (map[string]any, error)
JsonbSetDeep calls the stored function 'public.jsonb_set_deep(jsonb, text, jsonb) jsonb' on db.
func NormalizeIndexDef ¶
NormalizeIndexDef calls the stored function 'public.normalize_index_def(text) text' on db.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func ProjectExists ¶
ProjectExists calls the stored function 'public.project_exists(text) boolean' on db.
func RowEstimator ¶
RowEstimator calls the stored function 'public.row_estimator(text) bigint' on db.
func SameIndexDefinition ¶
func SameIndexDefinition(ctx context.Context, db DB, indexName string, newIndexDef string) (bool, error)
SameIndexDefinition calls the stored function 'public.same_index_definition(text, text) boolean' on db.
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 Activity ¶
type Activity struct { ActivityID ActivityID `json:"activityID" db:"activity_id" required:"true" nullable:"false"` // activity_id ProjectID ProjectID `json:"projectID" db:"project_id" required:"true" nullable:"false"` // project_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name Description string `json:"description" db:"description" required:"true" nullable:"false"` // description IsProductive bool `json:"isProductive" db:"is_productive" required:"true" nullable:"false"` // is_productive DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` // deleted_at ProjectJoin *Project `json:"-" db:"project_project_id"` // O2O projects (generated from M2O) TimeEntriesJoin *[]TimeEntry `json:"-" db:"time_entries"` // M2O activities }
Activity represents a row from 'public.activities'.
func ActivitiesByName ¶
func ActivitiesByName(ctx context.Context, db DB, name string, opts ...ActivitySelectConfigOption) ([]Activity, error)
ActivitiesByName retrieves a row from 'public.activities' as a Activity.
Generated from index 'activities_name_project_id_key'.
func ActivitiesByProjectID ¶
func ActivitiesByProjectID(ctx context.Context, db DB, projectID ProjectID, opts ...ActivitySelectConfigOption) ([]Activity, error)
ActivitiesByProjectID retrieves a row from 'public.activities' as a Activity.
Generated from index 'activities_name_project_id_key'.
func ActivityByActivityID ¶
func ActivityByActivityID(ctx context.Context, db DB, activityID ActivityID, opts ...ActivitySelectConfigOption) (*Activity, error)
ActivityByActivityID retrieves a row from 'public.activities' as a Activity.
Generated from index 'activities_pkey'.
func ActivityByNameProjectID ¶
func ActivityByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, opts ...ActivitySelectConfigOption) (*Activity, error)
ActivityByNameProjectID retrieves a row from 'public.activities' as a Activity.
Generated from index 'activities_name_project_id_key'.
func ActivityPaginated ¶
func ActivityPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ActivitySelectConfigOption) ([]Activity, error)
ActivityPaginated returns a cursor-paginated list of Activity. At least one cursor is required.
func CreateActivity ¶
CreateActivity creates a new Activity in the database with the given params.
func (*Activity) FKProject_ProjectID ¶
FKProject_ProjectID returns the Project associated with the Activity's (ProjectID).
Generated from foreign key 'activities_project_id_fkey'.
func (*Activity) SetUpdateParams ¶
func (a *Activity) SetUpdateParams(params *ActivityUpdateParams)
SetUpdateParams updates public.activities struct fields with the specified params.
func (*Activity) SoftDelete ¶
SoftDelete soft deletes the Activity from the database via 'deleted_at'.
type ActivityCreateParams ¶
type ActivityCreateParams struct { Description string `json:"description" required:"true" nullable:"false"` // description IsProductive bool `json:"isProductive" required:"true" nullable:"false"` // is_productive Name string `json:"name" required:"true" nullable:"false"` // name ProjectID ProjectID `json:"-"` // project_id }
ActivityCreateParams represents insert params for 'public.activities'.
func (ActivityCreateParams) GetDescription ¶
func (p ActivityCreateParams) GetDescription() *string
func (ActivityCreateParams) GetIsProductive ¶
func (p ActivityCreateParams) GetIsProductive() *bool
func (ActivityCreateParams) GetName ¶
func (p ActivityCreateParams) GetName() *string
func (ActivityCreateParams) GetProjectID ¶
func (p ActivityCreateParams) GetProjectID() *ProjectID
type ActivityID ¶
type ActivityID int
type ActivityJoins ¶
type ActivityParams ¶
type ActivityParams interface { GetDescription() *string GetIsProductive() *bool GetName() *string GetProjectID() *ProjectID }
ActivityParams represents common params for both insert and update of 'public.activities'.
type ActivityResponse ¶
type ActivityResponse struct { ActivityID ActivityID `json:"activityID"` DeletedAt *time.Time `json:"deletedAt"` Description string `json:"description"` IsProductive bool `json:"isProductive"` Name string `json:"name"` ProjectID ProjectID `json:"projectID"` }
ActivityResponse defines the model for ActivityResponse.
type ActivitySelectConfig ¶
type ActivitySelectConfig struct {
// contains filtered or unexported fields
}
type ActivitySelectConfigOption ¶
type ActivitySelectConfigOption func(*ActivitySelectConfig)
func WithActivityFilters ¶
func WithActivityFilters(filters map[string][]any) ActivitySelectConfigOption
WithActivityFilters 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 WithActivityHavingClause ¶
func WithActivityHavingClause(conditions map[string][]any) ActivitySelectConfigOption
WithActivityHavingClause 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 WithActivityJoin ¶
func WithActivityJoin(joins ActivityJoins) ActivitySelectConfigOption
WithActivityJoin joins with the given tables.
func WithActivityLimit ¶
func WithActivityLimit(limit int) ActivitySelectConfigOption
WithActivityLimit limits row selection.
func WithActivityOrderBy ¶
func WithActivityOrderBy(rows map[string]*Direction) ActivitySelectConfigOption
WithActivityOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
func WithDeletedActivityOnly ¶
func WithDeletedActivityOnly() ActivitySelectConfigOption
WithDeletedActivityOnly limits result to records marked as deleted.
type ActivityUpdateParams ¶
type ActivityUpdateParams struct { Description *string `json:"description" nullable:"false"` // description IsProductive *bool `json:"isProductive" nullable:"false"` // is_productive Name *string `json:"name" nullable:"false"` // name ProjectID *ProjectID `json:"-"` // project_id }
ActivityUpdateParams represents update params for 'public.activities'.
func (ActivityUpdateParams) GetDescription ¶
func (p ActivityUpdateParams) GetDescription() *string
func (ActivityUpdateParams) GetIsProductive ¶
func (p ActivityUpdateParams) GetIsProductive() *bool
func (ActivityUpdateParams) GetName ¶
func (p ActivityUpdateParams) GetName() *string
func (ActivityUpdateParams) GetProjectID ¶
func (p ActivityUpdateParams) GetProjectID() *ProjectID
type CacheDemoTwoWorkItem ¶
type CacheDemoTwoWorkItem struct { CustomDateForProject2 *time.Time `json:"customDateForProject2" db:"custom_date_for_project_2"` // custom_date_for_project_2 WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Title string `json:"title" db:"title" required:"true" nullable:"false"` // title Description string `json:"description" db:"description" required:"true" nullable:"false"` // description WorkItemTypeID WorkItemTypeID `json:"workItemTypeID" db:"work_item_type_id" required:"true" nullable:"false"` // work_item_type_id Metadata map[string]any `json:"metadata" db:"metadata" required:"true" nullable:"false"` // metadata TeamID TeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id KanbanStepID KanbanStepID `json:"kanbanStepID" db:"kanban_step_id" required:"true" nullable:"false"` // kanban_step_id ClosedAt *time.Time `json:"closedAt" db:"closed_at"` // closed_at TargetDate time.Time `json:"targetDate" db:"target_date" required:"true" nullable:"false"` // target_date 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 DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` // deleted_at KanbanStepJoin *KanbanStep `json:"-" db:"kanban_step_kanban_step_id"` // O2O kanban_steps (inferred) TeamJoin *Team `json:"-" db:"team_team_id"` // O2O teams (inferred) WorkItemTypeJoin *WorkItemType `json:"-" db:"work_item_type_work_item_type_id"` // O2O work_item_types (inferred) TimeEntriesJoin *[]TimeEntry `json:"-" db:"time_entries"` // M2O cache__demo_two_work_items AssigneesJoin *[]CacheDemoTwoWorkItemM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee WorkItemCommentsJoin *[]WorkItemComment `json:"-" db:"work_item_comments"` // M2O cache__demo_two_work_items WorkItemTagsJoin *[]WorkItemTag `json:"-" db:"work_item_work_item_tag_work_item_tags"` // M2M work_item_work_item_tag }
CacheDemoTwoWorkItem represents a row from 'public.cache__demo_two_work_items'.
func CacheDemoTwoWorkItemByWorkItemID ¶
func CacheDemoTwoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID int, opts ...CacheDemoTwoWorkItemSelectConfigOption) (*CacheDemoTwoWorkItem, error)
CacheDemoTwoWorkItemByWorkItemID retrieves a row from 'public.cache__demo_two_work_items' as a CacheDemoTwoWorkItem.
Generated from index 'cache__demo_two_work_items_pkey'.
func CacheDemoTwoWorkItemPaginated ¶
func CacheDemoTwoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...CacheDemoTwoWorkItemSelectConfigOption) ([]CacheDemoTwoWorkItem, error)
CacheDemoTwoWorkItemPaginated returns a cursor-paginated list of CacheDemoTwoWorkItem. At least one cursor is required.
func CacheDemoTwoWorkItems ¶
func CacheDemoTwoWorkItems(ctx context.Context, db DB, opts ...CacheDemoTwoWorkItemSelectConfigOption) ([]CacheDemoTwoWorkItem, error)
CacheDemoTwoWorkItems retrieves a row from 'public.cache__demo_two_work_items' as a CacheDemoTwoWorkItem.
Generated from index '[xo] base filter query'.
func CreateCacheDemoTwoWorkItem ¶
func CreateCacheDemoTwoWorkItem(ctx context.Context, db DB, params *CacheDemoTwoWorkItemCreateParams) (*CacheDemoTwoWorkItem, error)
CreateCacheDemoTwoWorkItem creates a new CacheDemoTwoWorkItem in the database with the given params.
func (*CacheDemoTwoWorkItem) Delete ¶
func (cdtwi *CacheDemoTwoWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the CacheDemoTwoWorkItem from the database.
func (*CacheDemoTwoWorkItem) FKKanbanStep_KanbanStepID ¶
func (cdtwi *CacheDemoTwoWorkItem) FKKanbanStep_KanbanStepID(ctx context.Context, db DB) (*KanbanStep, error)
FKKanbanStep_KanbanStepID returns the KanbanStep associated with the CacheDemoTwoWorkItem's (KanbanStepID).
Generated from foreign key 'cache__demo_two_work_items_kanban_step_id_fkey'.
func (*CacheDemoTwoWorkItem) FKTeam_TeamID ¶
FKTeam_TeamID returns the Team associated with the CacheDemoTwoWorkItem's (TeamID).
Generated from foreign key 'cache__demo_two_work_items_team_id_fkey'.
func (*CacheDemoTwoWorkItem) FKWorkItemType_WorkItemTypeID ¶
func (cdtwi *CacheDemoTwoWorkItem) FKWorkItemType_WorkItemTypeID(ctx context.Context, db DB) (*WorkItemType, error)
FKWorkItemType_WorkItemTypeID returns the WorkItemType associated with the CacheDemoTwoWorkItem's (WorkItemTypeID).
Generated from foreign key 'cache__demo_two_work_items_work_item_type_id_fkey'.
func (*CacheDemoTwoWorkItem) FKWorkItem_WorkItemID ¶
func (cdtwi *CacheDemoTwoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the CacheDemoTwoWorkItem's (WorkItemID).
Generated from foreign key 'cache__demo_two_work_items_work_item_id_fkey'.
func (*CacheDemoTwoWorkItem) Insert ¶
func (cdtwi *CacheDemoTwoWorkItem) Insert(ctx context.Context, db DB) (*CacheDemoTwoWorkItem, error)
Insert inserts the CacheDemoTwoWorkItem to the database.
func (*CacheDemoTwoWorkItem) Restore ¶
func (cdtwi *CacheDemoTwoWorkItem) Restore(ctx context.Context, db DB) (*CacheDemoTwoWorkItem, error)
Restore restores a soft deleted CacheDemoTwoWorkItem from the database.
func (*CacheDemoTwoWorkItem) SetUpdateParams ¶
func (cdtwi *CacheDemoTwoWorkItem) SetUpdateParams(params *CacheDemoTwoWorkItemUpdateParams)
SetUpdateParams updates public.cache__demo_two_work_items struct fields with the specified params.
func (*CacheDemoTwoWorkItem) SoftDelete ¶
func (cdtwi *CacheDemoTwoWorkItem) SoftDelete(ctx context.Context, db DB) error
SoftDelete soft deletes the CacheDemoTwoWorkItem from the database via 'deleted_at'.
func (*CacheDemoTwoWorkItem) Update ¶
func (cdtwi *CacheDemoTwoWorkItem) Update(ctx context.Context, db DB) (*CacheDemoTwoWorkItem, error)
Update updates a CacheDemoTwoWorkItem in the database.
func (*CacheDemoTwoWorkItem) Upsert ¶
func (cdtwi *CacheDemoTwoWorkItem) Upsert(ctx context.Context, db DB, params *CacheDemoTwoWorkItemCreateParams) (*CacheDemoTwoWorkItem, error)
Upsert upserts a CacheDemoTwoWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type CacheDemoTwoWorkItemCreateParams ¶
type CacheDemoTwoWorkItemCreateParams struct { ClosedAt *time.Time `json:"closedAt"` // closed_at CustomDateForProject2 *time.Time `json:"customDateForProject2"` // custom_date_for_project_2 Description string `json:"description" required:"true" nullable:"false"` // description KanbanStepID KanbanStepID `json:"kanbanStepID" required:"true" nullable:"false"` // kanban_step_id Metadata map[string]any `json:"metadata" required:"true" nullable:"false"` // metadata TargetDate time.Time `json:"targetDate" required:"true" nullable:"false"` // target_date TeamID TeamID `json:"teamID" required:"true" nullable:"false"` // team_id Title string `json:"title" required:"true" nullable:"false"` // title WorkItemID WorkItemID `json:"-" required:"true" nullable:"false"` // work_item_id WorkItemTypeID WorkItemTypeID `json:"workItemTypeID" required:"true" nullable:"false"` // work_item_type_id }
CacheDemoTwoWorkItemCreateParams represents insert params for 'public.cache__demo_two_work_items'.
func (CacheDemoTwoWorkItemCreateParams) GetClosedAt ¶
func (p CacheDemoTwoWorkItemCreateParams) GetClosedAt() *time.Time
func (CacheDemoTwoWorkItemCreateParams) GetCustomDateForProject2 ¶
func (p CacheDemoTwoWorkItemCreateParams) GetCustomDateForProject2() *time.Time
func (CacheDemoTwoWorkItemCreateParams) GetDescription ¶
func (p CacheDemoTwoWorkItemCreateParams) GetDescription() *string
func (CacheDemoTwoWorkItemCreateParams) GetKanbanStepID ¶
func (p CacheDemoTwoWorkItemCreateParams) GetKanbanStepID() *KanbanStepID
func (CacheDemoTwoWorkItemCreateParams) GetMetadata ¶
func (p CacheDemoTwoWorkItemCreateParams) GetMetadata() *map[string]any
func (CacheDemoTwoWorkItemCreateParams) GetTargetDate ¶
func (p CacheDemoTwoWorkItemCreateParams) GetTargetDate() *time.Time
func (CacheDemoTwoWorkItemCreateParams) GetTeamID ¶
func (p CacheDemoTwoWorkItemCreateParams) GetTeamID() *TeamID
func (CacheDemoTwoWorkItemCreateParams) GetTitle ¶
func (p CacheDemoTwoWorkItemCreateParams) GetTitle() *string
func (CacheDemoTwoWorkItemCreateParams) GetWorkItemTypeID ¶
func (p CacheDemoTwoWorkItemCreateParams) GetWorkItemTypeID() *WorkItemTypeID
type CacheDemoTwoWorkItemJoins ¶
type CacheDemoTwoWorkItemJoins struct { KanbanStep bool `json:"kanbanStep" required:"true" nullable:"false"` // O2O kanban_steps Team bool `json:"team" required:"true" nullable:"false"` // O2O teams WorkItemType bool `json:"workItemType" required:"true" nullable:"false"` // O2O work_item_types 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 WorkItemTags bool `json:"workItemTags" required:"true" nullable:"false"` // M2M work_item_work_item_tag }
type CacheDemoTwoWorkItemM2MAssigneeWIA ¶
type CacheDemoTwoWorkItemM2MAssigneeWIA struct { User User `json:"user" db:"users" required:"true"` Role WorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
CacheDemoTwoWorkItemM2MAssigneeWIA represents a M2M join against "public.work_item_assignee"
type CacheDemoTwoWorkItemParams ¶
type CacheDemoTwoWorkItemParams interface { GetClosedAt() *time.Time GetCustomDateForProject2() *time.Time GetDescription() *string GetKanbanStepID() *KanbanStepID GetMetadata() *map[string]any GetTargetDate() *time.Time GetTeamID() *TeamID GetTitle() *string GetWorkItemTypeID() *WorkItemTypeID }
CacheDemoTwoWorkItemParams represents common params for both insert and update of 'public.cache__demo_two_work_items'.
type CacheDemoTwoWorkItemSelectConfig ¶
type CacheDemoTwoWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type CacheDemoTwoWorkItemSelectConfigOption ¶
type CacheDemoTwoWorkItemSelectConfigOption func(*CacheDemoTwoWorkItemSelectConfig)
func WithCacheDemoTwoWorkItemFilters ¶
func WithCacheDemoTwoWorkItemFilters(filters map[string][]any) CacheDemoTwoWorkItemSelectConfigOption
WithCacheDemoTwoWorkItemFilters 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 WithCacheDemoTwoWorkItemHavingClause ¶
func WithCacheDemoTwoWorkItemHavingClause(conditions map[string][]any) CacheDemoTwoWorkItemSelectConfigOption
WithCacheDemoTwoWorkItemHavingClause 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 WithCacheDemoTwoWorkItemJoin ¶
func WithCacheDemoTwoWorkItemJoin(joins CacheDemoTwoWorkItemJoins) CacheDemoTwoWorkItemSelectConfigOption
WithCacheDemoTwoWorkItemJoin joins with the given tables.
func WithCacheDemoTwoWorkItemLimit ¶
func WithCacheDemoTwoWorkItemLimit(limit int) CacheDemoTwoWorkItemSelectConfigOption
WithCacheDemoTwoWorkItemLimit limits row selection.
func WithCacheDemoTwoWorkItemOrderBy ¶
func WithCacheDemoTwoWorkItemOrderBy(rows map[string]*Direction) CacheDemoTwoWorkItemSelectConfigOption
WithCacheDemoTwoWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
func WithDeletedCacheDemoTwoWorkItemOnly ¶
func WithDeletedCacheDemoTwoWorkItemOnly() CacheDemoTwoWorkItemSelectConfigOption
WithDeletedCacheDemoTwoWorkItemOnly limits result to records marked as deleted.
type CacheDemoTwoWorkItemUpdateParams ¶
type CacheDemoTwoWorkItemUpdateParams struct { ClosedAt **time.Time `json:"closedAt"` // closed_at CustomDateForProject2 **time.Time `json:"customDateForProject2"` // custom_date_for_project_2 Description *string `json:"description" nullable:"false"` // description KanbanStepID *KanbanStepID `json:"kanbanStepID" nullable:"false"` // kanban_step_id Metadata *map[string]any `json:"metadata" nullable:"false"` // metadata TargetDate *time.Time `json:"targetDate" nullable:"false"` // target_date TeamID *TeamID `json:"teamID" nullable:"false"` // team_id Title *string `json:"title" nullable:"false"` // title WorkItemTypeID *WorkItemTypeID `json:"workItemTypeID" nullable:"false"` // work_item_type_id }
CacheDemoTwoWorkItemUpdateParams represents update params for 'public.cache__demo_two_work_items'.
func (CacheDemoTwoWorkItemUpdateParams) GetClosedAt ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetClosedAt() *time.Time
func (CacheDemoTwoWorkItemUpdateParams) GetCustomDateForProject2 ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetCustomDateForProject2() *time.Time
func (CacheDemoTwoWorkItemUpdateParams) GetDescription ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetDescription() *string
func (CacheDemoTwoWorkItemUpdateParams) GetKanbanStepID ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetKanbanStepID() *KanbanStepID
func (CacheDemoTwoWorkItemUpdateParams) GetMetadata ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetMetadata() *map[string]any
func (CacheDemoTwoWorkItemUpdateParams) GetTargetDate ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetTargetDate() *time.Time
func (CacheDemoTwoWorkItemUpdateParams) GetTeamID ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetTeamID() *TeamID
func (CacheDemoTwoWorkItemUpdateParams) GetTitle ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetTitle() *string
func (CacheDemoTwoWorkItemUpdateParams) GetWorkItemTypeID ¶
func (p CacheDemoTwoWorkItemUpdateParams) GetWorkItemTypeID() *WorkItemTypeID
type CacheDemoWorkItem ¶
type CacheDemoWorkItem struct { Ref string `json:"ref" db:"ref" required:"true" nullable:"false" pattern:"^[0-9]{8}$"` // ref Line string `json:"line" db:"line" required:"true" nullable:"false"` // line LastMessageAt time.Time `json:"lastMessageAt" db:"last_message_at" required:"true" nullable:"false"` // last_message_at Reopened bool `json:"reopened" db:"reopened" required:"true" nullable:"false"` // reopened WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Title string `json:"title" db:"title" required:"true" nullable:"false"` // title Description string `json:"description" db:"description" required:"true" nullable:"false"` // description WorkItemTypeID WorkItemTypeID `json:"workItemTypeID" db:"work_item_type_id" required:"true" nullable:"false"` // work_item_type_id Metadata map[string]any `json:"metadata" db:"metadata" required:"true" nullable:"false"` // metadata TeamID TeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id KanbanStepID KanbanStepID `json:"kanbanStepID" db:"kanban_step_id" required:"true" nullable:"false"` // kanban_step_id ClosedAt *time.Time `json:"closedAt" db:"closed_at"` // closed_at TargetDate time.Time `json:"targetDate" db:"target_date" required:"true" nullable:"false"` // target_date 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 DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` // deleted_at KanbanStepJoin *KanbanStep `json:"-" db:"kanban_step_kanban_step_id"` // O2O kanban_steps (inferred) TeamJoin *Team `json:"-" db:"team_team_id"` // O2O teams (inferred) WorkItemTypeJoin *WorkItemType `json:"-" db:"work_item_type_work_item_type_id"` // O2O work_item_types (inferred) TimeEntriesJoin *[]TimeEntry `json:"-" db:"time_entries"` // M2O cache__demo_work_items AssigneesJoin *[]CacheDemoWorkItemM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee WorkItemCommentsJoin *[]WorkItemComment `json:"-" db:"work_item_comments"` // M2O cache__demo_work_items WorkItemTagsJoin *[]WorkItemTag `json:"-" db:"work_item_work_item_tag_work_item_tags"` // M2M work_item_work_item_tag }
CacheDemoWorkItem represents a row from 'public.cache__demo_work_items'.
func CacheDemoWorkItemByWorkItemID ¶
func CacheDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID int, opts ...CacheDemoWorkItemSelectConfigOption) (*CacheDemoWorkItem, error)
CacheDemoWorkItemByWorkItemID retrieves a row from 'public.cache__demo_work_items' as a CacheDemoWorkItem.
Generated from index 'cache__demo_work_items_pkey'.
func CacheDemoWorkItemPaginated ¶
func CacheDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...CacheDemoWorkItemSelectConfigOption) ([]CacheDemoWorkItem, error)
CacheDemoWorkItemPaginated returns a cursor-paginated list of CacheDemoWorkItem. At least one cursor is required.
func CacheDemoWorkItemsByLastMessageAt ¶
func CacheDemoWorkItemsByLastMessageAt(ctx context.Context, db DB, lastMessageAt time.Time, opts ...CacheDemoWorkItemSelectConfigOption) ([]CacheDemoWorkItem, error)
CacheDemoWorkItemsByLastMessageAt retrieves a row from 'public.cache__demo_work_items' as a CacheDemoWorkItem.
Generated from index 'public.cache__demo_work_items_last_message_at_index'.
func CacheDemoWorkItemsByReopened ¶
func CacheDemoWorkItemsByReopened(ctx context.Context, db DB, reopened bool, opts ...CacheDemoWorkItemSelectConfigOption) ([]CacheDemoWorkItem, error)
CacheDemoWorkItemsByReopened retrieves a row from 'public.cache__demo_work_items' as a CacheDemoWorkItem.
Generated from index 'public.cache__demo_work_items_gin_index'.
func CreateCacheDemoWorkItem ¶
func CreateCacheDemoWorkItem(ctx context.Context, db DB, params *CacheDemoWorkItemCreateParams) (*CacheDemoWorkItem, error)
CreateCacheDemoWorkItem creates a new CacheDemoWorkItem in the database with the given params.
func (*CacheDemoWorkItem) Delete ¶
func (cdwi *CacheDemoWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the CacheDemoWorkItem from the database.
func (*CacheDemoWorkItem) FKKanbanStep_KanbanStepID ¶
func (cdwi *CacheDemoWorkItem) FKKanbanStep_KanbanStepID(ctx context.Context, db DB) (*KanbanStep, error)
FKKanbanStep_KanbanStepID returns the KanbanStep associated with the CacheDemoWorkItem's (KanbanStepID).
Generated from foreign key 'cache__demo_work_items_kanban_step_id_fkey'.
func (*CacheDemoWorkItem) FKTeam_TeamID ¶
FKTeam_TeamID returns the Team associated with the CacheDemoWorkItem's (TeamID).
Generated from foreign key 'cache__demo_work_items_team_id_fkey'.
func (*CacheDemoWorkItem) FKWorkItemType_WorkItemTypeID ¶
func (cdwi *CacheDemoWorkItem) FKWorkItemType_WorkItemTypeID(ctx context.Context, db DB) (*WorkItemType, error)
FKWorkItemType_WorkItemTypeID returns the WorkItemType associated with the CacheDemoWorkItem's (WorkItemTypeID).
Generated from foreign key 'cache__demo_work_items_work_item_type_id_fkey'.
func (*CacheDemoWorkItem) FKWorkItem_WorkItemID ¶
FKWorkItem_WorkItemID returns the WorkItem associated with the CacheDemoWorkItem's (WorkItemID).
Generated from foreign key 'cache__demo_work_items_work_item_id_fkey'.
func (*CacheDemoWorkItem) Insert ¶
func (cdwi *CacheDemoWorkItem) Insert(ctx context.Context, db DB) (*CacheDemoWorkItem, error)
Insert inserts the CacheDemoWorkItem to the database.
func (*CacheDemoWorkItem) Restore ¶
func (cdwi *CacheDemoWorkItem) Restore(ctx context.Context, db DB) (*CacheDemoWorkItem, error)
Restore restores a soft deleted CacheDemoWorkItem from the database.
func (*CacheDemoWorkItem) SetUpdateParams ¶
func (cdwi *CacheDemoWorkItem) SetUpdateParams(params *CacheDemoWorkItemUpdateParams)
SetUpdateParams updates public.cache__demo_work_items struct fields with the specified params.
func (*CacheDemoWorkItem) SoftDelete ¶
func (cdwi *CacheDemoWorkItem) SoftDelete(ctx context.Context, db DB) error
SoftDelete soft deletes the CacheDemoWorkItem from the database via 'deleted_at'.
func (*CacheDemoWorkItem) Update ¶
func (cdwi *CacheDemoWorkItem) Update(ctx context.Context, db DB) (*CacheDemoWorkItem, error)
Update updates a CacheDemoWorkItem in the database.
func (*CacheDemoWorkItem) Upsert ¶
func (cdwi *CacheDemoWorkItem) Upsert(ctx context.Context, db DB, params *CacheDemoWorkItemCreateParams) (*CacheDemoWorkItem, error)
Upsert upserts a CacheDemoWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type CacheDemoWorkItemCreateParams ¶
type CacheDemoWorkItemCreateParams struct { ClosedAt *time.Time `json:"closedAt"` // closed_at Description string `json:"description" required:"true" nullable:"false"` // description KanbanStepID KanbanStepID `json:"kanbanStepID" required:"true" nullable:"false"` // kanban_step_id LastMessageAt time.Time `json:"lastMessageAt" required:"true" nullable:"false"` // last_message_at Line string `json:"line" required:"true" nullable:"false"` // line Metadata map[string]any `json:"metadata" required:"true" nullable:"false"` // metadata Ref string `json:"ref" required:"true" nullable:"false" pattern:"^[0-9]{8}$"` // ref Reopened bool `json:"reopened" required:"true" nullable:"false"` // reopened TargetDate time.Time `json:"targetDate" required:"true" nullable:"false"` // target_date TeamID TeamID `json:"teamID" required:"true" nullable:"false"` // team_id Title string `json:"title" required:"true" nullable:"false"` // title WorkItemID WorkItemID `json:"-" required:"true" nullable:"false"` // work_item_id WorkItemTypeID WorkItemTypeID `json:"workItemTypeID" required:"true" nullable:"false"` // work_item_type_id }
CacheDemoWorkItemCreateParams represents insert params for 'public.cache__demo_work_items'.
func (CacheDemoWorkItemCreateParams) GetClosedAt ¶
func (p CacheDemoWorkItemCreateParams) GetClosedAt() *time.Time
func (CacheDemoWorkItemCreateParams) GetDescription ¶
func (p CacheDemoWorkItemCreateParams) GetDescription() *string
func (CacheDemoWorkItemCreateParams) GetKanbanStepID ¶
func (p CacheDemoWorkItemCreateParams) GetKanbanStepID() *KanbanStepID
func (CacheDemoWorkItemCreateParams) GetLastMessageAt ¶
func (p CacheDemoWorkItemCreateParams) GetLastMessageAt() *time.Time
func (CacheDemoWorkItemCreateParams) GetLine ¶
func (p CacheDemoWorkItemCreateParams) GetLine() *string
func (CacheDemoWorkItemCreateParams) GetMetadata ¶
func (p CacheDemoWorkItemCreateParams) GetMetadata() *map[string]any
func (CacheDemoWorkItemCreateParams) GetRef ¶
func (p CacheDemoWorkItemCreateParams) GetRef() *string
func (CacheDemoWorkItemCreateParams) GetReopened ¶
func (p CacheDemoWorkItemCreateParams) GetReopened() *bool
func (CacheDemoWorkItemCreateParams) GetTargetDate ¶
func (p CacheDemoWorkItemCreateParams) GetTargetDate() *time.Time
func (CacheDemoWorkItemCreateParams) GetTeamID ¶
func (p CacheDemoWorkItemCreateParams) GetTeamID() *TeamID
func (CacheDemoWorkItemCreateParams) GetTitle ¶
func (p CacheDemoWorkItemCreateParams) GetTitle() *string
func (CacheDemoWorkItemCreateParams) GetWorkItemTypeID ¶
func (p CacheDemoWorkItemCreateParams) GetWorkItemTypeID() *WorkItemTypeID
type CacheDemoWorkItemJoins ¶
type CacheDemoWorkItemJoins struct { KanbanStep bool `json:"kanbanStep" required:"true" nullable:"false"` // O2O kanban_steps Team bool `json:"team" required:"true" nullable:"false"` // O2O teams WorkItemType bool `json:"workItemType" required:"true" nullable:"false"` // O2O work_item_types 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 WorkItemTags bool `json:"workItemTags" required:"true" nullable:"false"` // M2M work_item_work_item_tag }
type CacheDemoWorkItemM2MAssigneeWIA ¶
type CacheDemoWorkItemM2MAssigneeWIA struct { User User `json:"user" db:"users" required:"true"` Role WorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
CacheDemoWorkItemM2MAssigneeWIA represents a M2M join against "public.work_item_assignee"
type CacheDemoWorkItemParams ¶
type CacheDemoWorkItemParams interface { GetClosedAt() *time.Time GetDescription() *string GetKanbanStepID() *KanbanStepID GetLastMessageAt() *time.Time GetLine() *string GetMetadata() *map[string]any GetRef() *string GetReopened() *bool GetTargetDate() *time.Time GetTeamID() *TeamID GetTitle() *string GetWorkItemTypeID() *WorkItemTypeID }
CacheDemoWorkItemParams represents common params for both insert and update of 'public.cache__demo_work_items'.
type CacheDemoWorkItemResponse ¶
type CacheDemoWorkItemResponse struct { ClosedAt *time.Time `json:"closedAt"` CreatedAt time.Time `json:"createdAt"` DeletedAt *time.Time `json:"deletedAt"` Description string `json:"description"` KanbanStepID KanbanStepID `json:"kanbanStepID"` LastMessageAt time.Time `json:"lastMessageAt"` Line string `json:"line"` Metadata map[string]interface{} `json:"metadata"` Ref string `json:"ref"` Reopened bool `json:"reopened"` TargetDate time.Time `json:"targetDate"` TeamID TeamID `json:"teamID"` Title string `json:"title"` UpdatedAt time.Time `json:"updatedAt"` WorkItemID WorkItemID `json:"workItemID"` WorkItemTypeID WorkItemTypeID `json:"workItemTypeID"` }
CacheDemoWorkItemResponse defines the model for CacheDemoWorkItemResponse.
type CacheDemoWorkItemSelectConfig ¶
type CacheDemoWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type CacheDemoWorkItemSelectConfigOption ¶
type CacheDemoWorkItemSelectConfigOption func(*CacheDemoWorkItemSelectConfig)
func WithCacheDemoWorkItemFilters ¶
func WithCacheDemoWorkItemFilters(filters map[string][]any) CacheDemoWorkItemSelectConfigOption
WithCacheDemoWorkItemFilters 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 WithCacheDemoWorkItemHavingClause ¶
func WithCacheDemoWorkItemHavingClause(conditions map[string][]any) CacheDemoWorkItemSelectConfigOption
WithCacheDemoWorkItemHavingClause 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 WithCacheDemoWorkItemJoin ¶
func WithCacheDemoWorkItemJoin(joins CacheDemoWorkItemJoins) CacheDemoWorkItemSelectConfigOption
WithCacheDemoWorkItemJoin joins with the given tables.
func WithCacheDemoWorkItemLimit ¶
func WithCacheDemoWorkItemLimit(limit int) CacheDemoWorkItemSelectConfigOption
WithCacheDemoWorkItemLimit limits row selection.
func WithCacheDemoWorkItemOrderBy ¶
func WithCacheDemoWorkItemOrderBy(rows map[string]*Direction) CacheDemoWorkItemSelectConfigOption
WithCacheDemoWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
func WithDeletedCacheDemoWorkItemOnly ¶
func WithDeletedCacheDemoWorkItemOnly() CacheDemoWorkItemSelectConfigOption
WithDeletedCacheDemoWorkItemOnly limits result to records marked as deleted.
type CacheDemoWorkItemUpdateParams ¶
type CacheDemoWorkItemUpdateParams struct { ClosedAt **time.Time `json:"closedAt"` // closed_at Description *string `json:"description" nullable:"false"` // description KanbanStepID *KanbanStepID `json:"kanbanStepID" nullable:"false"` // kanban_step_id LastMessageAt *time.Time `json:"lastMessageAt" nullable:"false"` // last_message_at Line *string `json:"line" nullable:"false"` // line Metadata *map[string]any `json:"metadata" nullable:"false"` // metadata Ref *string `json:"ref" nullable:"false" pattern:"^[0-9]{8}$"` // ref Reopened *bool `json:"reopened" nullable:"false"` // reopened TargetDate *time.Time `json:"targetDate" nullable:"false"` // target_date TeamID *TeamID `json:"teamID" nullable:"false"` // team_id Title *string `json:"title" nullable:"false"` // title WorkItemTypeID *WorkItemTypeID `json:"workItemTypeID" nullable:"false"` // work_item_type_id }
CacheDemoWorkItemUpdateParams represents update params for 'public.cache__demo_work_items'.
func (CacheDemoWorkItemUpdateParams) GetClosedAt ¶
func (p CacheDemoWorkItemUpdateParams) GetClosedAt() *time.Time
func (CacheDemoWorkItemUpdateParams) GetDescription ¶
func (p CacheDemoWorkItemUpdateParams) GetDescription() *string
func (CacheDemoWorkItemUpdateParams) GetKanbanStepID ¶
func (p CacheDemoWorkItemUpdateParams) GetKanbanStepID() *KanbanStepID
func (CacheDemoWorkItemUpdateParams) GetLastMessageAt ¶
func (p CacheDemoWorkItemUpdateParams) GetLastMessageAt() *time.Time
func (CacheDemoWorkItemUpdateParams) GetLine ¶
func (p CacheDemoWorkItemUpdateParams) GetLine() *string
func (CacheDemoWorkItemUpdateParams) GetMetadata ¶
func (p CacheDemoWorkItemUpdateParams) GetMetadata() *map[string]any
func (CacheDemoWorkItemUpdateParams) GetRef ¶
func (p CacheDemoWorkItemUpdateParams) GetRef() *string
func (CacheDemoWorkItemUpdateParams) GetReopened ¶
func (p CacheDemoWorkItemUpdateParams) GetReopened() *bool
func (CacheDemoWorkItemUpdateParams) GetTargetDate ¶
func (p CacheDemoWorkItemUpdateParams) GetTargetDate() *time.Time
func (CacheDemoWorkItemUpdateParams) GetTeamID ¶
func (p CacheDemoWorkItemUpdateParams) GetTeamID() *TeamID
func (CacheDemoWorkItemUpdateParams) GetTitle ¶
func (p CacheDemoWorkItemUpdateParams) GetTitle() *string
func (CacheDemoWorkItemUpdateParams) GetWorkItemTypeID ¶
func (p CacheDemoWorkItemUpdateParams) GetWorkItemTypeID() *WorkItemTypeID
type CacheTableEntity ¶
type CacheTableEntity string
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 CreateActivityJSONRequestBody ¶
type CreateActivityJSONRequestBody = CreateActivityRequest
CreateActivityJSONRequestBody defines body for CreateActivity for application/json ContentType.
type CreateActivityRequest ¶
type CreateActivityRequest struct { Description string `json:"description"` IsProductive bool `json:"isProductive"` Name string `json:"name"` }
CreateActivityRequest defines the model for CreateActivityRequest.
type CreateDemoTwoWorkItemRequest ¶
type CreateDemoTwoWorkItemRequest struct { Base ModelsWorkItemCreateParams `json:"base"` DemoTwoProject ModelsDemoTwoWorkItemCreateParams `json:"demoTwoProject"` Members []ServicesMember `json:"members"` // ProjectName is generated from projects table. ProjectName ProjectName `json:"projectName"` TagIDs []WorkItemTagID `json:"tagIDs"` }
CreateDemoTwoWorkItemRequest defines the model for CreateDemoTwoWorkItemRequest.
type CreateDemoWorkItemRequest ¶
type CreateDemoWorkItemRequest struct { Base ModelsWorkItemCreateParams `json:"base"` DemoProject ModelsDemoWorkItemCreateParams `json:"demoProject"` Members []ServicesMember `json:"members"` // ProjectName is generated from projects table. ProjectName ProjectName `json:"projectName"` TagIDs []WorkItemTagID `json:"tagIDs"` }
CreateDemoWorkItemRequest defines the model for CreateDemoWorkItemRequest.
type CreateProjectBoardRequest ¶
type CreateProjectBoardRequest struct { Tags *[]ModelsWorkItemTagCreateParams `json:"tags"` Teams *[]ModelsTeamCreateParams `json:"teams"` }
CreateProjectBoardRequest defines the model for CreateProjectBoardRequest.
type CreateTeamJSONRequestBody ¶
type CreateTeamJSONRequestBody = CreateTeamRequest
CreateTeamJSONRequestBody defines body for CreateTeam for application/json ContentType.
type CreateTeamRequest ¶
CreateTeamRequest defines the model for CreateTeamRequest.
type CreateTimeEntryJSONRequestBody ¶
type CreateTimeEntryJSONRequestBody = CreateTimeEntryRequest
CreateTimeEntryJSONRequestBody defines body for CreateTimeEntry for application/json ContentType.
type CreateTimeEntryRequest ¶
type CreateTimeEntryRequest struct { ActivityID ActivityID `json:"activityID"` Comment string `json:"comment"` DurationMinutes *int `json:"durationMinutes"` Start time.Time `json:"start"` TeamID *TeamID `json:"teamID"` UserID ModelsUserID `json:"userID"` WorkItemID *WorkItemID `json:"workItemID"` }
CreateTimeEntryRequest defines the model for CreateTimeEntryRequest.
type CreateWorkItemCommentJSONRequestBody ¶
type CreateWorkItemCommentJSONRequestBody = CreateWorkItemCommentRequest
CreateWorkItemCommentJSONRequestBody defines body for CreateWorkItemComment for application/json ContentType.
type CreateWorkItemCommentRequest ¶
type CreateWorkItemCommentRequest struct { Message string `json:"message"` UserID ModelsUserID `json:"userID"` WorkItemID WorkItemID `json:"workItemID"` }
CreateWorkItemCommentRequest defines the model for CreateWorkItemCommentRequest.
type CreateWorkItemRequest ¶
type CreateWorkItemRequest struct { FromQueryParams bool // contains filtered or unexported fields }
CreateWorkItemRequest defines the model for CreateWorkItemRequest.
func (CreateWorkItemRequest) AsCreateDemoTwoWorkItemRequest ¶
func (t CreateWorkItemRequest) AsCreateDemoTwoWorkItemRequest() (CreateDemoTwoWorkItemRequest, error)
AsCreateDemoTwoWorkItemRequest returns the union data inside the CreateWorkItemRequest as a CreateDemoTwoWorkItemRequest
func (CreateWorkItemRequest) AsCreateDemoWorkItemRequest ¶
func (t CreateWorkItemRequest) AsCreateDemoWorkItemRequest() (CreateDemoWorkItemRequest, error)
AsCreateDemoWorkItemRequest returns the union data inside the CreateWorkItemRequest as a CreateDemoWorkItemRequest
func (CreateWorkItemRequest) Discriminator ¶
func (t CreateWorkItemRequest) Discriminator() (string, error)
Discriminator via struct field ProjectName.
func (CreateWorkItemRequest) MarshalJSON ¶
func (t CreateWorkItemRequest) MarshalJSON() ([]byte, error)
func (*CreateWorkItemRequest) UnmarshalJSON ¶
func (t *CreateWorkItemRequest) UnmarshalJSON(b []byte) error
func (CreateWorkItemRequest) ValueByDiscriminator ¶
func (t CreateWorkItemRequest) ValueByDiscriminator() (interface{}, error)
type CreateWorkItemTagJSONRequestBody ¶
type CreateWorkItemTagJSONRequestBody = CreateWorkItemTagRequest
CreateWorkItemTagJSONRequestBody defines body for CreateWorkItemTag for application/json ContentType.
type CreateWorkItemTagRequest ¶
type CreateWorkItemTagRequest struct { Color string `json:"color"` Description string `json:"description"` Name string `json:"name"` }
CreateWorkItemTagRequest defines the model for CreateWorkItemTagRequest.
type CreateWorkItemTypeJSONRequestBody ¶
type CreateWorkItemTypeJSONRequestBody = CreateWorkItemTypeRequest
CreateWorkItemTypeJSONRequestBody defines body for CreateWorkItemType for application/json ContentType.
type CreateWorkItemTypeRequest ¶
type CreateWorkItemTypeRequest struct { Color string `json:"color"` Description string `json:"description"` Name string `json:"name"` }
CreateWorkItemTypeRequest defines the model for CreateWorkItemTypeRequest.
type CreateWorkitemJSONRequestBody ¶
type CreateWorkitemJSONRequestBody = CreateWorkItemRequest
CreateWorkitemJSONRequestBody defines body for CreateWorkitem for application/json ContentType.
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 DemoKanbanSteps ¶
type DemoKanbanSteps string
DemoKanbanSteps is generated from kanban_steps table.
const ( DemoKanbanStepsDisabled DemoKanbanSteps = "Disabled" DemoKanbanStepsReceived DemoKanbanSteps = "Received" DemoKanbanStepsUnderReview DemoKanbanSteps = "Under review" DemoKanbanStepsWorkInProgress DemoKanbanSteps = "Work in progress" )
DemoKanbanSteps is generated from kanban_steps table.
func AllDemoKanbanStepsValues ¶
func AllDemoKanbanStepsValues() []DemoKanbanSteps
AllDemoKanbanStepsValues returns all possible values for DemoKanbanSteps.
type DemoTwoKanbanSteps ¶
type DemoTwoKanbanSteps string
DemoTwoKanbanSteps is generated from kanban_steps table.
const (
DemoTwoKanbanStepsReceived DemoTwoKanbanSteps = "Received"
)
DemoTwoKanbanSteps is generated from kanban_steps table.
func AllDemoTwoKanbanStepsValues ¶
func AllDemoTwoKanbanStepsValues() []DemoTwoKanbanSteps
AllDemoTwoKanbanStepsValues returns all possible values for DemoTwoKanbanSteps.
type DemoTwoWorkItem ¶
type DemoTwoWorkItem struct { WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id CustomDateForProject2 *time.Time `json:"customDateForProject2" db:"custom_date_for_project_2"` // custom_date_for_project_2 WorkItemJoin *WorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (inferred) }
DemoTwoWorkItem represents a row from 'public.demo_two_work_items'.
func CreateDemoTwoWorkItem ¶
func CreateDemoTwoWorkItem(ctx context.Context, db DB, params *DemoTwoWorkItemCreateParams) (*DemoTwoWorkItem, error)
CreateDemoTwoWorkItem creates a new DemoTwoWorkItem in the database with the given params.
func DemoTwoWorkItemByWorkItemID ¶
func DemoTwoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, opts ...DemoTwoWorkItemSelectConfigOption) (*DemoTwoWorkItem, error)
DemoTwoWorkItemByWorkItemID retrieves a row from 'public.demo_two_work_items' as a DemoTwoWorkItem.
Generated from index 'demo_two_work_items_pkey'.
func DemoTwoWorkItemPaginated ¶
func DemoTwoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...DemoTwoWorkItemSelectConfigOption) ([]DemoTwoWorkItem, error)
DemoTwoWorkItemPaginated returns a cursor-paginated list of DemoTwoWorkItem. At least one cursor is required.
func (*DemoTwoWorkItem) Delete ¶
func (dtwi *DemoTwoWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the DemoTwoWorkItem from the database.
func (*DemoTwoWorkItem) FKWorkItem_WorkItemID ¶
FKWorkItem_WorkItemID returns the WorkItem associated with the DemoTwoWorkItem's (WorkItemID).
Generated from foreign key 'demo_two_work_items_work_item_id_fkey'.
func (*DemoTwoWorkItem) Insert ¶
func (dtwi *DemoTwoWorkItem) Insert(ctx context.Context, db DB) (*DemoTwoWorkItem, error)
Insert inserts the DemoTwoWorkItem to the database.
func (*DemoTwoWorkItem) SetUpdateParams ¶
func (dtwi *DemoTwoWorkItem) SetUpdateParams(params *DemoTwoWorkItemUpdateParams)
SetUpdateParams updates public.demo_two_work_items struct fields with the specified params.
func (*DemoTwoWorkItem) Update ¶
func (dtwi *DemoTwoWorkItem) Update(ctx context.Context, db DB) (*DemoTwoWorkItem, error)
Update updates a DemoTwoWorkItem in the database.
func (*DemoTwoWorkItem) Upsert ¶
func (dtwi *DemoTwoWorkItem) Upsert(ctx context.Context, db DB, params *DemoTwoWorkItemCreateParams) (*DemoTwoWorkItem, error)
Upsert upserts a DemoTwoWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type DemoTwoWorkItemCreateParams ¶
type DemoTwoWorkItemCreateParams struct { CustomDateForProject2 *time.Time `json:"customDateForProject2"` // custom_date_for_project_2 WorkItemID WorkItemID `json:"-" required:"true" nullable:"false"` // work_item_id }
DemoTwoWorkItemCreateParams represents insert params for 'public.demo_two_work_items'.
func (DemoTwoWorkItemCreateParams) GetCustomDateForProject2 ¶
func (p DemoTwoWorkItemCreateParams) GetCustomDateForProject2() *time.Time
type DemoTwoWorkItemJoins ¶
type DemoTwoWorkItemJoins struct {
WorkItem bool `json:"workItem" required:"true" nullable:"false"` // O2O work_items
}
type DemoTwoWorkItemParams ¶
DemoTwoWorkItemParams represents common params for both insert and update of 'public.demo_two_work_items'.
type DemoTwoWorkItemResponse ¶
type DemoTwoWorkItemResponse struct { ClosedAt *time.Time `json:"closedAt"` CreatedAt time.Time `json:"createdAt"` DeletedAt *time.Time `json:"deletedAt"` DemoTwoWorkItem ModelsDemoTwoWorkItem `json:"demoTwoWorkItem"` Description string `json:"description"` KanbanStepID KanbanStepID `json:"kanbanStepID"` Members *[]ModelsWorkItemM2MAssigneeWIA `json:"members"` Metadata map[string]interface{} `json:"metadata"` // ProjectName is generated from projects table. ProjectName ProjectName `json:"projectName"` TargetDate time.Time `json:"targetDate"` TeamID *TeamID `json:"teamID"` TimeEntries *[]ModelsTimeEntry `json:"timeEntries"` Title string `json:"title"` UpdatedAt time.Time `json:"updatedAt"` WorkItemComments *[]ModelsWorkItemComment `json:"workItemComments"` WorkItemID WorkItemID `json:"workItemID"` WorkItemTags *[]ModelsWorkItemTag `json:"workItemTags"` WorkItemType *ModelsWorkItemType `json:"workItemType,omitempty"` WorkItemTypeID WorkItemTypeID `json:"workItemTypeID"` }
DemoTwoWorkItemResponse defines the model for DemoTwoWorkItemResponse.
type DemoTwoWorkItemSelectConfig ¶
type DemoTwoWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type DemoTwoWorkItemSelectConfigOption ¶
type DemoTwoWorkItemSelectConfigOption func(*DemoTwoWorkItemSelectConfig)
func WithDemoTwoWorkItemFilters ¶
func WithDemoTwoWorkItemFilters(filters map[string][]any) DemoTwoWorkItemSelectConfigOption
WithDemoTwoWorkItemFilters 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 WithDemoTwoWorkItemHavingClause ¶
func WithDemoTwoWorkItemHavingClause(conditions map[string][]any) DemoTwoWorkItemSelectConfigOption
WithDemoTwoWorkItemHavingClause 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 WithDemoTwoWorkItemJoin ¶
func WithDemoTwoWorkItemJoin(joins DemoTwoWorkItemJoins) DemoTwoWorkItemSelectConfigOption
WithDemoTwoWorkItemJoin joins with the given tables.
func WithDemoTwoWorkItemLimit ¶
func WithDemoTwoWorkItemLimit(limit int) DemoTwoWorkItemSelectConfigOption
WithDemoTwoWorkItemLimit limits row selection.
func WithDemoTwoWorkItemOrderBy ¶
func WithDemoTwoWorkItemOrderBy(rows map[string]*Direction) DemoTwoWorkItemSelectConfigOption
WithDemoTwoWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type DemoTwoWorkItemTypes ¶
type DemoTwoWorkItemTypes string
DemoTwoWorkItemTypes is generated from work_item_types table.
const ( DemoTwoWorkItemTypesAnotherType DemoTwoWorkItemTypes = "Another type" DemoTwoWorkItemTypesType1 DemoTwoWorkItemTypes = "Type 1" DemoTwoWorkItemTypesType2 DemoTwoWorkItemTypes = "Type 2" )
DemoTwoWorkItemTypes is generated from work_item_types table.
func AllDemoTwoWorkItemTypesValues ¶
func AllDemoTwoWorkItemTypesValues() []DemoTwoWorkItemTypes
AllDemoTwoWorkItemTypesValues returns all possible values for DemoTwoWorkItemTypes.
type DemoTwoWorkItemUpdateParams ¶
type DemoTwoWorkItemUpdateParams struct {
CustomDateForProject2 **time.Time `json:"customDateForProject2"` // custom_date_for_project_2
}
DemoTwoWorkItemUpdateParams represents update params for 'public.demo_two_work_items'.
func (DemoTwoWorkItemUpdateParams) GetCustomDateForProject2 ¶
func (p DemoTwoWorkItemUpdateParams) GetCustomDateForProject2() *time.Time
type DemoWorkItem ¶
type DemoWorkItem struct { WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Ref string `json:"ref" db:"ref" required:"true" nullable:"false" pattern:"^[0-9]{8}$"` // ref Line string `json:"line" db:"line" required:"true" nullable:"false"` // line LastMessageAt time.Time `json:"lastMessageAt" db:"last_message_at" required:"true" nullable:"false"` // last_message_at Reopened bool `json:"reopened" db:"reopened" required:"true" nullable:"false"` // reopened WorkItemJoin *WorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (inferred) }
DemoWorkItem represents a row from 'public.demo_work_items'.
func CreateDemoWorkItem ¶
func CreateDemoWorkItem(ctx context.Context, db DB, params *DemoWorkItemCreateParams) (*DemoWorkItem, error)
CreateDemoWorkItem creates a new DemoWorkItem in the database with the given params.
func DemoWorkItemByWorkItemID ¶
func DemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, opts ...DemoWorkItemSelectConfigOption) (*DemoWorkItem, error)
DemoWorkItemByWorkItemID retrieves a row from 'public.demo_work_items' as a DemoWorkItem.
Generated from index 'demo_work_items_pkey'.
func DemoWorkItemPaginated ¶
func DemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...DemoWorkItemSelectConfigOption) ([]DemoWorkItem, error)
DemoWorkItemPaginated returns a cursor-paginated list of DemoWorkItem. At least one cursor is required.
func DemoWorkItemsByRefLine ¶
func DemoWorkItemsByRefLine(ctx context.Context, db DB, ref string, line string, opts ...DemoWorkItemSelectConfigOption) ([]DemoWorkItem, error)
DemoWorkItemsByRefLine retrieves a row from 'public.demo_work_items' as a DemoWorkItem.
Generated from index 'demo_work_items_ref_line_idx'.
func (*DemoWorkItem) Delete ¶
func (dwi *DemoWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the DemoWorkItem from the database.
func (*DemoWorkItem) FKWorkItem_WorkItemID ¶
FKWorkItem_WorkItemID returns the WorkItem associated with the DemoWorkItem's (WorkItemID).
Generated from foreign key 'demo_work_items_work_item_id_fkey'.
func (*DemoWorkItem) Insert ¶
func (dwi *DemoWorkItem) Insert(ctx context.Context, db DB) (*DemoWorkItem, error)
Insert inserts the DemoWorkItem to the database.
func (*DemoWorkItem) SetUpdateParams ¶
func (dwi *DemoWorkItem) SetUpdateParams(params *DemoWorkItemUpdateParams)
SetUpdateParams updates public.demo_work_items struct fields with the specified params.
func (*DemoWorkItem) Update ¶
func (dwi *DemoWorkItem) Update(ctx context.Context, db DB) (*DemoWorkItem, error)
Update updates a DemoWorkItem in the database.
func (*DemoWorkItem) Upsert ¶
func (dwi *DemoWorkItem) Upsert(ctx context.Context, db DB, params *DemoWorkItemCreateParams) (*DemoWorkItem, error)
Upsert upserts a DemoWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type DemoWorkItemCreateParams ¶
type DemoWorkItemCreateParams struct { LastMessageAt time.Time `json:"lastMessageAt" required:"true" nullable:"false"` // last_message_at Line string `json:"line" required:"true" nullable:"false"` // line Ref string `json:"ref" required:"true" nullable:"false" pattern:"^[0-9]{8}$"` // ref Reopened bool `json:"reopened" required:"true" nullable:"false"` // reopened WorkItemID WorkItemID `json:"-" required:"true" nullable:"false"` // work_item_id }
DemoWorkItemCreateParams represents insert params for 'public.demo_work_items'.
func (DemoWorkItemCreateParams) GetLastMessageAt ¶
func (p DemoWorkItemCreateParams) GetLastMessageAt() *time.Time
func (DemoWorkItemCreateParams) GetLine ¶
func (p DemoWorkItemCreateParams) GetLine() *string
func (DemoWorkItemCreateParams) GetRef ¶
func (p DemoWorkItemCreateParams) GetRef() *string
func (DemoWorkItemCreateParams) GetReopened ¶
func (p DemoWorkItemCreateParams) GetReopened() *bool
type DemoWorkItemJoins ¶
type DemoWorkItemJoins struct {
WorkItem bool `json:"workItem" required:"true" nullable:"false"` // O2O work_items
}
type DemoWorkItemParams ¶
type DemoWorkItemParams interface { GetLastMessageAt() *time.Time GetLine() *string GetRef() *string GetReopened() *bool }
DemoWorkItemParams represents common params for both insert and update of 'public.demo_work_items'.
type DemoWorkItemResponse ¶
type DemoWorkItemResponse struct { ClosedAt *time.Time `json:"closedAt"` CreatedAt time.Time `json:"createdAt"` DeletedAt *time.Time `json:"deletedAt"` DemoWorkItem ModelsDemoWorkItem `json:"demoWorkItem"` Description string `json:"description"` KanbanStepID KanbanStepID `json:"kanbanStepID"` Members *[]ModelsWorkItemM2MAssigneeWIA `json:"members"` Metadata map[string]interface{} `json:"metadata"` // ProjectName is generated from projects table. ProjectName ProjectName `json:"projectName"` TargetDate time.Time `json:"targetDate"` TeamID *TeamID `json:"teamID"` TimeEntries *[]ModelsTimeEntry `json:"timeEntries"` Title string `json:"title"` UpdatedAt time.Time `json:"updatedAt"` WorkItemComments *[]ModelsWorkItemComment `json:"workItemComments"` WorkItemID WorkItemID `json:"workItemID"` WorkItemTags *[]ModelsWorkItemTag `json:"workItemTags"` WorkItemType *ModelsWorkItemType `json:"workItemType,omitempty"` WorkItemTypeID WorkItemTypeID `json:"workItemTypeID"` }
DemoWorkItemResponse defines the model for DemoWorkItemResponse.
type DemoWorkItemSelectConfig ¶
type DemoWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type DemoWorkItemSelectConfigOption ¶
type DemoWorkItemSelectConfigOption func(*DemoWorkItemSelectConfig)
func WithDemoWorkItemFilters ¶
func WithDemoWorkItemFilters(filters map[string][]any) DemoWorkItemSelectConfigOption
WithDemoWorkItemFilters 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 WithDemoWorkItemHavingClause ¶
func WithDemoWorkItemHavingClause(conditions map[string][]any) DemoWorkItemSelectConfigOption
WithDemoWorkItemHavingClause 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 WithDemoWorkItemJoin ¶
func WithDemoWorkItemJoin(joins DemoWorkItemJoins) DemoWorkItemSelectConfigOption
WithDemoWorkItemJoin joins with the given tables.
func WithDemoWorkItemLimit ¶
func WithDemoWorkItemLimit(limit int) DemoWorkItemSelectConfigOption
WithDemoWorkItemLimit limits row selection.
func WithDemoWorkItemOrderBy ¶
func WithDemoWorkItemOrderBy(rows map[string]*Direction) DemoWorkItemSelectConfigOption
WithDemoWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type DemoWorkItemTypes ¶
type DemoWorkItemTypes string
DemoWorkItemTypes is generated from work_item_types table.
const (
DemoWorkItemTypesType1 DemoWorkItemTypes = "Type 1"
)
DemoWorkItemTypes is generated from work_item_types table.
func AllDemoWorkItemTypesValues ¶
func AllDemoWorkItemTypesValues() []DemoWorkItemTypes
AllDemoWorkItemTypesValues returns all possible values for DemoWorkItemTypes.
type DemoWorkItemUpdateParams ¶
type DemoWorkItemUpdateParams struct { LastMessageAt *time.Time `json:"lastMessageAt" nullable:"false"` // last_message_at Line *string `json:"line" nullable:"false"` // line Ref *string `json:"ref" nullable:"false" pattern:"^[0-9]{8}$"` // ref Reopened *bool `json:"reopened" nullable:"false"` // reopened }
DemoWorkItemUpdateParams represents update params for 'public.demo_work_items'.
func (DemoWorkItemUpdateParams) GetLastMessageAt ¶
func (p DemoWorkItemUpdateParams) GetLastMessageAt() *time.Time
func (DemoWorkItemUpdateParams) GetLine ¶
func (p DemoWorkItemUpdateParams) GetLine() *string
func (DemoWorkItemUpdateParams) GetRef ¶
func (p DemoWorkItemUpdateParams) GetRef() *string
func (DemoWorkItemUpdateParams) GetReopened ¶
func (p DemoWorkItemUpdateParams) GetReopened() *bool
type Direction ¶
type Direction string
Direction defines the model for Direction.
Defines values for Direction.
func AllDirectionValues ¶
func AllDirectionValues() []Direction
AllDirectionValues returns all possible values for Direction.
type EntityNotification ¶
type EntityNotification struct { EntityNotificationID EntityNotificationID `json:"entityNotificationID" db:"entity_notification_id" required:"true" nullable:"false"` // entity_notification_id ID string `json:"id" db:"id" required:"true" nullable:"false"` // id Message string `json:"message" db:"message" required:"true" nullable:"false"` // message Topic Topics `json:"topic" db:"topic" required:"true" nullable:"false" ref:"#/components/schemas/Topics"` // topic CreatedAt time.Time `json:"createdAt" db:"created_at" required:"true" nullable:"false"` // created_at }
EntityNotification represents a row from 'public.entity_notifications'.
func CreateEntityNotification ¶
func CreateEntityNotification(ctx context.Context, db DB, params *EntityNotificationCreateParams) (*EntityNotification, error)
CreateEntityNotification creates a new EntityNotification in the database with the given params.
func EntityNotificationByEntityNotificationID ¶
func EntityNotificationByEntityNotificationID(ctx context.Context, db DB, entityNotificationID EntityNotificationID, opts ...EntityNotificationSelectConfigOption) (*EntityNotification, error)
EntityNotificationByEntityNotificationID retrieves a row from 'public.entity_notifications' as a EntityNotification.
Generated from index 'entity_notifications_pkey'.
func EntityNotificationPaginated ¶
func EntityNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...EntityNotificationSelectConfigOption) ([]EntityNotification, error)
EntityNotificationPaginated returns a cursor-paginated list of EntityNotification. At least one cursor is required.
func (*EntityNotification) Delete ¶
func (en *EntityNotification) Delete(ctx context.Context, db DB) error
Delete deletes the EntityNotification from the database.
func (*EntityNotification) Insert ¶
func (en *EntityNotification) Insert(ctx context.Context, db DB) (*EntityNotification, error)
Insert inserts the EntityNotification to the database.
func (*EntityNotification) SetUpdateParams ¶
func (en *EntityNotification) SetUpdateParams(params *EntityNotificationUpdateParams)
SetUpdateParams updates public.entity_notifications struct fields with the specified params.
func (*EntityNotification) Update ¶
func (en *EntityNotification) Update(ctx context.Context, db DB) (*EntityNotification, error)
Update updates a EntityNotification in the database.
func (*EntityNotification) Upsert ¶
func (en *EntityNotification) Upsert(ctx context.Context, db DB, params *EntityNotificationCreateParams) (*EntityNotification, error)
Upsert upserts a EntityNotification in the database. Requires appropriate PK(s) to be set beforehand.
type EntityNotificationCreateParams ¶
type EntityNotificationCreateParams struct { ID string `json:"id" required:"true" nullable:"false"` // id Message string `json:"message" required:"true" nullable:"false"` // message Topic Topics `json:"topic" required:"true" nullable:"false" ref:"#/components/schemas/Topics"` // topic }
EntityNotificationCreateParams represents insert params for 'public.entity_notifications'.
func (EntityNotificationCreateParams) GetID ¶
func (p EntityNotificationCreateParams) GetID() *string
func (EntityNotificationCreateParams) GetMessage ¶
func (p EntityNotificationCreateParams) GetMessage() *string
func (EntityNotificationCreateParams) GetTopic ¶
func (p EntityNotificationCreateParams) GetTopic() *Topics
type EntityNotificationID ¶
type EntityNotificationID int
type EntityNotificationJoins ¶
type EntityNotificationJoins struct { }
type EntityNotificationParams ¶
EntityNotificationParams represents common params for both insert and update of 'public.entity_notifications'.
type EntityNotificationSelectConfig ¶
type EntityNotificationSelectConfig struct {
// contains filtered or unexported fields
}
type EntityNotificationSelectConfigOption ¶
type EntityNotificationSelectConfigOption func(*EntityNotificationSelectConfig)
func WithEntityNotificationFilters ¶
func WithEntityNotificationFilters(filters map[string][]any) EntityNotificationSelectConfigOption
WithEntityNotificationFilters 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 WithEntityNotificationHavingClause ¶
func WithEntityNotificationHavingClause(conditions map[string][]any) EntityNotificationSelectConfigOption
WithEntityNotificationHavingClause 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 WithEntityNotificationJoin ¶
func WithEntityNotificationJoin(joins EntityNotificationJoins) EntityNotificationSelectConfigOption
WithEntityNotificationJoin joins with the given tables.
func WithEntityNotificationLimit ¶
func WithEntityNotificationLimit(limit int) EntityNotificationSelectConfigOption
WithEntityNotificationLimit limits row selection.
func WithEntityNotificationOrderBy ¶
func WithEntityNotificationOrderBy(rows map[string]*Direction) EntityNotificationSelectConfigOption
WithEntityNotificationOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type EntityNotificationUpdateParams ¶
type EntityNotificationUpdateParams struct { ID *string `json:"id" nullable:"false"` // id Message *string `json:"message" nullable:"false"` // message Topic *Topics `json:"topic" nullable:"false" ref:"#/components/schemas/Topics"` // topic }
EntityNotificationUpdateParams represents update params for 'public.entity_notifications'.
func (EntityNotificationUpdateParams) GetID ¶
func (p EntityNotificationUpdateParams) GetID() *string
func (EntityNotificationUpdateParams) GetMessage ¶
func (p EntityNotificationUpdateParams) GetMessage() *string
func (EntityNotificationUpdateParams) GetTopic ¶
func (p EntityNotificationUpdateParams) GetTopic() *Topics
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 ErrInvalidExtraSchemaNotificationType ¶
type ErrInvalidExtraSchemaNotificationType string
ErrInvalidExtraSchemaNotificationType is the invalid ExtraSchemaNotificationType error.
func (ErrInvalidExtraSchemaNotificationType) Error ¶
func (err ErrInvalidExtraSchemaNotificationType) Error() string
Error satisfies the error interface.
type ErrInvalidExtraSchemaWorkItemRole ¶
type ErrInvalidExtraSchemaWorkItemRole string
ErrInvalidExtraSchemaWorkItemRole is the invalid ExtraSchemaWorkItemRole error.
func (ErrInvalidExtraSchemaWorkItemRole) Error ¶
func (err ErrInvalidExtraSchemaWorkItemRole) Error() string
Error satisfies the error interface.
type ErrInvalidNotificationType ¶
type ErrInvalidNotificationType string
ErrInvalidNotificationType is the invalid NotificationType error.
func (ErrInvalidNotificationType) Error ¶
func (err ErrInvalidNotificationType) Error() string
Error satisfies the error interface.
type ErrInvalidWorkItemRole ¶
type ErrInvalidWorkItemRole string
ErrInvalidWorkItemRole is the invalid WorkItemRole error.
func (ErrInvalidWorkItemRole) Error ¶
func (err ErrInvalidWorkItemRole) 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 ErrorCode ¶
type ErrorCode string
ErrorCode Represents standardized HTTP error types. Notes: - 'Private' marks an error to be hidden in response.
const ( ErrorCodeAlreadyExists ErrorCode = "AlreadyExists" ErrorCodeInvalidArgument ErrorCode = "InvalidArgument" ErrorCodeInvalidRole ErrorCode = "InvalidRole" ErrorCodeInvalidScope ErrorCode = "InvalidScope" ErrorCodeInvalidUUID ErrorCode = "InvalidUUID" ErrorCodeNotFound ErrorCode = "NotFound" ErrorCodeOIDC ErrorCode = "OIDC" ErrorCodePrivate ErrorCode = "Private" ErrorCodeRequestValidation ErrorCode = "RequestValidation" ErrorCodeResponseValidation ErrorCode = "ResponseValidation" ErrorCodeUnauthenticated ErrorCode = "Unauthenticated" ErrorCodeUnknown ErrorCode = "Unknown" )
ErrorCode Represents standardized HTTP error types. Notes: - 'Private' marks an error to be hidden in response.
func AllErrorCodeValues ¶
func AllErrorCodeValues() []ErrorCode
AllErrorCodeValues returns all possible values for ErrorCode.
type EventsParams ¶
type EventsParams struct { ProjectName ProjectName `form:"projectName" json:"projectName"` Topics Topics `form:"topics" json:"topics"` }
EventsParams defines parameters for Events.
type ExtraSchemaBook ¶
type ExtraSchemaBook struct { BookID ExtraSchemaBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name AuthorsJoin *[]ExtraSchemaBookM2MAuthorBA `json:"-" db:"book_authors_authors"` // M2M book_authors AuthorsBASKJoin *[]ExtraSchemaBookM2MAuthorBASK `json:"-" db:"book_authors_surrogate_key_authors"` // M2M book_authors_surrogate_key BookReviewsJoin *[]ExtraSchemaBookReview `json:"-" db:"book_reviews"` // M2O books SellersJoin *[]ExtraSchemaUser `json:"-" db:"book_sellers_sellers"` // M2M book_sellers }
ExtraSchemaBook represents a row from 'extra_schema.books'.
func CreateExtraSchemaBook ¶
func CreateExtraSchemaBook(ctx context.Context, db DB, params *ExtraSchemaBookCreateParams) (*ExtraSchemaBook, error)
CreateExtraSchemaBook creates a new ExtraSchemaBook in the database with the given params.
func ExtraSchemaBookByBookID ¶
func ExtraSchemaBookByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, opts ...ExtraSchemaBookSelectConfigOption) (*ExtraSchemaBook, error)
ExtraSchemaBookByBookID retrieves a row from 'extra_schema.books' as a ExtraSchemaBook.
Generated from index 'books_pkey'.
func ExtraSchemaBookPaginated ¶
func ExtraSchemaBookPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaBookSelectConfigOption) ([]ExtraSchemaBook, error)
ExtraSchemaBookPaginated returns a cursor-paginated list of ExtraSchemaBook. At least one cursor is required.
func (*ExtraSchemaBook) Delete ¶
func (esb *ExtraSchemaBook) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaBook from the database.
func (*ExtraSchemaBook) Insert ¶
func (esb *ExtraSchemaBook) Insert(ctx context.Context, db DB) (*ExtraSchemaBook, error)
Insert inserts the ExtraSchemaBook to the database.
func (*ExtraSchemaBook) SetUpdateParams ¶
func (esb *ExtraSchemaBook) SetUpdateParams(params *ExtraSchemaBookUpdateParams)
SetUpdateParams updates extra_schema.books struct fields with the specified params.
func (*ExtraSchemaBook) Update ¶
func (esb *ExtraSchemaBook) Update(ctx context.Context, db DB) (*ExtraSchemaBook, error)
Update updates a ExtraSchemaBook in the database.
func (*ExtraSchemaBook) Upsert ¶
func (esb *ExtraSchemaBook) Upsert(ctx context.Context, db DB, params *ExtraSchemaBookCreateParams) (*ExtraSchemaBook, error)
Upsert upserts a ExtraSchemaBook in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaBookAuthor ¶
type ExtraSchemaBookAuthor struct { BookID ExtraSchemaBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id AuthorID ExtraSchemaUserID `json:"authorID" db:"author_id" required:"true" nullable:"false"` // author_id Pseudonym *string `json:"pseudonym" db:"pseudonym"` // pseudonym BooksJoin *[]ExtraSchemaBookAuthorM2MBookBA `json:"-" db:"book_authors_books"` // M2M book_authors AuthorsJoin *[]ExtraSchemaBookAuthorM2MAuthorBA `json:"-" db:"book_authors_authors"` // M2M book_authors }
ExtraSchemaBookAuthor represents a row from 'extra_schema.book_authors'.
func CreateExtraSchemaBookAuthor ¶
func CreateExtraSchemaBookAuthor(ctx context.Context, db DB, params *ExtraSchemaBookAuthorCreateParams) (*ExtraSchemaBookAuthor, error)
CreateExtraSchemaBookAuthor creates a new ExtraSchemaBookAuthor in the database with the given params.
func ExtraSchemaBookAuthorByBookIDAuthorID ¶
func ExtraSchemaBookAuthorByBookIDAuthorID(ctx context.Context, db DB, bookID ExtraSchemaBookID, authorID ExtraSchemaUserID, opts ...ExtraSchemaBookAuthorSelectConfigOption) (*ExtraSchemaBookAuthor, error)
ExtraSchemaBookAuthorByBookIDAuthorID retrieves a row from 'extra_schema.book_authors' as a ExtraSchemaBookAuthor.
Generated from index 'book_authors_pkey'.
func ExtraSchemaBookAuthorPaginated ¶
func ExtraSchemaBookAuthorPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaBookAuthorSelectConfigOption) ([]ExtraSchemaBookAuthor, error)
ExtraSchemaBookAuthorPaginated returns a cursor-paginated list of ExtraSchemaBookAuthor. At least one cursor is required.
func ExtraSchemaBookAuthorsByAuthorID ¶
func ExtraSchemaBookAuthorsByAuthorID(ctx context.Context, db DB, authorID ExtraSchemaUserID, opts ...ExtraSchemaBookAuthorSelectConfigOption) ([]ExtraSchemaBookAuthor, error)
ExtraSchemaBookAuthorsByAuthorID retrieves a row from 'extra_schema.book_authors' as a ExtraSchemaBookAuthor.
Generated from index 'book_authors_pkey'.
func ExtraSchemaBookAuthorsByBookID ¶
func ExtraSchemaBookAuthorsByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, opts ...ExtraSchemaBookAuthorSelectConfigOption) ([]ExtraSchemaBookAuthor, error)
ExtraSchemaBookAuthorsByBookID retrieves a row from 'extra_schema.book_authors' as a ExtraSchemaBookAuthor.
Generated from index 'book_authors_pkey'.
func (*ExtraSchemaBookAuthor) Delete ¶
func (esba *ExtraSchemaBookAuthor) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaBookAuthor from the database.
func (*ExtraSchemaBookAuthor) FKBook_BookID ¶
func (esba *ExtraSchemaBookAuthor) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
FKBook_BookID returns the Book associated with the ExtraSchemaBookAuthor's (BookID).
Generated from foreign key 'book_authors_book_id_fkey'.
func (*ExtraSchemaBookAuthor) FKUser_AuthorID ¶
func (esba *ExtraSchemaBookAuthor) FKUser_AuthorID(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_AuthorID returns the User associated with the ExtraSchemaBookAuthor's (AuthorID).
Generated from foreign key 'book_authors_author_id_fkey'.
func (*ExtraSchemaBookAuthor) Insert ¶
func (esba *ExtraSchemaBookAuthor) Insert(ctx context.Context, db DB) (*ExtraSchemaBookAuthor, error)
Insert inserts the ExtraSchemaBookAuthor to the database.
func (*ExtraSchemaBookAuthor) SetUpdateParams ¶
func (esba *ExtraSchemaBookAuthor) SetUpdateParams(params *ExtraSchemaBookAuthorUpdateParams)
SetUpdateParams updates extra_schema.book_authors struct fields with the specified params.
func (*ExtraSchemaBookAuthor) Update ¶
func (esba *ExtraSchemaBookAuthor) Update(ctx context.Context, db DB) (*ExtraSchemaBookAuthor, error)
Update updates a ExtraSchemaBookAuthor in the database.
func (*ExtraSchemaBookAuthor) Upsert ¶
func (esba *ExtraSchemaBookAuthor) Upsert(ctx context.Context, db DB, params *ExtraSchemaBookAuthorCreateParams) (*ExtraSchemaBookAuthor, error)
Upsert upserts a ExtraSchemaBookAuthor in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaBookAuthorCreateParams ¶
type ExtraSchemaBookAuthorCreateParams struct { AuthorID ExtraSchemaUserID `json:"authorID" required:"true" nullable:"false"` // author_id BookID ExtraSchemaBookID `json:"bookID" required:"true" nullable:"false"` // book_id Pseudonym *string `json:"pseudonym"` // pseudonym }
ExtraSchemaBookAuthorCreateParams represents insert params for 'extra_schema.book_authors'.
func (ExtraSchemaBookAuthorCreateParams) GetAuthorID ¶
func (p ExtraSchemaBookAuthorCreateParams) GetAuthorID() *ExtraSchemaUserID
func (ExtraSchemaBookAuthorCreateParams) GetBookID ¶
func (p ExtraSchemaBookAuthorCreateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookAuthorCreateParams) GetPseudonym ¶
func (p ExtraSchemaBookAuthorCreateParams) GetPseudonym() *string
type ExtraSchemaBookAuthorM2MAuthorBA ¶
type ExtraSchemaBookAuthorM2MAuthorBA struct { User ExtraSchemaUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaBookAuthorM2MAuthorBA represents a M2M join against "extra_schema.book_authors"
type ExtraSchemaBookAuthorM2MBookBA ¶
type ExtraSchemaBookAuthorM2MBookBA struct { Book ExtraSchemaBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaBookAuthorM2MBookBA represents a M2M join against "extra_schema.book_authors"
type ExtraSchemaBookAuthorParams ¶
type ExtraSchemaBookAuthorParams interface { GetAuthorID() *ExtraSchemaUserID GetBookID() *ExtraSchemaBookID GetPseudonym() *string }
ExtraSchemaBookAuthorParams represents common params for both insert and update of 'extra_schema.book_authors'.
type ExtraSchemaBookAuthorSelectConfig ¶
type ExtraSchemaBookAuthorSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaBookAuthorSelectConfigOption ¶
type ExtraSchemaBookAuthorSelectConfigOption func(*ExtraSchemaBookAuthorSelectConfig)
func WithExtraSchemaBookAuthorFilters ¶
func WithExtraSchemaBookAuthorFilters(filters map[string][]any) ExtraSchemaBookAuthorSelectConfigOption
WithExtraSchemaBookAuthorFilters 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 WithExtraSchemaBookAuthorHavingClause ¶
func WithExtraSchemaBookAuthorHavingClause(conditions map[string][]any) ExtraSchemaBookAuthorSelectConfigOption
WithExtraSchemaBookAuthorHavingClause 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 WithExtraSchemaBookAuthorJoin ¶
func WithExtraSchemaBookAuthorJoin(joins ExtraSchemaBookAuthorJoins) ExtraSchemaBookAuthorSelectConfigOption
WithExtraSchemaBookAuthorJoin joins with the given tables.
func WithExtraSchemaBookAuthorLimit ¶
func WithExtraSchemaBookAuthorLimit(limit int) ExtraSchemaBookAuthorSelectConfigOption
WithExtraSchemaBookAuthorLimit limits row selection.
func WithExtraSchemaBookAuthorOrderBy ¶
func WithExtraSchemaBookAuthorOrderBy(rows map[string]*Direction) ExtraSchemaBookAuthorSelectConfigOption
WithExtraSchemaBookAuthorOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaBookAuthorUpdateParams ¶
type ExtraSchemaBookAuthorUpdateParams struct { AuthorID *ExtraSchemaUserID `json:"authorID" nullable:"false"` // author_id BookID *ExtraSchemaBookID `json:"bookID" nullable:"false"` // book_id Pseudonym **string `json:"pseudonym"` // pseudonym }
ExtraSchemaBookAuthorUpdateParams represents update params for 'extra_schema.book_authors'.
func (ExtraSchemaBookAuthorUpdateParams) GetAuthorID ¶
func (p ExtraSchemaBookAuthorUpdateParams) GetAuthorID() *ExtraSchemaUserID
func (ExtraSchemaBookAuthorUpdateParams) GetBookID ¶
func (p ExtraSchemaBookAuthorUpdateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookAuthorUpdateParams) GetPseudonym ¶
func (p ExtraSchemaBookAuthorUpdateParams) GetPseudonym() *string
type ExtraSchemaBookAuthorsSurrogateKey ¶
type ExtraSchemaBookAuthorsSurrogateKey struct { BookAuthorsSurrogateKeyID ExtraSchemaBookAuthorsSurrogateKeyID `json:"bookAuthorsSurrogateKeyID" db:"book_authors_surrogate_key_id" required:"true" nullable:"false"` // book_authors_surrogate_key_id BookID ExtraSchemaBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id AuthorID ExtraSchemaUserID `json:"authorID" db:"author_id" required:"true" nullable:"false"` // author_id Pseudonym *string `json:"pseudonym" db:"pseudonym"` // pseudonym BooksJoin *[]ExtraSchemaBookAuthorsSurrogateKeyM2MBookBASK `json:"-" db:"book_authors_surrogate_key_books"` // M2M book_authors_surrogate_key AuthorsJoin *[]ExtraSchemaBookAuthorsSurrogateKeyM2MAuthorBASK `json:"-" db:"book_authors_surrogate_key_authors"` // M2M book_authors_surrogate_key }
ExtraSchemaBookAuthorsSurrogateKey represents a row from 'extra_schema.book_authors_surrogate_key'.
func CreateExtraSchemaBookAuthorsSurrogateKey ¶
func CreateExtraSchemaBookAuthorsSurrogateKey(ctx context.Context, db DB, params *ExtraSchemaBookAuthorsSurrogateKeyCreateParams) (*ExtraSchemaBookAuthorsSurrogateKey, error)
CreateExtraSchemaBookAuthorsSurrogateKey creates a new ExtraSchemaBookAuthorsSurrogateKey in the database with the given params.
func ExtraSchemaBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID ¶
func ExtraSchemaBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID(ctx context.Context, db DB, bookAuthorsSurrogateKeyID ExtraSchemaBookAuthorsSurrogateKeyID, opts ...ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption) (*ExtraSchemaBookAuthorsSurrogateKey, error)
ExtraSchemaBookAuthorsSurrogateKeyByBookAuthorsSurrogateKeyID retrieves a row from 'extra_schema.book_authors_surrogate_key' as a ExtraSchemaBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_pkey'.
func ExtraSchemaBookAuthorsSurrogateKeyByBookIDAuthorID ¶
func ExtraSchemaBookAuthorsSurrogateKeyByBookIDAuthorID(ctx context.Context, db DB, bookID ExtraSchemaBookID, authorID ExtraSchemaUserID, opts ...ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption) (*ExtraSchemaBookAuthorsSurrogateKey, error)
ExtraSchemaBookAuthorsSurrogateKeyByBookIDAuthorID retrieves a row from 'extra_schema.book_authors_surrogate_key' as a ExtraSchemaBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_book_id_author_id_key'.
func ExtraSchemaBookAuthorsSurrogateKeyPaginated ¶
func ExtraSchemaBookAuthorsSurrogateKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption) ([]ExtraSchemaBookAuthorsSurrogateKey, error)
ExtraSchemaBookAuthorsSurrogateKeyPaginated returns a cursor-paginated list of ExtraSchemaBookAuthorsSurrogateKey. At least one cursor is required.
func ExtraSchemaBookAuthorsSurrogateKeysByAuthorID ¶
func ExtraSchemaBookAuthorsSurrogateKeysByAuthorID(ctx context.Context, db DB, authorID ExtraSchemaUserID, opts ...ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption) ([]ExtraSchemaBookAuthorsSurrogateKey, error)
ExtraSchemaBookAuthorsSurrogateKeysByAuthorID retrieves a row from 'extra_schema.book_authors_surrogate_key' as a ExtraSchemaBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_book_id_author_id_key'.
func ExtraSchemaBookAuthorsSurrogateKeysByBookID ¶
func ExtraSchemaBookAuthorsSurrogateKeysByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, opts ...ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption) ([]ExtraSchemaBookAuthorsSurrogateKey, error)
ExtraSchemaBookAuthorsSurrogateKeysByBookID retrieves a row from 'extra_schema.book_authors_surrogate_key' as a ExtraSchemaBookAuthorsSurrogateKey.
Generated from index 'book_authors_surrogate_key_book_id_author_id_key'.
func (*ExtraSchemaBookAuthorsSurrogateKey) Delete ¶
func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaBookAuthorsSurrogateKey from the database.
func (*ExtraSchemaBookAuthorsSurrogateKey) FKBook_BookID ¶
func (esbask *ExtraSchemaBookAuthorsSurrogateKey) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
FKBook_BookID returns the Book associated with the ExtraSchemaBookAuthorsSurrogateKey's (BookID).
Generated from foreign key 'book_authors_surrogate_key_book_id_fkey'.
func (*ExtraSchemaBookAuthorsSurrogateKey) FKUser_AuthorID ¶
func (esbask *ExtraSchemaBookAuthorsSurrogateKey) FKUser_AuthorID(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_AuthorID returns the User associated with the ExtraSchemaBookAuthorsSurrogateKey's (AuthorID).
Generated from foreign key 'book_authors_surrogate_key_author_id_fkey'.
func (*ExtraSchemaBookAuthorsSurrogateKey) Insert ¶
func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Insert(ctx context.Context, db DB) (*ExtraSchemaBookAuthorsSurrogateKey, error)
Insert inserts the ExtraSchemaBookAuthorsSurrogateKey to the database.
func (*ExtraSchemaBookAuthorsSurrogateKey) SetUpdateParams ¶
func (esbask *ExtraSchemaBookAuthorsSurrogateKey) SetUpdateParams(params *ExtraSchemaBookAuthorsSurrogateKeyUpdateParams)
SetUpdateParams updates extra_schema.book_authors_surrogate_key struct fields with the specified params.
func (*ExtraSchemaBookAuthorsSurrogateKey) Update ¶
func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Update(ctx context.Context, db DB) (*ExtraSchemaBookAuthorsSurrogateKey, error)
Update updates a ExtraSchemaBookAuthorsSurrogateKey in the database.
func (*ExtraSchemaBookAuthorsSurrogateKey) Upsert ¶
func (esbask *ExtraSchemaBookAuthorsSurrogateKey) Upsert(ctx context.Context, db DB, params *ExtraSchemaBookAuthorsSurrogateKeyCreateParams) (*ExtraSchemaBookAuthorsSurrogateKey, error)
Upsert upserts a ExtraSchemaBookAuthorsSurrogateKey in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaBookAuthorsSurrogateKeyCreateParams ¶
type ExtraSchemaBookAuthorsSurrogateKeyCreateParams struct { AuthorID ExtraSchemaUserID `json:"authorID" required:"true" nullable:"false"` // author_id BookID ExtraSchemaBookID `json:"bookID" required:"true" nullable:"false"` // book_id Pseudonym *string `json:"pseudonym"` // pseudonym }
ExtraSchemaBookAuthorsSurrogateKeyCreateParams represents insert params for 'extra_schema.book_authors_surrogate_key'.
func (ExtraSchemaBookAuthorsSurrogateKeyCreateParams) GetAuthorID ¶
func (p ExtraSchemaBookAuthorsSurrogateKeyCreateParams) GetAuthorID() *ExtraSchemaUserID
func (ExtraSchemaBookAuthorsSurrogateKeyCreateParams) GetBookID ¶
func (p ExtraSchemaBookAuthorsSurrogateKeyCreateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookAuthorsSurrogateKeyCreateParams) GetPseudonym ¶
func (p ExtraSchemaBookAuthorsSurrogateKeyCreateParams) GetPseudonym() *string
type ExtraSchemaBookAuthorsSurrogateKeyID ¶
type ExtraSchemaBookAuthorsSurrogateKeyID int
type ExtraSchemaBookAuthorsSurrogateKeyM2MAuthorBASK ¶
type ExtraSchemaBookAuthorsSurrogateKeyM2MAuthorBASK struct { User ExtraSchemaUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaBookAuthorsSurrogateKeyM2MAuthorBASK represents a M2M join against "extra_schema.book_authors_surrogate_key"
type ExtraSchemaBookAuthorsSurrogateKeyM2MBookBASK ¶
type ExtraSchemaBookAuthorsSurrogateKeyM2MBookBASK struct { Book ExtraSchemaBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaBookAuthorsSurrogateKeyM2MBookBASK represents a M2M join against "extra_schema.book_authors_surrogate_key"
type ExtraSchemaBookAuthorsSurrogateKeyParams ¶
type ExtraSchemaBookAuthorsSurrogateKeyParams interface { GetAuthorID() *ExtraSchemaUserID GetBookID() *ExtraSchemaBookID GetPseudonym() *string }
ExtraSchemaBookAuthorsSurrogateKeyParams represents common params for both insert and update of 'extra_schema.book_authors_surrogate_key'.
type ExtraSchemaBookAuthorsSurrogateKeySelectConfig ¶
type ExtraSchemaBookAuthorsSurrogateKeySelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption ¶
type ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption func(*ExtraSchemaBookAuthorsSurrogateKeySelectConfig)
func WithExtraSchemaBookAuthorsSurrogateKeyFilters ¶
func WithExtraSchemaBookAuthorsSurrogateKeyFilters(filters map[string][]any) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
WithExtraSchemaBookAuthorsSurrogateKeyFilters 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 WithExtraSchemaBookAuthorsSurrogateKeyHavingClause ¶
func WithExtraSchemaBookAuthorsSurrogateKeyHavingClause(conditions map[string][]any) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
WithExtraSchemaBookAuthorsSurrogateKeyHavingClause 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 WithExtraSchemaBookAuthorsSurrogateKeyJoin ¶
func WithExtraSchemaBookAuthorsSurrogateKeyJoin(joins ExtraSchemaBookAuthorsSurrogateKeyJoins) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
WithExtraSchemaBookAuthorsSurrogateKeyJoin joins with the given tables.
func WithExtraSchemaBookAuthorsSurrogateKeyLimit ¶
func WithExtraSchemaBookAuthorsSurrogateKeyLimit(limit int) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
WithExtraSchemaBookAuthorsSurrogateKeyLimit limits row selection.
func WithExtraSchemaBookAuthorsSurrogateKeyOrderBy ¶
func WithExtraSchemaBookAuthorsSurrogateKeyOrderBy(rows map[string]*Direction) ExtraSchemaBookAuthorsSurrogateKeySelectConfigOption
WithExtraSchemaBookAuthorsSurrogateKeyOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaBookAuthorsSurrogateKeyUpdateParams ¶
type ExtraSchemaBookAuthorsSurrogateKeyUpdateParams struct { AuthorID *ExtraSchemaUserID `json:"authorID" nullable:"false"` // author_id BookID *ExtraSchemaBookID `json:"bookID" nullable:"false"` // book_id Pseudonym **string `json:"pseudonym"` // pseudonym }
ExtraSchemaBookAuthorsSurrogateKeyUpdateParams represents update params for 'extra_schema.book_authors_surrogate_key'.
func (ExtraSchemaBookAuthorsSurrogateKeyUpdateParams) GetAuthorID ¶
func (p ExtraSchemaBookAuthorsSurrogateKeyUpdateParams) GetAuthorID() *ExtraSchemaUserID
func (ExtraSchemaBookAuthorsSurrogateKeyUpdateParams) GetBookID ¶
func (p ExtraSchemaBookAuthorsSurrogateKeyUpdateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookAuthorsSurrogateKeyUpdateParams) GetPseudonym ¶
func (p ExtraSchemaBookAuthorsSurrogateKeyUpdateParams) GetPseudonym() *string
type ExtraSchemaBookCreateParams ¶
type ExtraSchemaBookCreateParams struct {
Name string `json:"name" required:"true" nullable:"false"` // name
}
ExtraSchemaBookCreateParams represents insert params for 'extra_schema.books'.
func (ExtraSchemaBookCreateParams) GetName ¶
func (p ExtraSchemaBookCreateParams) GetName() *string
type ExtraSchemaBookID ¶
type ExtraSchemaBookID int
type ExtraSchemaBookJoins ¶
type ExtraSchemaBookJoins 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 ExtraSchemaBookM2MAuthorBA ¶
type ExtraSchemaBookM2MAuthorBA struct { User ExtraSchemaUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaBookM2MAuthorBA represents a M2M join against "extra_schema.book_authors"
type ExtraSchemaBookM2MAuthorBASK ¶
type ExtraSchemaBookM2MAuthorBASK struct { User ExtraSchemaUser `json:"user" db:"users" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaBookM2MAuthorBASK represents a M2M join against "extra_schema.book_authors_surrogate_key"
type ExtraSchemaBookParams ¶
type ExtraSchemaBookParams interface {
GetName() *string
}
ExtraSchemaBookParams represents common params for both insert and update of 'extra_schema.books'.
type ExtraSchemaBookReview ¶
type ExtraSchemaBookReview struct { BookReviewID ExtraSchemaBookReviewID `json:"bookReviewID" db:"book_review_id" required:"true" nullable:"false"` // book_review_id BookID ExtraSchemaBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id Reviewer ExtraSchemaUserID `json:"reviewer" db:"reviewer" required:"true" nullable:"false"` // reviewer BookJoin *ExtraSchemaBook `json:"-" db:"book_book_id"` // O2O books (generated from M2O) UserJoin *ExtraSchemaUser `json:"-" db:"user_reviewer"` // O2O users (generated from M2O) }
ExtraSchemaBookReview represents a row from 'extra_schema.book_reviews'.
func CreateExtraSchemaBookReview ¶
func CreateExtraSchemaBookReview(ctx context.Context, db DB, params *ExtraSchemaBookReviewCreateParams) (*ExtraSchemaBookReview, error)
CreateExtraSchemaBookReview creates a new ExtraSchemaBookReview in the database with the given params.
func ExtraSchemaBookReviewByBookReviewID ¶
func ExtraSchemaBookReviewByBookReviewID(ctx context.Context, db DB, bookReviewID ExtraSchemaBookReviewID, opts ...ExtraSchemaBookReviewSelectConfigOption) (*ExtraSchemaBookReview, error)
ExtraSchemaBookReviewByBookReviewID retrieves a row from 'extra_schema.book_reviews' as a ExtraSchemaBookReview.
Generated from index 'book_reviews_pkey'.
func ExtraSchemaBookReviewByReviewerBookID ¶
func ExtraSchemaBookReviewByReviewerBookID(ctx context.Context, db DB, reviewer ExtraSchemaUserID, bookID ExtraSchemaBookID, opts ...ExtraSchemaBookReviewSelectConfigOption) (*ExtraSchemaBookReview, error)
ExtraSchemaBookReviewByReviewerBookID retrieves a row from 'extra_schema.book_reviews' as a ExtraSchemaBookReview.
Generated from index 'book_reviews_reviewer_book_id_key'.
func ExtraSchemaBookReviewPaginated ¶
func ExtraSchemaBookReviewPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaBookReviewSelectConfigOption) ([]ExtraSchemaBookReview, error)
ExtraSchemaBookReviewPaginated returns a cursor-paginated list of ExtraSchemaBookReview. At least one cursor is required.
func ExtraSchemaBookReviewsByBookID ¶
func ExtraSchemaBookReviewsByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, opts ...ExtraSchemaBookReviewSelectConfigOption) ([]ExtraSchemaBookReview, error)
ExtraSchemaBookReviewsByBookID retrieves a row from 'extra_schema.book_reviews' as a ExtraSchemaBookReview.
Generated from index 'book_reviews_reviewer_book_id_key'.
func ExtraSchemaBookReviewsByReviewer ¶
func ExtraSchemaBookReviewsByReviewer(ctx context.Context, db DB, reviewer ExtraSchemaUserID, opts ...ExtraSchemaBookReviewSelectConfigOption) ([]ExtraSchemaBookReview, error)
ExtraSchemaBookReviewsByReviewer retrieves a row from 'extra_schema.book_reviews' as a ExtraSchemaBookReview.
Generated from index 'book_reviews_reviewer_book_id_key'.
func (*ExtraSchemaBookReview) Delete ¶
func (esbr *ExtraSchemaBookReview) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaBookReview from the database.
func (*ExtraSchemaBookReview) FKBook_BookID ¶
func (esbr *ExtraSchemaBookReview) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
FKBook_BookID returns the Book associated with the ExtraSchemaBookReview's (BookID).
Generated from foreign key 'book_reviews_book_id_fkey'.
func (*ExtraSchemaBookReview) FKUser_Reviewer ¶
func (esbr *ExtraSchemaBookReview) FKUser_Reviewer(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_Reviewer returns the User associated with the ExtraSchemaBookReview's (Reviewer).
Generated from foreign key 'book_reviews_reviewer_fkey'.
func (*ExtraSchemaBookReview) Insert ¶
func (esbr *ExtraSchemaBookReview) Insert(ctx context.Context, db DB) (*ExtraSchemaBookReview, error)
Insert inserts the ExtraSchemaBookReview to the database.
func (*ExtraSchemaBookReview) SetUpdateParams ¶
func (esbr *ExtraSchemaBookReview) SetUpdateParams(params *ExtraSchemaBookReviewUpdateParams)
SetUpdateParams updates extra_schema.book_reviews struct fields with the specified params.
func (*ExtraSchemaBookReview) Update ¶
func (esbr *ExtraSchemaBookReview) Update(ctx context.Context, db DB) (*ExtraSchemaBookReview, error)
Update updates a ExtraSchemaBookReview in the database.
func (*ExtraSchemaBookReview) Upsert ¶
func (esbr *ExtraSchemaBookReview) Upsert(ctx context.Context, db DB, params *ExtraSchemaBookReviewCreateParams) (*ExtraSchemaBookReview, error)
Upsert upserts a ExtraSchemaBookReview in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaBookReviewCreateParams ¶
type ExtraSchemaBookReviewCreateParams struct { BookID ExtraSchemaBookID `json:"bookID" required:"true" nullable:"false"` // book_id Reviewer ExtraSchemaUserID `json:"reviewer" required:"true" nullable:"false"` // reviewer }
ExtraSchemaBookReviewCreateParams represents insert params for 'extra_schema.book_reviews'.
func (ExtraSchemaBookReviewCreateParams) GetBookID ¶
func (p ExtraSchemaBookReviewCreateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookReviewCreateParams) GetReviewer ¶
func (p ExtraSchemaBookReviewCreateParams) GetReviewer() *ExtraSchemaUserID
type ExtraSchemaBookReviewID ¶
type ExtraSchemaBookReviewID int
type ExtraSchemaBookReviewParams ¶
type ExtraSchemaBookReviewParams interface { GetBookID() *ExtraSchemaBookID GetReviewer() *ExtraSchemaUserID }
ExtraSchemaBookReviewParams represents common params for both insert and update of 'extra_schema.book_reviews'.
type ExtraSchemaBookReviewSelectConfig ¶
type ExtraSchemaBookReviewSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaBookReviewSelectConfigOption ¶
type ExtraSchemaBookReviewSelectConfigOption func(*ExtraSchemaBookReviewSelectConfig)
func WithExtraSchemaBookReviewFilters ¶
func WithExtraSchemaBookReviewFilters(filters map[string][]any) ExtraSchemaBookReviewSelectConfigOption
WithExtraSchemaBookReviewFilters 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 WithExtraSchemaBookReviewHavingClause ¶
func WithExtraSchemaBookReviewHavingClause(conditions map[string][]any) ExtraSchemaBookReviewSelectConfigOption
WithExtraSchemaBookReviewHavingClause 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 WithExtraSchemaBookReviewJoin ¶
func WithExtraSchemaBookReviewJoin(joins ExtraSchemaBookReviewJoins) ExtraSchemaBookReviewSelectConfigOption
WithExtraSchemaBookReviewJoin joins with the given tables.
func WithExtraSchemaBookReviewLimit ¶
func WithExtraSchemaBookReviewLimit(limit int) ExtraSchemaBookReviewSelectConfigOption
WithExtraSchemaBookReviewLimit limits row selection.
func WithExtraSchemaBookReviewOrderBy ¶
func WithExtraSchemaBookReviewOrderBy(rows map[string]*Direction) ExtraSchemaBookReviewSelectConfigOption
WithExtraSchemaBookReviewOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaBookReviewUpdateParams ¶
type ExtraSchemaBookReviewUpdateParams struct { BookID *ExtraSchemaBookID `json:"bookID" nullable:"false"` // book_id Reviewer *ExtraSchemaUserID `json:"reviewer" nullable:"false"` // reviewer }
ExtraSchemaBookReviewUpdateParams represents update params for 'extra_schema.book_reviews'.
func (ExtraSchemaBookReviewUpdateParams) GetBookID ¶
func (p ExtraSchemaBookReviewUpdateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookReviewUpdateParams) GetReviewer ¶
func (p ExtraSchemaBookReviewUpdateParams) GetReviewer() *ExtraSchemaUserID
type ExtraSchemaBookSelectConfig ¶
type ExtraSchemaBookSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaBookSelectConfigOption ¶
type ExtraSchemaBookSelectConfigOption func(*ExtraSchemaBookSelectConfig)
func WithExtraSchemaBookFilters ¶
func WithExtraSchemaBookFilters(filters map[string][]any) ExtraSchemaBookSelectConfigOption
WithExtraSchemaBookFilters 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 WithExtraSchemaBookHavingClause ¶
func WithExtraSchemaBookHavingClause(conditions map[string][]any) ExtraSchemaBookSelectConfigOption
WithExtraSchemaBookHavingClause 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 WithExtraSchemaBookJoin ¶
func WithExtraSchemaBookJoin(joins ExtraSchemaBookJoins) ExtraSchemaBookSelectConfigOption
WithExtraSchemaBookJoin joins with the given tables.
func WithExtraSchemaBookLimit ¶
func WithExtraSchemaBookLimit(limit int) ExtraSchemaBookSelectConfigOption
WithExtraSchemaBookLimit limits row selection.
func WithExtraSchemaBookOrderBy ¶
func WithExtraSchemaBookOrderBy(rows map[string]*Direction) ExtraSchemaBookSelectConfigOption
WithExtraSchemaBookOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaBookSeller ¶
type ExtraSchemaBookSeller struct { BookID ExtraSchemaBookID `json:"bookID" db:"book_id" required:"true" nullable:"false"` // book_id Seller ExtraSchemaUserID `json:"seller" db:"seller" required:"true" nullable:"false"` // seller SellersJoin *[]ExtraSchemaUser `json:"-" db:"book_sellers_sellers"` // M2M book_sellers BooksJoin *[]ExtraSchemaBook `json:"-" db:"book_sellers_books"` // M2M book_sellers }
ExtraSchemaBookSeller represents a row from 'extra_schema.book_sellers'.
func CreateExtraSchemaBookSeller ¶
func CreateExtraSchemaBookSeller(ctx context.Context, db DB, params *ExtraSchemaBookSellerCreateParams) (*ExtraSchemaBookSeller, error)
CreateExtraSchemaBookSeller creates a new ExtraSchemaBookSeller in the database with the given params.
func ExtraSchemaBookSellerPaginated ¶
func ExtraSchemaBookSellerPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaBookSellerSelectConfigOption) ([]ExtraSchemaBookSeller, error)
ExtraSchemaBookSellerPaginated returns a cursor-paginated list of ExtraSchemaBookSeller. At least one cursor is required.
func ExtraSchemaBookSellersByBookID ¶
func ExtraSchemaBookSellersByBookID(ctx context.Context, db DB, bookID ExtraSchemaBookID, opts ...ExtraSchemaBookSellerSelectConfigOption) ([]ExtraSchemaBookSeller, error)
ExtraSchemaBookSellersByBookID retrieves a row from 'extra_schema.book_sellers' as a ExtraSchemaBookSeller.
Generated from index 'book_sellers_pkey'.
func ExtraSchemaBookSellersByBookIDSeller ¶
func ExtraSchemaBookSellersByBookIDSeller(ctx context.Context, db DB, bookID ExtraSchemaBookID, seller ExtraSchemaUserID, opts ...ExtraSchemaBookSellerSelectConfigOption) ([]ExtraSchemaBookSeller, error)
ExtraSchemaBookSellersByBookIDSeller retrieves a row from 'extra_schema.book_sellers' as a ExtraSchemaBookSeller.
Generated from index 'book_sellers_book_id_seller_idx'.
func ExtraSchemaBookSellersBySeller ¶
func ExtraSchemaBookSellersBySeller(ctx context.Context, db DB, seller ExtraSchemaUserID, opts ...ExtraSchemaBookSellerSelectConfigOption) ([]ExtraSchemaBookSeller, error)
ExtraSchemaBookSellersBySeller retrieves a row from 'extra_schema.book_sellers' as a ExtraSchemaBookSeller.
Generated from index 'book_sellers_pkey'.
func ExtraSchemaBookSellersBySellerBookID ¶
func ExtraSchemaBookSellersBySellerBookID(ctx context.Context, db DB, seller ExtraSchemaUserID, bookID ExtraSchemaBookID, opts ...ExtraSchemaBookSellerSelectConfigOption) ([]ExtraSchemaBookSeller, error)
ExtraSchemaBookSellersBySellerBookID retrieves a row from 'extra_schema.book_sellers' as a ExtraSchemaBookSeller.
Generated from index 'book_sellers_seller_book_id_idx'.
func (*ExtraSchemaBookSeller) Delete ¶
func (esbs *ExtraSchemaBookSeller) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaBookSeller from the database.
func (*ExtraSchemaBookSeller) FKBook_BookID ¶
func (esbs *ExtraSchemaBookSeller) FKBook_BookID(ctx context.Context, db DB) (*ExtraSchemaBook, error)
FKBook_BookID returns the Book associated with the ExtraSchemaBookSeller's (BookID).
Generated from foreign key 'book_sellers_book_id_fkey'.
func (*ExtraSchemaBookSeller) FKUser_Seller ¶
func (esbs *ExtraSchemaBookSeller) FKUser_Seller(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_Seller returns the User associated with the ExtraSchemaBookSeller's (Seller).
Generated from foreign key 'book_sellers_seller_fkey'.
func (*ExtraSchemaBookSeller) Insert ¶
func (esbs *ExtraSchemaBookSeller) Insert(ctx context.Context, db DB) (*ExtraSchemaBookSeller, error)
Insert inserts the ExtraSchemaBookSeller to the database.
func (*ExtraSchemaBookSeller) SetUpdateParams ¶
func (esbs *ExtraSchemaBookSeller) SetUpdateParams(params *ExtraSchemaBookSellerUpdateParams)
SetUpdateParams updates extra_schema.book_sellers struct fields with the specified params.
type ExtraSchemaBookSellerCreateParams ¶
type ExtraSchemaBookSellerCreateParams struct { BookID ExtraSchemaBookID `json:"bookID" required:"true" nullable:"false"` // book_id Seller ExtraSchemaUserID `json:"seller" required:"true" nullable:"false"` // seller }
ExtraSchemaBookSellerCreateParams represents insert params for 'extra_schema.book_sellers'.
func (ExtraSchemaBookSellerCreateParams) GetBookID ¶
func (p ExtraSchemaBookSellerCreateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookSellerCreateParams) GetSeller ¶
func (p ExtraSchemaBookSellerCreateParams) GetSeller() *ExtraSchemaUserID
type ExtraSchemaBookSellerParams ¶
type ExtraSchemaBookSellerParams interface { GetBookID() *ExtraSchemaBookID GetSeller() *ExtraSchemaUserID }
ExtraSchemaBookSellerParams represents common params for both insert and update of 'extra_schema.book_sellers'.
type ExtraSchemaBookSellerSelectConfig ¶
type ExtraSchemaBookSellerSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaBookSellerSelectConfigOption ¶
type ExtraSchemaBookSellerSelectConfigOption func(*ExtraSchemaBookSellerSelectConfig)
func WithExtraSchemaBookSellerFilters ¶
func WithExtraSchemaBookSellerFilters(filters map[string][]any) ExtraSchemaBookSellerSelectConfigOption
WithExtraSchemaBookSellerFilters 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 WithExtraSchemaBookSellerHavingClause ¶
func WithExtraSchemaBookSellerHavingClause(conditions map[string][]any) ExtraSchemaBookSellerSelectConfigOption
WithExtraSchemaBookSellerHavingClause 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 WithExtraSchemaBookSellerJoin ¶
func WithExtraSchemaBookSellerJoin(joins ExtraSchemaBookSellerJoins) ExtraSchemaBookSellerSelectConfigOption
WithExtraSchemaBookSellerJoin joins with the given tables.
func WithExtraSchemaBookSellerLimit ¶
func WithExtraSchemaBookSellerLimit(limit int) ExtraSchemaBookSellerSelectConfigOption
WithExtraSchemaBookSellerLimit limits row selection.
func WithExtraSchemaBookSellerOrderBy ¶
func WithExtraSchemaBookSellerOrderBy(rows map[string]*Direction) ExtraSchemaBookSellerSelectConfigOption
WithExtraSchemaBookSellerOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaBookSellerUpdateParams ¶
type ExtraSchemaBookSellerUpdateParams struct { BookID *ExtraSchemaBookID `json:"bookID" nullable:"false"` // book_id Seller *ExtraSchemaUserID `json:"seller" nullable:"false"` // seller }
ExtraSchemaBookSellerUpdateParams represents update params for 'extra_schema.book_sellers'.
func (ExtraSchemaBookSellerUpdateParams) GetBookID ¶
func (p ExtraSchemaBookSellerUpdateParams) GetBookID() *ExtraSchemaBookID
func (ExtraSchemaBookSellerUpdateParams) GetSeller ¶
func (p ExtraSchemaBookSellerUpdateParams) GetSeller() *ExtraSchemaUserID
type ExtraSchemaBookUpdateParams ¶
type ExtraSchemaBookUpdateParams struct {
Name *string `json:"name" nullable:"false"` // name
}
ExtraSchemaBookUpdateParams represents update params for 'extra_schema.books'.
func (ExtraSchemaBookUpdateParams) GetName ¶
func (p ExtraSchemaBookUpdateParams) GetName() *string
type ExtraSchemaDemoWorkItem ¶
type ExtraSchemaDemoWorkItem struct { WorkItemID ExtraSchemaWorkItemID `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 *ExtraSchemaWorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (inferred) }
ExtraSchemaDemoWorkItem represents a row from 'extra_schema.demo_work_items'.
func CreateExtraSchemaDemoWorkItem ¶
func CreateExtraSchemaDemoWorkItem(ctx context.Context, db DB, params *ExtraSchemaDemoWorkItemCreateParams) (*ExtraSchemaDemoWorkItem, error)
CreateExtraSchemaDemoWorkItem creates a new ExtraSchemaDemoWorkItem in the database with the given params.
func ExtraSchemaDemoWorkItemByWorkItemID ¶
func ExtraSchemaDemoWorkItemByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, opts ...ExtraSchemaDemoWorkItemSelectConfigOption) (*ExtraSchemaDemoWorkItem, error)
ExtraSchemaDemoWorkItemByWorkItemID retrieves a row from 'extra_schema.demo_work_items' as a ExtraSchemaDemoWorkItem.
Generated from index 'demo_work_items_pkey'.
func ExtraSchemaDemoWorkItemPaginated ¶
func ExtraSchemaDemoWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaDemoWorkItemSelectConfigOption) ([]ExtraSchemaDemoWorkItem, error)
ExtraSchemaDemoWorkItemPaginated returns a cursor-paginated list of ExtraSchemaDemoWorkItem. At least one cursor is required.
func (*ExtraSchemaDemoWorkItem) Delete ¶
func (esdwi *ExtraSchemaDemoWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaDemoWorkItem from the database.
func (*ExtraSchemaDemoWorkItem) FKWorkItem_WorkItemID ¶
func (esdwi *ExtraSchemaDemoWorkItem) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the ExtraSchemaDemoWorkItem's (WorkItemID).
Generated from foreign key 'demo_work_items_work_item_id_fkey'.
func (*ExtraSchemaDemoWorkItem) Insert ¶
func (esdwi *ExtraSchemaDemoWorkItem) Insert(ctx context.Context, db DB) (*ExtraSchemaDemoWorkItem, error)
Insert inserts the ExtraSchemaDemoWorkItem to the database.
func (*ExtraSchemaDemoWorkItem) SetUpdateParams ¶
func (esdwi *ExtraSchemaDemoWorkItem) SetUpdateParams(params *ExtraSchemaDemoWorkItemUpdateParams)
SetUpdateParams updates extra_schema.demo_work_items struct fields with the specified params.
func (*ExtraSchemaDemoWorkItem) Update ¶
func (esdwi *ExtraSchemaDemoWorkItem) Update(ctx context.Context, db DB) (*ExtraSchemaDemoWorkItem, error)
Update updates a ExtraSchemaDemoWorkItem in the database.
func (*ExtraSchemaDemoWorkItem) Upsert ¶
func (esdwi *ExtraSchemaDemoWorkItem) Upsert(ctx context.Context, db DB, params *ExtraSchemaDemoWorkItemCreateParams) (*ExtraSchemaDemoWorkItem, error)
Upsert upserts a ExtraSchemaDemoWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaDemoWorkItemCreateParams ¶
type ExtraSchemaDemoWorkItemCreateParams struct { Checked bool `json:"checked" required:"true" nullable:"false"` // checked WorkItemID ExtraSchemaWorkItemID `json:"-" required:"true" nullable:"false"` // work_item_id }
ExtraSchemaDemoWorkItemCreateParams represents insert params for 'extra_schema.demo_work_items'.
func (ExtraSchemaDemoWorkItemCreateParams) GetChecked ¶
func (p ExtraSchemaDemoWorkItemCreateParams) GetChecked() *bool
type ExtraSchemaDemoWorkItemJoins ¶
type ExtraSchemaDemoWorkItemJoins struct {
WorkItem bool `json:"workItem" required:"true" nullable:"false"` // O2O work_items
}
type ExtraSchemaDemoWorkItemParams ¶
type ExtraSchemaDemoWorkItemParams interface {
GetChecked() *bool
}
ExtraSchemaDemoWorkItemParams represents common params for both insert and update of 'extra_schema.demo_work_items'.
type ExtraSchemaDemoWorkItemSelectConfig ¶
type ExtraSchemaDemoWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaDemoWorkItemSelectConfigOption ¶
type ExtraSchemaDemoWorkItemSelectConfigOption func(*ExtraSchemaDemoWorkItemSelectConfig)
func WithExtraSchemaDemoWorkItemFilters ¶
func WithExtraSchemaDemoWorkItemFilters(filters map[string][]any) ExtraSchemaDemoWorkItemSelectConfigOption
WithExtraSchemaDemoWorkItemFilters 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 WithExtraSchemaDemoWorkItemHavingClause ¶
func WithExtraSchemaDemoWorkItemHavingClause(conditions map[string][]any) ExtraSchemaDemoWorkItemSelectConfigOption
WithExtraSchemaDemoWorkItemHavingClause 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 WithExtraSchemaDemoWorkItemJoin ¶
func WithExtraSchemaDemoWorkItemJoin(joins ExtraSchemaDemoWorkItemJoins) ExtraSchemaDemoWorkItemSelectConfigOption
WithExtraSchemaDemoWorkItemJoin joins with the given tables.
func WithExtraSchemaDemoWorkItemLimit ¶
func WithExtraSchemaDemoWorkItemLimit(limit int) ExtraSchemaDemoWorkItemSelectConfigOption
WithExtraSchemaDemoWorkItemLimit limits row selection.
func WithExtraSchemaDemoWorkItemOrderBy ¶
func WithExtraSchemaDemoWorkItemOrderBy(rows map[string]*Direction) ExtraSchemaDemoWorkItemSelectConfigOption
WithExtraSchemaDemoWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaDemoWorkItemUpdateParams ¶
type ExtraSchemaDemoWorkItemUpdateParams struct {
Checked *bool `json:"checked" nullable:"false"` // checked
}
ExtraSchemaDemoWorkItemUpdateParams represents update params for 'extra_schema.demo_work_items'.
func (ExtraSchemaDemoWorkItemUpdateParams) GetChecked ¶
func (p ExtraSchemaDemoWorkItemUpdateParams) GetChecked() *bool
type ExtraSchemaDummyJoin ¶
type ExtraSchemaDummyJoin struct { DummyJoinID ExtraSchemaDummyJoinID `json:"dummyJoinID" db:"dummy_join_id" required:"true" nullable:"false"` // dummy_join_id Name *string `json:"name" db:"name"` // name }
ExtraSchemaDummyJoin represents a row from 'extra_schema.dummy_join'.
func CreateExtraSchemaDummyJoin ¶
func CreateExtraSchemaDummyJoin(ctx context.Context, db DB, params *ExtraSchemaDummyJoinCreateParams) (*ExtraSchemaDummyJoin, error)
CreateExtraSchemaDummyJoin creates a new ExtraSchemaDummyJoin in the database with the given params.
func ExtraSchemaDummyJoinByDummyJoinID ¶
func ExtraSchemaDummyJoinByDummyJoinID(ctx context.Context, db DB, dummyJoinID ExtraSchemaDummyJoinID, opts ...ExtraSchemaDummyJoinSelectConfigOption) (*ExtraSchemaDummyJoin, error)
ExtraSchemaDummyJoinByDummyJoinID retrieves a row from 'extra_schema.dummy_join' as a ExtraSchemaDummyJoin.
Generated from index 'dummy_join_pkey'.
func ExtraSchemaDummyJoinPaginated ¶
func ExtraSchemaDummyJoinPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaDummyJoinSelectConfigOption) ([]ExtraSchemaDummyJoin, error)
ExtraSchemaDummyJoinPaginated returns a cursor-paginated list of ExtraSchemaDummyJoin. At least one cursor is required.
func (*ExtraSchemaDummyJoin) Delete ¶
func (esdj *ExtraSchemaDummyJoin) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaDummyJoin from the database.
func (*ExtraSchemaDummyJoin) Insert ¶
func (esdj *ExtraSchemaDummyJoin) Insert(ctx context.Context, db DB) (*ExtraSchemaDummyJoin, error)
Insert inserts the ExtraSchemaDummyJoin to the database.
func (*ExtraSchemaDummyJoin) SetUpdateParams ¶
func (esdj *ExtraSchemaDummyJoin) SetUpdateParams(params *ExtraSchemaDummyJoinUpdateParams)
SetUpdateParams updates extra_schema.dummy_join struct fields with the specified params.
func (*ExtraSchemaDummyJoin) Update ¶
func (esdj *ExtraSchemaDummyJoin) Update(ctx context.Context, db DB) (*ExtraSchemaDummyJoin, error)
Update updates a ExtraSchemaDummyJoin in the database.
func (*ExtraSchemaDummyJoin) Upsert ¶
func (esdj *ExtraSchemaDummyJoin) Upsert(ctx context.Context, db DB, params *ExtraSchemaDummyJoinCreateParams) (*ExtraSchemaDummyJoin, error)
Upsert upserts a ExtraSchemaDummyJoin in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaDummyJoinCreateParams ¶
type ExtraSchemaDummyJoinCreateParams struct {
Name *string `json:"name"` // name
}
ExtraSchemaDummyJoinCreateParams represents insert params for 'extra_schema.dummy_join'.
func (ExtraSchemaDummyJoinCreateParams) GetName ¶
func (p ExtraSchemaDummyJoinCreateParams) GetName() *string
type ExtraSchemaDummyJoinID ¶
type ExtraSchemaDummyJoinID int
type ExtraSchemaDummyJoinJoins ¶
type ExtraSchemaDummyJoinJoins struct { }
type ExtraSchemaDummyJoinParams ¶
type ExtraSchemaDummyJoinParams interface {
GetName() *string
}
ExtraSchemaDummyJoinParams represents common params for both insert and update of 'extra_schema.dummy_join'.
type ExtraSchemaDummyJoinSelectConfig ¶
type ExtraSchemaDummyJoinSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaDummyJoinSelectConfigOption ¶
type ExtraSchemaDummyJoinSelectConfigOption func(*ExtraSchemaDummyJoinSelectConfig)
func WithExtraSchemaDummyJoinFilters ¶
func WithExtraSchemaDummyJoinFilters(filters map[string][]any) ExtraSchemaDummyJoinSelectConfigOption
WithExtraSchemaDummyJoinFilters 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 WithExtraSchemaDummyJoinHavingClause ¶
func WithExtraSchemaDummyJoinHavingClause(conditions map[string][]any) ExtraSchemaDummyJoinSelectConfigOption
WithExtraSchemaDummyJoinHavingClause 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 WithExtraSchemaDummyJoinJoin ¶
func WithExtraSchemaDummyJoinJoin(joins ExtraSchemaDummyJoinJoins) ExtraSchemaDummyJoinSelectConfigOption
WithExtraSchemaDummyJoinJoin joins with the given tables.
func WithExtraSchemaDummyJoinLimit ¶
func WithExtraSchemaDummyJoinLimit(limit int) ExtraSchemaDummyJoinSelectConfigOption
WithExtraSchemaDummyJoinLimit limits row selection.
func WithExtraSchemaDummyJoinOrderBy ¶
func WithExtraSchemaDummyJoinOrderBy(rows map[string]*Direction) ExtraSchemaDummyJoinSelectConfigOption
WithExtraSchemaDummyJoinOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaDummyJoinUpdateParams ¶
type ExtraSchemaDummyJoinUpdateParams struct {
Name **string `json:"name"` // name
}
ExtraSchemaDummyJoinUpdateParams represents update params for 'extra_schema.dummy_join'.
func (ExtraSchemaDummyJoinUpdateParams) GetName ¶
func (p ExtraSchemaDummyJoinUpdateParams) GetName() *string
type ExtraSchemaNotification ¶
type ExtraSchemaNotification struct { NotificationID ExtraSchemaNotificationID `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 ExtraSchemaUserID `json:"sender" db:"sender" required:"true" nullable:"false"` // sender Receiver *ExtraSchemaUserID `json:"receiver" db:"receiver"` // receiver ExtraSchemaNotificationType ExtraSchemaNotificationType `json:"notificationType" db:"notification_type" required:"true" nullable:"false" ref:"#/components/schemas/NotificationType"` // notification_type UserReceiverJoin *ExtraSchemaUser `json:"-" db:"user_receiver"` // O2O users (generated from M2O) UserSenderJoin *ExtraSchemaUser `json:"-" db:"user_sender"` // O2O users (generated from M2O) }
ExtraSchemaNotification represents a row from 'extra_schema.notifications'.
func CreateExtraSchemaNotification ¶
func CreateExtraSchemaNotification(ctx context.Context, db DB, params *ExtraSchemaNotificationCreateParams) (*ExtraSchemaNotification, error)
CreateExtraSchemaNotification creates a new ExtraSchemaNotification in the database with the given params.
func ExtraSchemaNotificationByNotificationID ¶
func ExtraSchemaNotificationByNotificationID(ctx context.Context, db DB, notificationID ExtraSchemaNotificationID, opts ...ExtraSchemaNotificationSelectConfigOption) (*ExtraSchemaNotification, error)
ExtraSchemaNotificationByNotificationID retrieves a row from 'extra_schema.notifications' as a ExtraSchemaNotification.
Generated from index 'notifications_pkey'.
func ExtraSchemaNotificationPaginated ¶
func ExtraSchemaNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaNotificationSelectConfigOption) ([]ExtraSchemaNotification, error)
ExtraSchemaNotificationPaginated returns a cursor-paginated list of ExtraSchemaNotification. At least one cursor is required.
func ExtraSchemaNotificationsBySender ¶
func ExtraSchemaNotificationsBySender(ctx context.Context, db DB, sender ExtraSchemaUserID, opts ...ExtraSchemaNotificationSelectConfigOption) ([]ExtraSchemaNotification, error)
ExtraSchemaNotificationsBySender retrieves a row from 'extra_schema.notifications' as a ExtraSchemaNotification.
Generated from index 'notifications_sender_idx'.
func (*ExtraSchemaNotification) Delete ¶
func (esn *ExtraSchemaNotification) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaNotification from the database.
func (*ExtraSchemaNotification) FKUser_Receiver ¶
func (esn *ExtraSchemaNotification) FKUser_Receiver(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_Receiver returns the User associated with the ExtraSchemaNotification's (Receiver).
Generated from foreign key 'notifications_receiver_fkey'.
func (*ExtraSchemaNotification) FKUser_Sender ¶
func (esn *ExtraSchemaNotification) FKUser_Sender(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_Sender returns the User associated with the ExtraSchemaNotification's (Sender).
Generated from foreign key 'notifications_sender_fkey'.
func (*ExtraSchemaNotification) Insert ¶
func (esn *ExtraSchemaNotification) Insert(ctx context.Context, db DB) (*ExtraSchemaNotification, error)
Insert inserts the ExtraSchemaNotification to the database.
func (*ExtraSchemaNotification) SetUpdateParams ¶
func (esn *ExtraSchemaNotification) SetUpdateParams(params *ExtraSchemaNotificationUpdateParams)
SetUpdateParams updates extra_schema.notifications struct fields with the specified params.
func (*ExtraSchemaNotification) Update ¶
func (esn *ExtraSchemaNotification) Update(ctx context.Context, db DB) (*ExtraSchemaNotification, error)
Update updates a ExtraSchemaNotification in the database.
func (*ExtraSchemaNotification) Upsert ¶
func (esn *ExtraSchemaNotification) Upsert(ctx context.Context, db DB, params *ExtraSchemaNotificationCreateParams) (*ExtraSchemaNotification, error)
Upsert upserts a ExtraSchemaNotification in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaNotificationCreateParams ¶
type ExtraSchemaNotificationCreateParams struct { Body string `json:"-" nullable:"false" pattern:"^[A-Za-z0-9]*$"` // body ExtraSchemaNotificationType ExtraSchemaNotificationType `json:"notificationType" required:"true" nullable:"false" ref:"#/components/schemas/NotificationType"` // notification_type Receiver *ExtraSchemaUserID `json:"receiver"` // receiver Sender ExtraSchemaUserID `json:"sender" required:"true" nullable:"false"` // sender }
ExtraSchemaNotificationCreateParams represents insert params for 'extra_schema.notifications'.
func (ExtraSchemaNotificationCreateParams) GetBody ¶
func (p ExtraSchemaNotificationCreateParams) GetBody() *string
func (ExtraSchemaNotificationCreateParams) GetExtraSchemaNotificationType ¶
func (p ExtraSchemaNotificationCreateParams) GetExtraSchemaNotificationType() *ExtraSchemaNotificationType
func (ExtraSchemaNotificationCreateParams) GetReceiver ¶
func (p ExtraSchemaNotificationCreateParams) GetReceiver() *ExtraSchemaUserID
func (ExtraSchemaNotificationCreateParams) GetSender ¶
func (p ExtraSchemaNotificationCreateParams) GetSender() *ExtraSchemaUserID
type ExtraSchemaNotificationID ¶
type ExtraSchemaNotificationID int
type ExtraSchemaNotificationParams ¶
type ExtraSchemaNotificationParams interface { GetBody() *string GetExtraSchemaNotificationType() *ExtraSchemaNotificationType GetReceiver() *ExtraSchemaUserID GetSender() *ExtraSchemaUserID }
ExtraSchemaNotificationParams represents common params for both insert and update of 'extra_schema.notifications'.
type ExtraSchemaNotificationSelectConfig ¶
type ExtraSchemaNotificationSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaNotificationSelectConfigOption ¶
type ExtraSchemaNotificationSelectConfigOption func(*ExtraSchemaNotificationSelectConfig)
func WithExtraSchemaNotificationFilters ¶
func WithExtraSchemaNotificationFilters(filters map[string][]any) ExtraSchemaNotificationSelectConfigOption
WithExtraSchemaNotificationFilters 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 WithExtraSchemaNotificationHavingClause ¶
func WithExtraSchemaNotificationHavingClause(conditions map[string][]any) ExtraSchemaNotificationSelectConfigOption
WithExtraSchemaNotificationHavingClause 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 WithExtraSchemaNotificationJoin ¶
func WithExtraSchemaNotificationJoin(joins ExtraSchemaNotificationJoins) ExtraSchemaNotificationSelectConfigOption
WithExtraSchemaNotificationJoin joins with the given tables.
func WithExtraSchemaNotificationLimit ¶
func WithExtraSchemaNotificationLimit(limit int) ExtraSchemaNotificationSelectConfigOption
WithExtraSchemaNotificationLimit limits row selection.
func WithExtraSchemaNotificationOrderBy ¶
func WithExtraSchemaNotificationOrderBy(rows map[string]*Direction) ExtraSchemaNotificationSelectConfigOption
WithExtraSchemaNotificationOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaNotificationType ¶
type ExtraSchemaNotificationType string
ExtraSchemaNotificationType is the 'notification_type' enum type from schema 'extra_schema'.
const ( // ExtraSchemaNotificationTypePersonal is the 'personal' notification_type. ExtraSchemaNotificationTypePersonal ExtraSchemaNotificationType = "personal" // ExtraSchemaNotificationTypeGlobal is the 'global' notification_type. ExtraSchemaNotificationTypeGlobal ExtraSchemaNotificationType = "global" )
ExtraSchemaNotificationType values.
func AllExtraSchemaNotificationTypeValues ¶
func AllExtraSchemaNotificationTypeValues() []ExtraSchemaNotificationType
func (*ExtraSchemaNotificationType) Scan ¶
func (esnt *ExtraSchemaNotificationType) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface.
type ExtraSchemaNotificationUpdateParams ¶
type ExtraSchemaNotificationUpdateParams struct { Body *string `json:"-" nullable:"false" pattern:"^[A-Za-z0-9]*$"` // body ExtraSchemaNotificationType *ExtraSchemaNotificationType `json:"notificationType" nullable:"false" ref:"#/components/schemas/NotificationType"` // notification_type Receiver **ExtraSchemaUserID `json:"receiver"` // receiver Sender *ExtraSchemaUserID `json:"sender" nullable:"false"` // sender }
ExtraSchemaNotificationUpdateParams represents update params for 'extra_schema.notifications'.
func (ExtraSchemaNotificationUpdateParams) GetBody ¶
func (p ExtraSchemaNotificationUpdateParams) GetBody() *string
func (ExtraSchemaNotificationUpdateParams) GetExtraSchemaNotificationType ¶
func (p ExtraSchemaNotificationUpdateParams) GetExtraSchemaNotificationType() *ExtraSchemaNotificationType
func (ExtraSchemaNotificationUpdateParams) GetReceiver ¶
func (p ExtraSchemaNotificationUpdateParams) GetReceiver() *ExtraSchemaUserID
func (ExtraSchemaNotificationUpdateParams) GetSender ¶
func (p ExtraSchemaNotificationUpdateParams) GetSender() *ExtraSchemaUserID
type ExtraSchemaPagElement ¶
type ExtraSchemaPagElement struct { PaginatedElementID ExtraSchemaPagElementID `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 *ExtraSchemaDummyJoinID `json:"dummy" db:"dummy"` // dummy DummyJoinJoin *ExtraSchemaDummyJoin `json:"-" db:"dummy_join_dummy"` // O2O dummy_join (inferred) }
ExtraSchemaPagElement represents a row from 'extra_schema.pag_element'.
func CreateExtraSchemaPagElement ¶
func CreateExtraSchemaPagElement(ctx context.Context, db DB, params *ExtraSchemaPagElementCreateParams) (*ExtraSchemaPagElement, error)
CreateExtraSchemaPagElement creates a new ExtraSchemaPagElement in the database with the given params.
func ExtraSchemaPagElementByCreatedAt ¶
func ExtraSchemaPagElementByCreatedAt(ctx context.Context, db DB, createdAt time.Time, opts ...ExtraSchemaPagElementSelectConfigOption) (*ExtraSchemaPagElement, error)
ExtraSchemaPagElementByCreatedAt retrieves a row from 'extra_schema.pag_element' as a ExtraSchemaPagElement.
Generated from index 'pag_element_created_at_key'.
func ExtraSchemaPagElementByPaginatedElementID ¶
func ExtraSchemaPagElementByPaginatedElementID(ctx context.Context, db DB, paginatedElementID ExtraSchemaPagElementID, opts ...ExtraSchemaPagElementSelectConfigOption) (*ExtraSchemaPagElement, error)
ExtraSchemaPagElementByPaginatedElementID retrieves a row from 'extra_schema.pag_element' as a ExtraSchemaPagElement.
Generated from index 'pag_element_pkey'.
func ExtraSchemaPagElementPaginated ¶
func ExtraSchemaPagElementPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaPagElementSelectConfigOption) ([]ExtraSchemaPagElement, error)
ExtraSchemaPagElementPaginated returns a cursor-paginated list of ExtraSchemaPagElement. At least one cursor is required.
func (*ExtraSchemaPagElement) Delete ¶
func (espe *ExtraSchemaPagElement) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaPagElement from the database.
func (*ExtraSchemaPagElement) FKDummyJoin_Dummy ¶
func (espe *ExtraSchemaPagElement) FKDummyJoin_Dummy(ctx context.Context, db DB) (*ExtraSchemaDummyJoin, error)
FKDummyJoin_Dummy returns the DummyJoin associated with the ExtraSchemaPagElement's (Dummy).
Generated from foreign key 'pag_element_dummy_fkey'.
func (*ExtraSchemaPagElement) Insert ¶
func (espe *ExtraSchemaPagElement) Insert(ctx context.Context, db DB) (*ExtraSchemaPagElement, error)
Insert inserts the ExtraSchemaPagElement to the database.
func (*ExtraSchemaPagElement) SetUpdateParams ¶
func (espe *ExtraSchemaPagElement) SetUpdateParams(params *ExtraSchemaPagElementUpdateParams)
SetUpdateParams updates extra_schema.pag_element struct fields with the specified params.
func (*ExtraSchemaPagElement) Update ¶
func (espe *ExtraSchemaPagElement) Update(ctx context.Context, db DB) (*ExtraSchemaPagElement, error)
Update updates a ExtraSchemaPagElement in the database.
func (*ExtraSchemaPagElement) Upsert ¶
func (espe *ExtraSchemaPagElement) Upsert(ctx context.Context, db DB, params *ExtraSchemaPagElementCreateParams) (*ExtraSchemaPagElement, error)
Upsert upserts a ExtraSchemaPagElement in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaPagElementCreateParams ¶
type ExtraSchemaPagElementCreateParams struct { Dummy *ExtraSchemaDummyJoinID `json:"dummy"` // dummy Name string `json:"name" required:"true" nullable:"false"` // name }
ExtraSchemaPagElementCreateParams represents insert params for 'extra_schema.pag_element'.
func (ExtraSchemaPagElementCreateParams) GetDummy ¶
func (p ExtraSchemaPagElementCreateParams) GetDummy() *ExtraSchemaDummyJoinID
func (ExtraSchemaPagElementCreateParams) GetName ¶
func (p ExtraSchemaPagElementCreateParams) GetName() *string
type ExtraSchemaPagElementID ¶
func NewExtraSchemaPagElementID ¶
func NewExtraSchemaPagElementID(id uuid.UUID) ExtraSchemaPagElementID
type ExtraSchemaPagElementJoins ¶
type ExtraSchemaPagElementJoins struct {
DummyJoin bool `json:"dummyJoin" required:"true" nullable:"false"` // O2O dummy_join
}
type ExtraSchemaPagElementParams ¶
type ExtraSchemaPagElementParams interface { GetDummy() *ExtraSchemaDummyJoinID GetName() *string }
ExtraSchemaPagElementParams represents common params for both insert and update of 'extra_schema.pag_element'.
type ExtraSchemaPagElementSelectConfig ¶
type ExtraSchemaPagElementSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaPagElementSelectConfigOption ¶
type ExtraSchemaPagElementSelectConfigOption func(*ExtraSchemaPagElementSelectConfig)
func WithExtraSchemaPagElementFilters ¶
func WithExtraSchemaPagElementFilters(filters map[string][]any) ExtraSchemaPagElementSelectConfigOption
WithExtraSchemaPagElementFilters 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 WithExtraSchemaPagElementHavingClause ¶
func WithExtraSchemaPagElementHavingClause(conditions map[string][]any) ExtraSchemaPagElementSelectConfigOption
WithExtraSchemaPagElementHavingClause 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 WithExtraSchemaPagElementJoin ¶
func WithExtraSchemaPagElementJoin(joins ExtraSchemaPagElementJoins) ExtraSchemaPagElementSelectConfigOption
WithExtraSchemaPagElementJoin joins with the given tables.
func WithExtraSchemaPagElementLimit ¶
func WithExtraSchemaPagElementLimit(limit int) ExtraSchemaPagElementSelectConfigOption
WithExtraSchemaPagElementLimit limits row selection.
func WithExtraSchemaPagElementOrderBy ¶
func WithExtraSchemaPagElementOrderBy(rows map[string]*Direction) ExtraSchemaPagElementSelectConfigOption
WithExtraSchemaPagElementOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaPagElementUpdateParams ¶
type ExtraSchemaPagElementUpdateParams struct { Dummy **ExtraSchemaDummyJoinID `json:"dummy"` // dummy Name *string `json:"name" nullable:"false"` // name }
ExtraSchemaPagElementUpdateParams represents update params for 'extra_schema.pag_element'.
func (ExtraSchemaPagElementUpdateParams) GetDummy ¶
func (p ExtraSchemaPagElementUpdateParams) GetDummy() *ExtraSchemaDummyJoinID
func (ExtraSchemaPagElementUpdateParams) GetName ¶
func (p ExtraSchemaPagElementUpdateParams) GetName() *string
type ExtraSchemaTableEntity ¶
type ExtraSchemaTableEntity string
const ( ExtraSchemaTableEntityExtraSchemaBook ExtraSchemaTableEntity = "extra_schema.books" ExtraSchemaTableEntityExtraSchemaBookAuthor ExtraSchemaTableEntity = "extra_schema.book_authors" ExtraSchemaTableEntityExtraSchemaBookAuthorsSurrogateKey ExtraSchemaTableEntity = "extra_schema.book_authors_surrogate_key" ExtraSchemaTableEntityExtraSchemaBookReview ExtraSchemaTableEntity = "extra_schema.book_reviews" ExtraSchemaTableEntityExtraSchemaBookSeller ExtraSchemaTableEntity = "extra_schema.book_sellers" ExtraSchemaTableEntityExtraSchemaDemoWorkItem ExtraSchemaTableEntity = "extra_schema.demo_work_items" ExtraSchemaTableEntityExtraSchemaDummyJoin ExtraSchemaTableEntity = "extra_schema.dummy_join" ExtraSchemaTableEntityExtraSchemaNotification ExtraSchemaTableEntity = "extra_schema.notifications" ExtraSchemaTableEntityExtraSchemaPagElement ExtraSchemaTableEntity = "extra_schema.pag_element" ExtraSchemaTableEntityExtraSchemaUser ExtraSchemaTableEntity = "extra_schema.users" ExtraSchemaTableEntityExtraSchemaUserAPIKey ExtraSchemaTableEntity = "extra_schema.user_api_keys" ExtraSchemaTableEntityExtraSchemaWorkItem ExtraSchemaTableEntity = "extra_schema.work_items" ExtraSchemaTableEntityExtraSchemaWorkItemAdmin ExtraSchemaTableEntity = "extra_schema.work_item_admin" ExtraSchemaTableEntityExtraSchemaWorkItemAssignee ExtraSchemaTableEntity = "extra_schema.work_item_assignee" )
type ExtraSchemaUser ¶
type ExtraSchemaUser struct { UserID ExtraSchemaUserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name APIKeyID *ExtraSchemaUserAPIKeyID `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 *[]ExtraSchemaUserM2MBookBA `json:"-" db:"book_authors_books"` // M2M book_authors AuthorBooksBASKJoin *[]ExtraSchemaUserM2MBookBASK `json:"-" db:"book_authors_surrogate_key_books"` // M2M book_authors_surrogate_key BookReviewsJoin *[]ExtraSchemaBookReview `json:"-" db:"book_reviews"` // M2O users SellerBooksJoin *[]ExtraSchemaBook `json:"-" db:"book_sellers_books"` // M2M book_sellers ReceiverNotificationsJoin *[]ExtraSchemaNotification `json:"-" db:"notifications_receiver"` // M2O users SenderNotificationsJoin *[]ExtraSchemaNotification `json:"-" db:"notifications_sender"` // M2O users UserAPIKeyJoin *ExtraSchemaUserAPIKey `json:"-" db:"user_api_key_api_key_id"` // O2O user_api_keys (inferred) AdminWorkItemsJoin *[]ExtraSchemaWorkItem `json:"-" db:"work_item_admin_work_items"` // M2M work_item_admin AssigneeWorkItemsJoin *[]ExtraSchemaUserM2MWorkItemWIA `json:"-" db:"work_item_assignee_work_items"` // M2M work_item_assignee }
ExtraSchemaUser represents a row from 'extra_schema.users'.
func CreateExtraSchemaUser ¶
func CreateExtraSchemaUser(ctx context.Context, db DB, params *ExtraSchemaUserCreateParams) (*ExtraSchemaUser, error)
CreateExtraSchemaUser creates a new ExtraSchemaUser in the database with the given params.
func ExtraSchemaUserByCreatedAt ¶
func ExtraSchemaUserByCreatedAt(ctx context.Context, db DB, createdAt time.Time, opts ...ExtraSchemaUserSelectConfigOption) (*ExtraSchemaUser, error)
ExtraSchemaUserByCreatedAt retrieves a row from 'extra_schema.users' as a ExtraSchemaUser.
Generated from index 'users_created_at_key'.
func ExtraSchemaUserByName ¶
func ExtraSchemaUserByName(ctx context.Context, db DB, name string, opts ...ExtraSchemaUserSelectConfigOption) (*ExtraSchemaUser, error)
ExtraSchemaUserByName retrieves a row from 'extra_schema.users' as a ExtraSchemaUser.
Generated from index 'users_name_key'.
func ExtraSchemaUserByUserID ¶
func ExtraSchemaUserByUserID(ctx context.Context, db DB, userID ExtraSchemaUserID, opts ...ExtraSchemaUserSelectConfigOption) (*ExtraSchemaUser, error)
ExtraSchemaUserByUserID retrieves a row from 'extra_schema.users' as a ExtraSchemaUser.
Generated from index 'users_pkey'.
func ExtraSchemaUserPaginated ¶
func ExtraSchemaUserPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaUserSelectConfigOption) ([]ExtraSchemaUser, error)
ExtraSchemaUserPaginated returns a cursor-paginated list of ExtraSchemaUser. At least one cursor is required.
func (*ExtraSchemaUser) Delete ¶
func (esu *ExtraSchemaUser) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaUser from the database.
func (*ExtraSchemaUser) FKUserAPIKey_APIKeyID ¶
func (esu *ExtraSchemaUser) FKUserAPIKey_APIKeyID(ctx context.Context, db DB) (*ExtraSchemaUserAPIKey, error)
FKUserAPIKey_APIKeyID returns the UserAPIKey associated with the ExtraSchemaUser's (APIKeyID).
Generated from foreign key 'users_api_key_id_fkey'.
func (*ExtraSchemaUser) Insert ¶
func (esu *ExtraSchemaUser) Insert(ctx context.Context, db DB) (*ExtraSchemaUser, error)
Insert inserts the ExtraSchemaUser to the database.
func (*ExtraSchemaUser) Restore ¶
func (esu *ExtraSchemaUser) Restore(ctx context.Context, db DB) (*ExtraSchemaUser, error)
Restore restores a soft deleted ExtraSchemaUser from the database.
func (*ExtraSchemaUser) SetUpdateParams ¶
func (esu *ExtraSchemaUser) SetUpdateParams(params *ExtraSchemaUserUpdateParams)
SetUpdateParams updates extra_schema.users struct fields with the specified params.
func (*ExtraSchemaUser) SoftDelete ¶
func (esu *ExtraSchemaUser) SoftDelete(ctx context.Context, db DB) error
SoftDelete soft deletes the ExtraSchemaUser from the database via 'deleted_at'.
func (*ExtraSchemaUser) Update ¶
func (esu *ExtraSchemaUser) Update(ctx context.Context, db DB) (*ExtraSchemaUser, error)
Update updates a ExtraSchemaUser in the database.
func (*ExtraSchemaUser) Upsert ¶
func (esu *ExtraSchemaUser) Upsert(ctx context.Context, db DB, params *ExtraSchemaUserCreateParams) (*ExtraSchemaUser, error)
Upsert upserts a ExtraSchemaUser in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaUserAPIKey ¶
type ExtraSchemaUserAPIKey struct { UserAPIKeyID ExtraSchemaUserAPIKeyID `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 ExtraSchemaUserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id UserJoin *ExtraSchemaUser `json:"-" db:"user_user_id"` // O2O users (inferred) }
ExtraSchemaUserAPIKey represents a row from 'extra_schema.user_api_keys'.
func CreateExtraSchemaUserAPIKey ¶
func CreateExtraSchemaUserAPIKey(ctx context.Context, db DB, params *ExtraSchemaUserAPIKeyCreateParams) (*ExtraSchemaUserAPIKey, error)
CreateExtraSchemaUserAPIKey creates a new ExtraSchemaUserAPIKey in the database with the given params.
func ExtraSchemaUserAPIKeyByAPIKey ¶
func ExtraSchemaUserAPIKeyByAPIKey(ctx context.Context, db DB, apiKey string, opts ...ExtraSchemaUserAPIKeySelectConfigOption) (*ExtraSchemaUserAPIKey, error)
ExtraSchemaUserAPIKeyByAPIKey retrieves a row from 'extra_schema.user_api_keys' as a ExtraSchemaUserAPIKey.
Generated from index 'user_api_keys_api_key_key'.
func ExtraSchemaUserAPIKeyByUserAPIKeyID ¶
func ExtraSchemaUserAPIKeyByUserAPIKeyID(ctx context.Context, db DB, userAPIKeyID ExtraSchemaUserAPIKeyID, opts ...ExtraSchemaUserAPIKeySelectConfigOption) (*ExtraSchemaUserAPIKey, error)
ExtraSchemaUserAPIKeyByUserAPIKeyID retrieves a row from 'extra_schema.user_api_keys' as a ExtraSchemaUserAPIKey.
Generated from index 'user_api_keys_pkey'.
func ExtraSchemaUserAPIKeyByUserID ¶
func ExtraSchemaUserAPIKeyByUserID(ctx context.Context, db DB, userID ExtraSchemaUserID, opts ...ExtraSchemaUserAPIKeySelectConfigOption) (*ExtraSchemaUserAPIKey, error)
ExtraSchemaUserAPIKeyByUserID retrieves a row from 'extra_schema.user_api_keys' as a ExtraSchemaUserAPIKey.
Generated from index 'user_api_keys_user_id_key'.
func ExtraSchemaUserAPIKeyPaginated ¶
func ExtraSchemaUserAPIKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaUserAPIKeySelectConfigOption) ([]ExtraSchemaUserAPIKey, error)
ExtraSchemaUserAPIKeyPaginated returns a cursor-paginated list of ExtraSchemaUserAPIKey. At least one cursor is required.
func (*ExtraSchemaUserAPIKey) Delete ¶
func (esuak *ExtraSchemaUserAPIKey) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaUserAPIKey from the database.
func (*ExtraSchemaUserAPIKey) FKUser_UserID ¶
func (esuak *ExtraSchemaUserAPIKey) FKUser_UserID(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_UserID returns the User associated with the ExtraSchemaUserAPIKey's (UserID).
Generated from foreign key 'user_api_keys_user_id_fkey'.
func (*ExtraSchemaUserAPIKey) Insert ¶
func (esuak *ExtraSchemaUserAPIKey) Insert(ctx context.Context, db DB) (*ExtraSchemaUserAPIKey, error)
Insert inserts the ExtraSchemaUserAPIKey to the database.
func (*ExtraSchemaUserAPIKey) SetUpdateParams ¶
func (esuak *ExtraSchemaUserAPIKey) SetUpdateParams(params *ExtraSchemaUserAPIKeyUpdateParams)
SetUpdateParams updates extra_schema.user_api_keys struct fields with the specified params.
func (*ExtraSchemaUserAPIKey) Update ¶
func (esuak *ExtraSchemaUserAPIKey) Update(ctx context.Context, db DB) (*ExtraSchemaUserAPIKey, error)
Update updates a ExtraSchemaUserAPIKey in the database.
func (*ExtraSchemaUserAPIKey) Upsert ¶
func (esuak *ExtraSchemaUserAPIKey) Upsert(ctx context.Context, db DB, params *ExtraSchemaUserAPIKeyCreateParams) (*ExtraSchemaUserAPIKey, error)
Upsert upserts a ExtraSchemaUserAPIKey in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaUserAPIKeyCreateParams ¶
type ExtraSchemaUserAPIKeyCreateParams struct { APIKey string `json:"apiKey" required:"true" nullable:"false"` // api_key ExpiresOn time.Time `json:"expiresOn" required:"true" nullable:"false"` // expires_on UserID ExtraSchemaUserID `json:"userID" required:"true" nullable:"false"` // user_id }
ExtraSchemaUserAPIKeyCreateParams represents insert params for 'extra_schema.user_api_keys'.
func (ExtraSchemaUserAPIKeyCreateParams) GetAPIKey ¶
func (p ExtraSchemaUserAPIKeyCreateParams) GetAPIKey() *string
func (ExtraSchemaUserAPIKeyCreateParams) GetExpiresOn ¶
func (p ExtraSchemaUserAPIKeyCreateParams) GetExpiresOn() *time.Time
func (ExtraSchemaUserAPIKeyCreateParams) GetUserID ¶
func (p ExtraSchemaUserAPIKeyCreateParams) GetUserID() *ExtraSchemaUserID
type ExtraSchemaUserAPIKeyID ¶
type ExtraSchemaUserAPIKeyID int
type ExtraSchemaUserAPIKeyJoins ¶
type ExtraSchemaUserAPIKeyJoins struct {
User bool `json:"user" required:"true" nullable:"false"` // O2O users
}
type ExtraSchemaUserAPIKeyParams ¶
type ExtraSchemaUserAPIKeyParams interface { GetAPIKey() *string GetExpiresOn() *time.Time GetUserID() *ExtraSchemaUserID }
ExtraSchemaUserAPIKeyParams represents common params for both insert and update of 'extra_schema.user_api_keys'.
type ExtraSchemaUserAPIKeySelectConfig ¶
type ExtraSchemaUserAPIKeySelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaUserAPIKeySelectConfigOption ¶
type ExtraSchemaUserAPIKeySelectConfigOption func(*ExtraSchemaUserAPIKeySelectConfig)
func WithExtraSchemaUserAPIKeyFilters ¶
func WithExtraSchemaUserAPIKeyFilters(filters map[string][]any) ExtraSchemaUserAPIKeySelectConfigOption
WithExtraSchemaUserAPIKeyFilters 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 WithExtraSchemaUserAPIKeyHavingClause ¶
func WithExtraSchemaUserAPIKeyHavingClause(conditions map[string][]any) ExtraSchemaUserAPIKeySelectConfigOption
WithExtraSchemaUserAPIKeyHavingClause 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 WithExtraSchemaUserAPIKeyJoin ¶
func WithExtraSchemaUserAPIKeyJoin(joins ExtraSchemaUserAPIKeyJoins) ExtraSchemaUserAPIKeySelectConfigOption
WithExtraSchemaUserAPIKeyJoin joins with the given tables.
func WithExtraSchemaUserAPIKeyLimit ¶
func WithExtraSchemaUserAPIKeyLimit(limit int) ExtraSchemaUserAPIKeySelectConfigOption
WithExtraSchemaUserAPIKeyLimit limits row selection.
func WithExtraSchemaUserAPIKeyOrderBy ¶
func WithExtraSchemaUserAPIKeyOrderBy(rows map[string]*Direction) ExtraSchemaUserAPIKeySelectConfigOption
WithExtraSchemaUserAPIKeyOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaUserAPIKeyUpdateParams ¶
type ExtraSchemaUserAPIKeyUpdateParams struct { APIKey *string `json:"apiKey" nullable:"false"` // api_key ExpiresOn *time.Time `json:"expiresOn" nullable:"false"` // expires_on UserID *ExtraSchemaUserID `json:"userID" nullable:"false"` // user_id }
ExtraSchemaUserAPIKeyUpdateParams represents update params for 'extra_schema.user_api_keys'.
func (ExtraSchemaUserAPIKeyUpdateParams) GetAPIKey ¶
func (p ExtraSchemaUserAPIKeyUpdateParams) GetAPIKey() *string
func (ExtraSchemaUserAPIKeyUpdateParams) GetExpiresOn ¶
func (p ExtraSchemaUserAPIKeyUpdateParams) GetExpiresOn() *time.Time
func (ExtraSchemaUserAPIKeyUpdateParams) GetUserID ¶
func (p ExtraSchemaUserAPIKeyUpdateParams) GetUserID() *ExtraSchemaUserID
type ExtraSchemaUserCreateParams ¶
type ExtraSchemaUserCreateParams struct { APIKeyID *ExtraSchemaUserAPIKeyID `json:"apiKeyID"` // api_key_id Name string `json:"name" required:"true" nullable:"false"` // name }
ExtraSchemaUserCreateParams represents insert params for 'extra_schema.users'.
func (ExtraSchemaUserCreateParams) GetAPIKeyID ¶
func (p ExtraSchemaUserCreateParams) GetAPIKeyID() *ExtraSchemaUserAPIKeyID
func (ExtraSchemaUserCreateParams) GetName ¶
func (p ExtraSchemaUserCreateParams) GetName() *string
type ExtraSchemaUserID ¶
func NewExtraSchemaUserID ¶
func NewExtraSchemaUserID(id uuid.UUID) ExtraSchemaUserID
type ExtraSchemaUserJoins ¶
type ExtraSchemaUserJoins 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 AdminWorkItems bool `json:"adminWorkItems" required:"true" nullable:"false"` // M2M work_item_admin AssigneeWorkItems bool `json:"assigneeWorkItems" required:"true" nullable:"false"` // M2M work_item_assignee }
type ExtraSchemaUserM2MBookBA ¶
type ExtraSchemaUserM2MBookBA struct { Book ExtraSchemaBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaUserM2MBookBA represents a M2M join against "extra_schema.book_authors"
type ExtraSchemaUserM2MBookBASK ¶
type ExtraSchemaUserM2MBookBASK struct { Book ExtraSchemaBook `json:"book" db:"books" required:"true"` Pseudonym *string `json:"pseudonym" db:"pseudonym" required:"true" ` }
ExtraSchemaUserM2MBookBASK represents a M2M join against "extra_schema.book_authors_surrogate_key"
type ExtraSchemaUserM2MWorkItemWIA ¶
type ExtraSchemaUserM2MWorkItemWIA struct { WorkItem ExtraSchemaWorkItem `json:"workItem" db:"work_items" required:"true"` Role *ExtraSchemaWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
ExtraSchemaUserM2MWorkItemWIA represents a M2M join against "extra_schema.work_item_assignee"
type ExtraSchemaUserParams ¶
type ExtraSchemaUserParams interface { GetAPIKeyID() *ExtraSchemaUserAPIKeyID GetName() *string }
ExtraSchemaUserParams represents common params for both insert and update of 'extra_schema.users'.
type ExtraSchemaUserSelectConfig ¶
type ExtraSchemaUserSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaUserSelectConfigOption ¶
type ExtraSchemaUserSelectConfigOption func(*ExtraSchemaUserSelectConfig)
func WithDeletedExtraSchemaUserOnly ¶
func WithDeletedExtraSchemaUserOnly() ExtraSchemaUserSelectConfigOption
WithDeletedExtraSchemaUserOnly limits result to records marked as deleted.
func WithExtraSchemaUserFilters ¶
func WithExtraSchemaUserFilters(filters map[string][]any) ExtraSchemaUserSelectConfigOption
WithExtraSchemaUserFilters 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 WithExtraSchemaUserHavingClause ¶
func WithExtraSchemaUserHavingClause(conditions map[string][]any) ExtraSchemaUserSelectConfigOption
WithExtraSchemaUserHavingClause 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 WithExtraSchemaUserJoin ¶
func WithExtraSchemaUserJoin(joins ExtraSchemaUserJoins) ExtraSchemaUserSelectConfigOption
WithExtraSchemaUserJoin joins with the given tables.
func WithExtraSchemaUserLimit ¶
func WithExtraSchemaUserLimit(limit int) ExtraSchemaUserSelectConfigOption
WithExtraSchemaUserLimit limits row selection.
func WithExtraSchemaUserOrderBy ¶
func WithExtraSchemaUserOrderBy(rows map[string]*Direction) ExtraSchemaUserSelectConfigOption
WithExtraSchemaUserOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaUserUpdateParams ¶
type ExtraSchemaUserUpdateParams struct { APIKeyID **ExtraSchemaUserAPIKeyID `json:"apiKeyID"` // api_key_id Name *string `json:"name" nullable:"false"` // name }
ExtraSchemaUserUpdateParams represents update params for 'extra_schema.users'.
func (ExtraSchemaUserUpdateParams) GetAPIKeyID ¶
func (p ExtraSchemaUserUpdateParams) GetAPIKeyID() *ExtraSchemaUserAPIKeyID
func (ExtraSchemaUserUpdateParams) GetName ¶
func (p ExtraSchemaUserUpdateParams) GetName() *string
type ExtraSchemaWorkItem ¶
type ExtraSchemaWorkItem struct { WorkItemID ExtraSchemaWorkItemID `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 DemoWorkItemJoin *ExtraSchemaDemoWorkItem `json:"-" db:"demo_work_item_work_item_id"` // O2O demo_work_items (inferred) AdminsJoin *[]ExtraSchemaUser `json:"-" db:"work_item_admin_admins"` // M2M work_item_admin AssigneesJoin *[]ExtraSchemaWorkItemM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee }
ExtraSchemaWorkItem represents a row from 'extra_schema.work_items'.
func CreateExtraSchemaWorkItem ¶
func CreateExtraSchemaWorkItem(ctx context.Context, db DB, params *ExtraSchemaWorkItemCreateParams) (*ExtraSchemaWorkItem, error)
CreateExtraSchemaWorkItem creates a new ExtraSchemaWorkItem in the database with the given params.
func ExtraSchemaWorkItemByWorkItemID ¶
func ExtraSchemaWorkItemByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, opts ...ExtraSchemaWorkItemSelectConfigOption) (*ExtraSchemaWorkItem, error)
ExtraSchemaWorkItemByWorkItemID retrieves a row from 'extra_schema.work_items' as a ExtraSchemaWorkItem.
Generated from index 'work_items_pkey'.
func ExtraSchemaWorkItemPaginated ¶
func ExtraSchemaWorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaWorkItemSelectConfigOption) ([]ExtraSchemaWorkItem, error)
ExtraSchemaWorkItemPaginated returns a cursor-paginated list of ExtraSchemaWorkItem. At least one cursor is required.
func ExtraSchemaWorkItems ¶
func ExtraSchemaWorkItems(ctx context.Context, db DB, opts ...ExtraSchemaWorkItemSelectConfigOption) ([]ExtraSchemaWorkItem, error)
ExtraSchemaWorkItems retrieves a row from 'extra_schema.work_items' as a ExtraSchemaWorkItem.
Generated from index '[xo] base filter query'.
func ExtraSchemaWorkItemsByTitle ¶
func ExtraSchemaWorkItemsByTitle(ctx context.Context, db DB, title *string, opts ...ExtraSchemaWorkItemSelectConfigOption) ([]ExtraSchemaWorkItem, error)
ExtraSchemaWorkItemsByTitle retrieves a row from 'extra_schema.work_items' as a ExtraSchemaWorkItem.
Generated from index 'work_items_title_description_idx1'.
func (*ExtraSchemaWorkItem) Delete ¶
func (eswi *ExtraSchemaWorkItem) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaWorkItem from the database.
func (*ExtraSchemaWorkItem) Insert ¶
func (eswi *ExtraSchemaWorkItem) Insert(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
Insert inserts the ExtraSchemaWorkItem to the database.
func (*ExtraSchemaWorkItem) SetUpdateParams ¶
func (eswi *ExtraSchemaWorkItem) SetUpdateParams(params *ExtraSchemaWorkItemUpdateParams)
SetUpdateParams updates extra_schema.work_items struct fields with the specified params.
func (*ExtraSchemaWorkItem) Update ¶
func (eswi *ExtraSchemaWorkItem) Update(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
Update updates a ExtraSchemaWorkItem in the database.
func (*ExtraSchemaWorkItem) Upsert ¶
func (eswi *ExtraSchemaWorkItem) Upsert(ctx context.Context, db DB, params *ExtraSchemaWorkItemCreateParams) (*ExtraSchemaWorkItem, error)
Upsert upserts a ExtraSchemaWorkItem in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaWorkItemAdmin ¶
type ExtraSchemaWorkItemAdmin struct { WorkItemID ExtraSchemaWorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Admin ExtraSchemaUserID `json:"admin" db:"admin" required:"true" nullable:"false"` // admin WorkItemsJoin *[]ExtraSchemaWorkItem `json:"-" db:"work_item_admin_work_items"` // M2M work_item_admin AdminsJoin *[]ExtraSchemaUser `json:"-" db:"work_item_admin_admins"` // M2M work_item_admin }
ExtraSchemaWorkItemAdmin represents a row from 'extra_schema.work_item_admin'.
func CreateExtraSchemaWorkItemAdmin ¶
func CreateExtraSchemaWorkItemAdmin(ctx context.Context, db DB, params *ExtraSchemaWorkItemAdminCreateParams) (*ExtraSchemaWorkItemAdmin, error)
CreateExtraSchemaWorkItemAdmin creates a new ExtraSchemaWorkItemAdmin in the database with the given params.
func ExtraSchemaWorkItemAdminByWorkItemIDAdmin ¶
func ExtraSchemaWorkItemAdminByWorkItemIDAdmin(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, admin ExtraSchemaUserID, opts ...ExtraSchemaWorkItemAdminSelectConfigOption) (*ExtraSchemaWorkItemAdmin, error)
ExtraSchemaWorkItemAdminByWorkItemIDAdmin retrieves a row from 'extra_schema.work_item_admin' as a ExtraSchemaWorkItemAdmin.
Generated from index 'work_item_admin_pkey'.
func ExtraSchemaWorkItemAdminPaginated ¶
func ExtraSchemaWorkItemAdminPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaWorkItemAdminSelectConfigOption) ([]ExtraSchemaWorkItemAdmin, error)
ExtraSchemaWorkItemAdminPaginated returns a cursor-paginated list of ExtraSchemaWorkItemAdmin. At least one cursor is required.
func ExtraSchemaWorkItemAdminsByAdmin ¶
func ExtraSchemaWorkItemAdminsByAdmin(ctx context.Context, db DB, admin ExtraSchemaUserID, opts ...ExtraSchemaWorkItemAdminSelectConfigOption) ([]ExtraSchemaWorkItemAdmin, error)
ExtraSchemaWorkItemAdminsByAdmin retrieves a row from 'extra_schema.work_item_admin' as a ExtraSchemaWorkItemAdmin.
Generated from index 'work_item_admin_pkey'.
func ExtraSchemaWorkItemAdminsByAdminWorkItemID ¶
func ExtraSchemaWorkItemAdminsByAdminWorkItemID(ctx context.Context, db DB, admin ExtraSchemaUserID, workItemID ExtraSchemaWorkItemID, opts ...ExtraSchemaWorkItemAdminSelectConfigOption) ([]ExtraSchemaWorkItemAdmin, error)
ExtraSchemaWorkItemAdminsByAdminWorkItemID retrieves a row from 'extra_schema.work_item_admin' as a ExtraSchemaWorkItemAdmin.
Generated from index 'work_item_admin_admin_work_item_id_idx'.
func ExtraSchemaWorkItemAdminsByWorkItemID ¶
func ExtraSchemaWorkItemAdminsByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, opts ...ExtraSchemaWorkItemAdminSelectConfigOption) ([]ExtraSchemaWorkItemAdmin, error)
ExtraSchemaWorkItemAdminsByWorkItemID retrieves a row from 'extra_schema.work_item_admin' as a ExtraSchemaWorkItemAdmin.
Generated from index 'work_item_admin_pkey'.
func (*ExtraSchemaWorkItemAdmin) Delete ¶
func (eswia *ExtraSchemaWorkItemAdmin) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaWorkItemAdmin from the database.
func (*ExtraSchemaWorkItemAdmin) FKUser_Admin ¶
func (eswia *ExtraSchemaWorkItemAdmin) FKUser_Admin(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_Admin returns the User associated with the ExtraSchemaWorkItemAdmin's (Admin).
Generated from foreign key 'work_item_admin_admin_fkey'.
func (*ExtraSchemaWorkItemAdmin) FKWorkItem_WorkItemID ¶
func (eswia *ExtraSchemaWorkItemAdmin) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the ExtraSchemaWorkItemAdmin's (WorkItemID).
Generated from foreign key 'work_item_admin_work_item_id_fkey'.
func (*ExtraSchemaWorkItemAdmin) Insert ¶
func (eswia *ExtraSchemaWorkItemAdmin) Insert(ctx context.Context, db DB) (*ExtraSchemaWorkItemAdmin, error)
Insert inserts the ExtraSchemaWorkItemAdmin to the database.
func (*ExtraSchemaWorkItemAdmin) SetUpdateParams ¶
func (eswia *ExtraSchemaWorkItemAdmin) SetUpdateParams(params *ExtraSchemaWorkItemAdminUpdateParams)
SetUpdateParams updates extra_schema.work_item_admin struct fields with the specified params.
type ExtraSchemaWorkItemAdminCreateParams ¶
type ExtraSchemaWorkItemAdminCreateParams struct { Admin ExtraSchemaUserID `json:"admin" required:"true" nullable:"false"` // admin WorkItemID ExtraSchemaWorkItemID `json:"workItemID" required:"true" nullable:"false"` // work_item_id }
ExtraSchemaWorkItemAdminCreateParams represents insert params for 'extra_schema.work_item_admin'.
func (ExtraSchemaWorkItemAdminCreateParams) GetAdmin ¶
func (p ExtraSchemaWorkItemAdminCreateParams) GetAdmin() *ExtraSchemaUserID
func (ExtraSchemaWorkItemAdminCreateParams) GetWorkItemID ¶
func (p ExtraSchemaWorkItemAdminCreateParams) GetWorkItemID() *ExtraSchemaWorkItemID
type ExtraSchemaWorkItemAdminParams ¶
type ExtraSchemaWorkItemAdminParams interface { GetAdmin() *ExtraSchemaUserID GetWorkItemID() *ExtraSchemaWorkItemID }
ExtraSchemaWorkItemAdminParams represents common params for both insert and update of 'extra_schema.work_item_admin'.
type ExtraSchemaWorkItemAdminSelectConfig ¶
type ExtraSchemaWorkItemAdminSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaWorkItemAdminSelectConfigOption ¶
type ExtraSchemaWorkItemAdminSelectConfigOption func(*ExtraSchemaWorkItemAdminSelectConfig)
func WithExtraSchemaWorkItemAdminFilters ¶
func WithExtraSchemaWorkItemAdminFilters(filters map[string][]any) ExtraSchemaWorkItemAdminSelectConfigOption
WithExtraSchemaWorkItemAdminFilters 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 WithExtraSchemaWorkItemAdminHavingClause ¶
func WithExtraSchemaWorkItemAdminHavingClause(conditions map[string][]any) ExtraSchemaWorkItemAdminSelectConfigOption
WithExtraSchemaWorkItemAdminHavingClause 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 WithExtraSchemaWorkItemAdminJoin ¶
func WithExtraSchemaWorkItemAdminJoin(joins ExtraSchemaWorkItemAdminJoins) ExtraSchemaWorkItemAdminSelectConfigOption
WithExtraSchemaWorkItemAdminJoin joins with the given tables.
func WithExtraSchemaWorkItemAdminLimit ¶
func WithExtraSchemaWorkItemAdminLimit(limit int) ExtraSchemaWorkItemAdminSelectConfigOption
WithExtraSchemaWorkItemAdminLimit limits row selection.
func WithExtraSchemaWorkItemAdminOrderBy ¶
func WithExtraSchemaWorkItemAdminOrderBy(rows map[string]*Direction) ExtraSchemaWorkItemAdminSelectConfigOption
WithExtraSchemaWorkItemAdminOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaWorkItemAdminUpdateParams ¶
type ExtraSchemaWorkItemAdminUpdateParams struct { Admin *ExtraSchemaUserID `json:"admin" nullable:"false"` // admin WorkItemID *ExtraSchemaWorkItemID `json:"workItemID" nullable:"false"` // work_item_id }
ExtraSchemaWorkItemAdminUpdateParams represents update params for 'extra_schema.work_item_admin'.
func (ExtraSchemaWorkItemAdminUpdateParams) GetAdmin ¶
func (p ExtraSchemaWorkItemAdminUpdateParams) GetAdmin() *ExtraSchemaUserID
func (ExtraSchemaWorkItemAdminUpdateParams) GetWorkItemID ¶
func (p ExtraSchemaWorkItemAdminUpdateParams) GetWorkItemID() *ExtraSchemaWorkItemID
type ExtraSchemaWorkItemAssignee ¶
type ExtraSchemaWorkItemAssignee struct { WorkItemID ExtraSchemaWorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Assignee ExtraSchemaUserID `json:"assignee" db:"assignee" required:"true" nullable:"false"` // assignee ExtraSchemaRole *ExtraSchemaWorkItemRole `json:"role" db:"role" required:"true" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemsJoin *[]ExtraSchemaWorkItemAssigneeM2MWorkItemWIA `json:"-" db:"work_item_assignee_work_items"` // M2M work_item_assignee AssigneesJoin *[]ExtraSchemaWorkItemAssigneeM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee }
ExtraSchemaWorkItemAssignee represents a row from 'extra_schema.work_item_assignee'.
func CreateExtraSchemaWorkItemAssignee ¶
func CreateExtraSchemaWorkItemAssignee(ctx context.Context, db DB, params *ExtraSchemaWorkItemAssigneeCreateParams) (*ExtraSchemaWorkItemAssignee, error)
CreateExtraSchemaWorkItemAssignee creates a new ExtraSchemaWorkItemAssignee in the database with the given params.
func ExtraSchemaWorkItemAssigneeByWorkItemIDAssignee ¶
func ExtraSchemaWorkItemAssigneeByWorkItemIDAssignee(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, assignee ExtraSchemaUserID, opts ...ExtraSchemaWorkItemAssigneeSelectConfigOption) (*ExtraSchemaWorkItemAssignee, error)
ExtraSchemaWorkItemAssigneeByWorkItemIDAssignee retrieves a row from 'extra_schema.work_item_assignee' as a ExtraSchemaWorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func ExtraSchemaWorkItemAssigneePaginated ¶
func ExtraSchemaWorkItemAssigneePaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ExtraSchemaWorkItemAssigneeSelectConfigOption) ([]ExtraSchemaWorkItemAssignee, error)
ExtraSchemaWorkItemAssigneePaginated returns a cursor-paginated list of ExtraSchemaWorkItemAssignee. At least one cursor is required.
func ExtraSchemaWorkItemAssigneesByAssignee ¶
func ExtraSchemaWorkItemAssigneesByAssignee(ctx context.Context, db DB, assignee ExtraSchemaUserID, opts ...ExtraSchemaWorkItemAssigneeSelectConfigOption) ([]ExtraSchemaWorkItemAssignee, error)
ExtraSchemaWorkItemAssigneesByAssignee retrieves a row from 'extra_schema.work_item_assignee' as a ExtraSchemaWorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func ExtraSchemaWorkItemAssigneesByAssigneeWorkItemID ¶
func ExtraSchemaWorkItemAssigneesByAssigneeWorkItemID(ctx context.Context, db DB, assignee ExtraSchemaUserID, workItemID ExtraSchemaWorkItemID, opts ...ExtraSchemaWorkItemAssigneeSelectConfigOption) ([]ExtraSchemaWorkItemAssignee, error)
ExtraSchemaWorkItemAssigneesByAssigneeWorkItemID retrieves a row from 'extra_schema.work_item_assignee' as a ExtraSchemaWorkItemAssignee.
Generated from index 'work_item_assignee_assignee_work_item_id_idx'.
func ExtraSchemaWorkItemAssigneesByWorkItemID ¶
func ExtraSchemaWorkItemAssigneesByWorkItemID(ctx context.Context, db DB, workItemID ExtraSchemaWorkItemID, opts ...ExtraSchemaWorkItemAssigneeSelectConfigOption) ([]ExtraSchemaWorkItemAssignee, error)
ExtraSchemaWorkItemAssigneesByWorkItemID retrieves a row from 'extra_schema.work_item_assignee' as a ExtraSchemaWorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func (*ExtraSchemaWorkItemAssignee) Delete ¶
func (eswia *ExtraSchemaWorkItemAssignee) Delete(ctx context.Context, db DB) error
Delete deletes the ExtraSchemaWorkItemAssignee from the database.
func (*ExtraSchemaWorkItemAssignee) FKUser_Assignee ¶
func (eswia *ExtraSchemaWorkItemAssignee) FKUser_Assignee(ctx context.Context, db DB) (*ExtraSchemaUser, error)
FKUser_Assignee returns the User associated with the ExtraSchemaWorkItemAssignee's (Assignee).
Generated from foreign key 'work_item_assignee_assignee_fkey'.
func (*ExtraSchemaWorkItemAssignee) FKWorkItem_WorkItemID ¶
func (eswia *ExtraSchemaWorkItemAssignee) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*ExtraSchemaWorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the ExtraSchemaWorkItemAssignee's (WorkItemID).
Generated from foreign key 'work_item_assignee_work_item_id_fkey'.
func (*ExtraSchemaWorkItemAssignee) Insert ¶
func (eswia *ExtraSchemaWorkItemAssignee) Insert(ctx context.Context, db DB) (*ExtraSchemaWorkItemAssignee, error)
Insert inserts the ExtraSchemaWorkItemAssignee to the database.
func (*ExtraSchemaWorkItemAssignee) SetUpdateParams ¶
func (eswia *ExtraSchemaWorkItemAssignee) SetUpdateParams(params *ExtraSchemaWorkItemAssigneeUpdateParams)
SetUpdateParams updates extra_schema.work_item_assignee struct fields with the specified params.
func (*ExtraSchemaWorkItemAssignee) Update ¶
func (eswia *ExtraSchemaWorkItemAssignee) Update(ctx context.Context, db DB) (*ExtraSchemaWorkItemAssignee, error)
Update updates a ExtraSchemaWorkItemAssignee in the database.
func (*ExtraSchemaWorkItemAssignee) Upsert ¶
func (eswia *ExtraSchemaWorkItemAssignee) Upsert(ctx context.Context, db DB, params *ExtraSchemaWorkItemAssigneeCreateParams) (*ExtraSchemaWorkItemAssignee, error)
Upsert upserts a ExtraSchemaWorkItemAssignee in the database. Requires appropriate PK(s) to be set beforehand.
type ExtraSchemaWorkItemAssigneeCreateParams ¶
type ExtraSchemaWorkItemAssigneeCreateParams struct { Assignee ExtraSchemaUserID `json:"assignee" required:"true" nullable:"false"` // assignee ExtraSchemaRole *ExtraSchemaWorkItemRole `json:"role" required:"true" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemID ExtraSchemaWorkItemID `json:"workItemID" required:"true" nullable:"false"` // work_item_id }
ExtraSchemaWorkItemAssigneeCreateParams represents insert params for 'extra_schema.work_item_assignee'.
func (ExtraSchemaWorkItemAssigneeCreateParams) GetAssignee ¶
func (p ExtraSchemaWorkItemAssigneeCreateParams) GetAssignee() *ExtraSchemaUserID
func (ExtraSchemaWorkItemAssigneeCreateParams) GetExtraSchemaRole ¶
func (p ExtraSchemaWorkItemAssigneeCreateParams) GetExtraSchemaRole() *ExtraSchemaWorkItemRole
func (ExtraSchemaWorkItemAssigneeCreateParams) GetWorkItemID ¶
func (p ExtraSchemaWorkItemAssigneeCreateParams) GetWorkItemID() *ExtraSchemaWorkItemID
type ExtraSchemaWorkItemAssigneeM2MAssigneeWIA ¶
type ExtraSchemaWorkItemAssigneeM2MAssigneeWIA struct { User ExtraSchemaUser `json:"user" db:"users" required:"true"` Role *ExtraSchemaWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
ExtraSchemaWorkItemAssigneeM2MAssigneeWIA represents a M2M join against "extra_schema.work_item_assignee"
type ExtraSchemaWorkItemAssigneeM2MWorkItemWIA ¶
type ExtraSchemaWorkItemAssigneeM2MWorkItemWIA struct { WorkItem ExtraSchemaWorkItem `json:"workItem" db:"work_items" required:"true"` Role *ExtraSchemaWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
ExtraSchemaWorkItemAssigneeM2MWorkItemWIA represents a M2M join against "extra_schema.work_item_assignee"
type ExtraSchemaWorkItemAssigneeParams ¶
type ExtraSchemaWorkItemAssigneeParams interface { GetAssignee() *ExtraSchemaUserID GetExtraSchemaRole() *ExtraSchemaWorkItemRole GetWorkItemID() *ExtraSchemaWorkItemID }
ExtraSchemaWorkItemAssigneeParams represents common params for both insert and update of 'extra_schema.work_item_assignee'.
type ExtraSchemaWorkItemAssigneeSelectConfig ¶
type ExtraSchemaWorkItemAssigneeSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaWorkItemAssigneeSelectConfigOption ¶
type ExtraSchemaWorkItemAssigneeSelectConfigOption func(*ExtraSchemaWorkItemAssigneeSelectConfig)
func WithExtraSchemaWorkItemAssigneeFilters ¶
func WithExtraSchemaWorkItemAssigneeFilters(filters map[string][]any) ExtraSchemaWorkItemAssigneeSelectConfigOption
WithExtraSchemaWorkItemAssigneeFilters 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 WithExtraSchemaWorkItemAssigneeHavingClause ¶
func WithExtraSchemaWorkItemAssigneeHavingClause(conditions map[string][]any) ExtraSchemaWorkItemAssigneeSelectConfigOption
WithExtraSchemaWorkItemAssigneeHavingClause 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 WithExtraSchemaWorkItemAssigneeJoin ¶
func WithExtraSchemaWorkItemAssigneeJoin(joins ExtraSchemaWorkItemAssigneeJoins) ExtraSchemaWorkItemAssigneeSelectConfigOption
WithExtraSchemaWorkItemAssigneeJoin joins with the given tables.
func WithExtraSchemaWorkItemAssigneeLimit ¶
func WithExtraSchemaWorkItemAssigneeLimit(limit int) ExtraSchemaWorkItemAssigneeSelectConfigOption
WithExtraSchemaWorkItemAssigneeLimit limits row selection.
func WithExtraSchemaWorkItemAssigneeOrderBy ¶
func WithExtraSchemaWorkItemAssigneeOrderBy(rows map[string]*Direction) ExtraSchemaWorkItemAssigneeSelectConfigOption
WithExtraSchemaWorkItemAssigneeOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaWorkItemAssigneeUpdateParams ¶
type ExtraSchemaWorkItemAssigneeUpdateParams struct { Assignee *ExtraSchemaUserID `json:"assignee" nullable:"false"` // assignee ExtraSchemaRole **ExtraSchemaWorkItemRole `json:"role" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemID *ExtraSchemaWorkItemID `json:"workItemID" nullable:"false"` // work_item_id }
ExtraSchemaWorkItemAssigneeUpdateParams represents update params for 'extra_schema.work_item_assignee'.
func (ExtraSchemaWorkItemAssigneeUpdateParams) GetAssignee ¶
func (p ExtraSchemaWorkItemAssigneeUpdateParams) GetAssignee() *ExtraSchemaUserID
func (ExtraSchemaWorkItemAssigneeUpdateParams) GetExtraSchemaRole ¶
func (p ExtraSchemaWorkItemAssigneeUpdateParams) GetExtraSchemaRole() *ExtraSchemaWorkItemRole
func (ExtraSchemaWorkItemAssigneeUpdateParams) GetWorkItemID ¶
func (p ExtraSchemaWorkItemAssigneeUpdateParams) GetWorkItemID() *ExtraSchemaWorkItemID
type ExtraSchemaWorkItemCreateParams ¶
type ExtraSchemaWorkItemCreateParams struct { Description *string `json:"description"` // description Title *string `json:"title"` // title }
ExtraSchemaWorkItemCreateParams represents insert params for 'extra_schema.work_items'.
func (ExtraSchemaWorkItemCreateParams) GetDescription ¶
func (p ExtraSchemaWorkItemCreateParams) GetDescription() *string
func (ExtraSchemaWorkItemCreateParams) GetTitle ¶
func (p ExtraSchemaWorkItemCreateParams) GetTitle() *string
type ExtraSchemaWorkItemID ¶
type ExtraSchemaWorkItemID int
type ExtraSchemaWorkItemJoins ¶
type ExtraSchemaWorkItemJoins struct { DemoWorkItem bool `json:"demoWorkItem" required:"true" nullable:"false"` // O2O demo_work_items Admins bool `json:"admins" required:"true" nullable:"false"` // M2M work_item_admin Assignees bool `json:"assignees" required:"true" nullable:"false"` // M2M work_item_assignee }
type ExtraSchemaWorkItemM2MAssigneeWIA ¶
type ExtraSchemaWorkItemM2MAssigneeWIA struct { User ExtraSchemaUser `json:"user" db:"users" required:"true"` Role *ExtraSchemaWorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
ExtraSchemaWorkItemM2MAssigneeWIA represents a M2M join against "extra_schema.work_item_assignee"
type ExtraSchemaWorkItemParams ¶
ExtraSchemaWorkItemParams represents common params for both insert and update of 'extra_schema.work_items'.
type ExtraSchemaWorkItemRole ¶
type ExtraSchemaWorkItemRole string
ExtraSchemaWorkItemRole is the 'work_item_role' enum type from schema 'extra_schema'.
const ( // ExtraSchemaWorkItemRoleExtraPreparer is the 'extra_preparer' work_item_role. ExtraSchemaWorkItemRoleExtraPreparer ExtraSchemaWorkItemRole = "extra_preparer" // ExtraSchemaWorkItemRoleExtraReviewer is the 'extra_reviewer' work_item_role. ExtraSchemaWorkItemRoleExtraReviewer ExtraSchemaWorkItemRole = "extra_reviewer" )
ExtraSchemaWorkItemRole values.
func AllExtraSchemaWorkItemRoleValues ¶
func AllExtraSchemaWorkItemRoleValues() []ExtraSchemaWorkItemRole
func (*ExtraSchemaWorkItemRole) Scan ¶
func (eswir *ExtraSchemaWorkItemRole) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface.
type ExtraSchemaWorkItemSelectConfig ¶
type ExtraSchemaWorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type ExtraSchemaWorkItemSelectConfigOption ¶
type ExtraSchemaWorkItemSelectConfigOption func(*ExtraSchemaWorkItemSelectConfig)
func WithExtraSchemaWorkItemFilters ¶
func WithExtraSchemaWorkItemFilters(filters map[string][]any) ExtraSchemaWorkItemSelectConfigOption
WithExtraSchemaWorkItemFilters 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 WithExtraSchemaWorkItemHavingClause ¶
func WithExtraSchemaWorkItemHavingClause(conditions map[string][]any) ExtraSchemaWorkItemSelectConfigOption
WithExtraSchemaWorkItemHavingClause 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 WithExtraSchemaWorkItemJoin ¶
func WithExtraSchemaWorkItemJoin(joins ExtraSchemaWorkItemJoins) ExtraSchemaWorkItemSelectConfigOption
WithExtraSchemaWorkItemJoin joins with the given tables.
func WithExtraSchemaWorkItemLimit ¶
func WithExtraSchemaWorkItemLimit(limit int) ExtraSchemaWorkItemSelectConfigOption
WithExtraSchemaWorkItemLimit limits row selection.
func WithExtraSchemaWorkItemOrderBy ¶
func WithExtraSchemaWorkItemOrderBy(rows map[string]*Direction) ExtraSchemaWorkItemSelectConfigOption
WithExtraSchemaWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ExtraSchemaWorkItemUpdateParams ¶
type ExtraSchemaWorkItemUpdateParams struct { Description **string `json:"description"` // description Title **string `json:"title"` // title }
ExtraSchemaWorkItemUpdateParams represents update params for 'extra_schema.work_items'.
func (ExtraSchemaWorkItemUpdateParams) GetDescription ¶
func (p ExtraSchemaWorkItemUpdateParams) GetDescription() *string
func (ExtraSchemaWorkItemUpdateParams) GetTitle ¶
func (p ExtraSchemaWorkItemUpdateParams) GetTitle() *string
type GetCacheDemoWorkItemQueryParameters ¶
type GetCacheDemoWorkItemQueryParameters struct {
Joins *ModelsCacheDemoWorkItemJoins `json:"joins,omitempty"`
}
GetCacheDemoWorkItemQueryParameters defines the model for GetCacheDemoWorkItemQueryParameters.
type GetCurrentUserQueryParameters ¶
type GetCurrentUserQueryParameters struct {
Joins *ModelsUserJoins `json:"joins,omitempty"`
}
GetCurrentUserQueryParameters defines the model for GetCurrentUserQueryParameters.
type GetExtraSchemaNotificationsParams ¶
type GetExtraSchemaNotificationsParams struct { UserID uuid.UUID `db:"user_id" json:"user_id"` NotificationType ExtraSchemaNotificationType `db:"notification_type" json:"notification_type"` }
type GetExtraSchemaNotificationsRow ¶
type GetExtraSchemaNotificationsRow struct { NotificationType ExtraSchemaNotificationType `db:"notification_type" json:"notification_type"` Sender uuid.UUID `db:"sender" json:"sender"` }
type GetPaginatedNotificationsParams ¶
type GetPaginatedNotificationsParams struct { Limit int `form:"limit" json:"limit"` Direction Direction `form:"direction" json:"direction"` Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` }
GetPaginatedNotificationsParams defines parameters for GetPaginatedNotifications.
type GetPaginatedUsersParams ¶
type GetPaginatedUsersParams struct { Limit int `form:"limit" json:"limit"` Direction Direction `form:"direction" json:"direction"` Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` Column string `form:"column" json:"column"` SearchQuery *GetPaginatedUsersQueryParameters `json:"searchQuery,omitempty"` }
GetPaginatedUsersParams defines parameters for GetPaginatedUsers.
type GetPaginatedUsersQueryParameters ¶
type GetPaginatedUsersQueryParameters struct { // Items represents pagination data indexed by column id Items *PaginationItems `json:"items,omitempty"` // Role is generated from roles.json keys. Role *Role `json:"role,omitempty"` }
GetPaginatedUsersQueryParameters defines the model for GetPaginatedUsersQueryParameters.
type GetPaginatedWorkItemParams ¶
type GetPaginatedWorkItemParams struct { Limit int `form:"limit" json:"limit"` Direction Direction `form:"direction" json:"direction"` Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"` SearchQuery *GetCacheDemoWorkItemQueryParameters `json:"searchQuery,omitempty"` }
GetPaginatedWorkItemParams defines parameters for GetPaginatedWorkItem.
type GetProjectWorkitemsParams ¶
type GetProjectWorkitemsParams struct { Open *bool `form:"open,omitempty" json:"open,omitempty"` Deleted *bool `form:"deleted,omitempty" json:"deleted,omitempty"` }
GetProjectWorkitemsParams defines parameters for GetProjectWorkitems.
type GetUserNotificationsRow ¶
type GetUserNotificationsRow struct { UserNotificationID int64 `db:"user_notification_id" json:"user_notification_id"` NotificationID int32 `db:"notification_id" json:"notification_id"` Read bool `db:"read" json:"read"` UserID uuid.UUID `db:"user_id" json:"user_id"` NotificationType NotificationType `db:"notification_type" json:"notification_type"` Sender uuid.UUID `db:"sender" json:"sender"` Title string `db:"title" json:"title"` Body string `db:"body" json:"body"` Labels []string `db:"labels" json:"labels"` Link *string `db:"link" json:"link"` }
type GetUserParams ¶
type GetUserRow ¶
type GetUserRow struct { Username string `db:"username" json:"username"` Email string `db:"email" json:"email"` RoleRank int16 `db:"role_rank" json:"role_rank"` CreatedAt time.Time `db:"created_at" json:"created_at"` UpdatedAt time.Time `db:"updated_at" json:"updated_at"` UserID uuid.UUID `db:"user_id" json:"user_id"` }
type HTTPError ¶
type HTTPError struct { Detail string `json:"detail"` Error string `json:"error"` // Loc location in body path, if any Loc *[]string `json:"loc,omitempty"` Status int `json:"status"` Title string `json:"title"` // Type Represents standardized HTTP error types. // Notes: // - 'Private' marks an error to be hidden in response. Type ErrorCode `json:"type"` ValidationError *HTTPValidationError `json:"validationError,omitempty"` }
HTTPError represents an error message response.
type HTTPValidationError ¶
type HTTPValidationError struct { // Detail Additional details for validation errors Detail *[]ValidationError `json:"detail,omitempty"` // Messages Descriptive error messages to show in a callout Messages []string `json:"messages"` }
HTTPValidationError defines the model for HTTPValidationError.
type InitializeProjectJSONRequestBody ¶
type InitializeProjectJSONRequestBody = CreateProjectBoardRequest
InitializeProjectJSONRequestBody defines body for InitializeProject for application/json ContentType.
type IsTeamInProjectParams ¶
type KanbanStep ¶
type KanbanStep struct { KanbanStepID KanbanStepID `json:"kanbanStepID" db:"kanban_step_id" required:"true" nullable:"false"` // kanban_step_id ProjectID ProjectID `json:"projectID" db:"project_id" required:"true" nullable:"false"` // project_id StepOrder int `json:"stepOrder" db:"step_order" required:"true" nullable:"false"` // step_order Name string `json:"name" db:"name" required:"true" nullable:"false"` // name Description string `json:"description" db:"description" required:"true" nullable:"false"` // description Color string `json:"color" db:"color" required:"true" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color TimeTrackable bool `json:"timeTrackable" db:"time_trackable" required:"true" nullable:"false"` // time_trackable ProjectJoin *Project `json:"-" db:"project_project_id"` // O2O projects (generated from M2O) }
KanbanStep represents a row from 'public.kanban_steps'.
func CreateKanbanStep ¶
func CreateKanbanStep(ctx context.Context, db DB, params *KanbanStepCreateParams) (*KanbanStep, error)
CreateKanbanStep creates a new KanbanStep in the database with the given params.
func KanbanStepByKanbanStepID ¶
func KanbanStepByKanbanStepID(ctx context.Context, db DB, kanbanStepID KanbanStepID, opts ...KanbanStepSelectConfigOption) (*KanbanStep, error)
KanbanStepByKanbanStepID retrieves a row from 'public.kanban_steps' as a KanbanStep.
Generated from index 'kanban_steps_pkey'.
func KanbanStepByProjectIDNameStepOrder ¶
func KanbanStepByProjectIDNameStepOrder(ctx context.Context, db DB, projectID ProjectID, name string, stepOrder int, opts ...KanbanStepSelectConfigOption) (*KanbanStep, error)
KanbanStepByProjectIDNameStepOrder retrieves a row from 'public.kanban_steps' as a KanbanStep.
Generated from index 'kanban_steps_project_id_name_step_order_idx'.
func KanbanStepByProjectIDStepOrder ¶
func KanbanStepByProjectIDStepOrder(ctx context.Context, db DB, projectID ProjectID, stepOrder int, opts ...KanbanStepSelectConfigOption) (*KanbanStep, error)
KanbanStepByProjectIDStepOrder retrieves a row from 'public.kanban_steps' as a KanbanStep.
Generated from index 'kanban_steps_project_id_step_order_key'.
func KanbanStepPaginated ¶
func KanbanStepPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...KanbanStepSelectConfigOption) ([]KanbanStep, error)
KanbanStepPaginated returns a cursor-paginated list of KanbanStep. At least one cursor is required.
func KanbanStepsByName ¶
func KanbanStepsByName(ctx context.Context, db DB, name string, opts ...KanbanStepSelectConfigOption) ([]KanbanStep, error)
KanbanStepsByName retrieves a row from 'public.kanban_steps' as a KanbanStep.
Generated from index 'kanban_steps_project_id_name_step_order_idx'.
func KanbanStepsByProjectID ¶
func KanbanStepsByProjectID(ctx context.Context, db DB, projectID ProjectID, opts ...KanbanStepSelectConfigOption) ([]KanbanStep, error)
KanbanStepsByProjectID retrieves a row from 'public.kanban_steps' as a KanbanStep.
Generated from index 'kanban_steps_project_id_name_step_order_idx'.
func KanbanStepsByStepOrder ¶
func KanbanStepsByStepOrder(ctx context.Context, db DB, stepOrder int, opts ...KanbanStepSelectConfigOption) ([]KanbanStep, error)
KanbanStepsByStepOrder retrieves a row from 'public.kanban_steps' as a KanbanStep.
Generated from index 'kanban_steps_project_id_name_step_order_idx'.
func (*KanbanStep) Delete ¶
func (ks *KanbanStep) Delete(ctx context.Context, db DB) error
Delete deletes the KanbanStep from the database.
func (*KanbanStep) FKProject_ProjectID ¶
FKProject_ProjectID returns the Project associated with the KanbanStep's (ProjectID).
Generated from foreign key 'kanban_steps_project_id_fkey'.
func (*KanbanStep) Insert ¶
func (ks *KanbanStep) Insert(ctx context.Context, db DB) (*KanbanStep, error)
Insert inserts the KanbanStep to the database.
func (*KanbanStep) SetUpdateParams ¶
func (ks *KanbanStep) SetUpdateParams(params *KanbanStepUpdateParams)
SetUpdateParams updates public.kanban_steps struct fields with the specified params.
func (*KanbanStep) Update ¶
func (ks *KanbanStep) Update(ctx context.Context, db DB) (*KanbanStep, error)
Update updates a KanbanStep in the database.
func (*KanbanStep) Upsert ¶
func (ks *KanbanStep) Upsert(ctx context.Context, db DB, params *KanbanStepCreateParams) (*KanbanStep, error)
Upsert upserts a KanbanStep in the database. Requires appropriate PK(s) to be set beforehand.
type KanbanStepCreateParams ¶
type KanbanStepCreateParams struct { Color string `json:"color" required:"true" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color Description string `json:"description" required:"true" nullable:"false"` // description Name string `json:"name" required:"true" nullable:"false"` // name ProjectID ProjectID `json:"-"` // project_id StepOrder int `json:"stepOrder" required:"true" nullable:"false"` // step_order TimeTrackable bool `json:"timeTrackable" required:"true" nullable:"false"` // time_trackable }
KanbanStepCreateParams represents insert params for 'public.kanban_steps'.
func (KanbanStepCreateParams) GetColor ¶
func (p KanbanStepCreateParams) GetColor() *string
func (KanbanStepCreateParams) GetDescription ¶
func (p KanbanStepCreateParams) GetDescription() *string
func (KanbanStepCreateParams) GetName ¶
func (p KanbanStepCreateParams) GetName() *string
func (KanbanStepCreateParams) GetProjectID ¶
func (p KanbanStepCreateParams) GetProjectID() *ProjectID
func (KanbanStepCreateParams) GetStepOrder ¶
func (p KanbanStepCreateParams) GetStepOrder() *int
func (KanbanStepCreateParams) GetTimeTrackable ¶
func (p KanbanStepCreateParams) GetTimeTrackable() *bool
type KanbanStepID ¶
type KanbanStepID int
type KanbanStepJoins ¶
type KanbanStepJoins struct {
Project bool `json:"project" required:"true" nullable:"false"` // O2O projects
}
type KanbanStepParams ¶
type KanbanStepParams interface { GetColor() *string GetDescription() *string GetName() *string GetProjectID() *ProjectID GetStepOrder() *int GetTimeTrackable() *bool }
KanbanStepParams represents common params for both insert and update of 'public.kanban_steps'.
type KanbanStepSelectConfig ¶
type KanbanStepSelectConfig struct {
// contains filtered or unexported fields
}
type KanbanStepSelectConfigOption ¶
type KanbanStepSelectConfigOption func(*KanbanStepSelectConfig)
func WithKanbanStepFilters ¶
func WithKanbanStepFilters(filters map[string][]any) KanbanStepSelectConfigOption
WithKanbanStepFilters 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 WithKanbanStepHavingClause ¶
func WithKanbanStepHavingClause(conditions map[string][]any) KanbanStepSelectConfigOption
WithKanbanStepHavingClause 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 WithKanbanStepJoin ¶
func WithKanbanStepJoin(joins KanbanStepJoins) KanbanStepSelectConfigOption
WithKanbanStepJoin joins with the given tables.
func WithKanbanStepLimit ¶
func WithKanbanStepLimit(limit int) KanbanStepSelectConfigOption
WithKanbanStepLimit limits row selection.
func WithKanbanStepOrderBy ¶
func WithKanbanStepOrderBy(rows map[string]*Direction) KanbanStepSelectConfigOption
WithKanbanStepOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type KanbanStepUpdateParams ¶
type KanbanStepUpdateParams struct { Color *string `json:"color" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color Description *string `json:"description" nullable:"false"` // description Name *string `json:"name" nullable:"false"` // name ProjectID *ProjectID `json:"-"` // project_id StepOrder *int `json:"stepOrder" nullable:"false"` // step_order TimeTrackable *bool `json:"timeTrackable" nullable:"false"` // time_trackable }
KanbanStepUpdateParams represents update params for 'public.kanban_steps'.
func (KanbanStepUpdateParams) GetColor ¶
func (p KanbanStepUpdateParams) GetColor() *string
func (KanbanStepUpdateParams) GetDescription ¶
func (p KanbanStepUpdateParams) GetDescription() *string
func (KanbanStepUpdateParams) GetName ¶
func (p KanbanStepUpdateParams) GetName() *string
func (KanbanStepUpdateParams) GetProjectID ¶
func (p KanbanStepUpdateParams) GetProjectID() *ProjectID
func (KanbanStepUpdateParams) GetStepOrder ¶
func (p KanbanStepUpdateParams) GetStepOrder() *int
func (KanbanStepUpdateParams) GetTimeTrackable ¶
func (p KanbanStepUpdateParams) GetTimeTrackable() *bool
type ModelsCacheDemoWorkItemJoins ¶
type ModelsCacheDemoWorkItemJoins = CacheDemoWorkItemJoins
ModelsCacheDemoWorkItemJoins defines the model for ModelsCacheDemoWorkItemJoins.
type ModelsDemoTwoWorkItem ¶
type ModelsDemoTwoWorkItem = DemoTwoWorkItem
ModelsDemoTwoWorkItem defines the model for ModelsDemoTwoWorkItem.
type ModelsDemoTwoWorkItemCreateParams ¶
type ModelsDemoTwoWorkItemCreateParams = DemoTwoWorkItemCreateParams
ModelsDemoTwoWorkItemCreateParams defines the model for ModelsDemoTwoWorkItemCreateParams.
type ModelsDemoWorkItem ¶
type ModelsDemoWorkItem = DemoWorkItem
ModelsDemoWorkItem defines the model for ModelsDemoWorkItem.
type ModelsDemoWorkItemCreateParams ¶
type ModelsDemoWorkItemCreateParams = DemoWorkItemCreateParams
ModelsDemoWorkItemCreateParams defines the model for ModelsDemoWorkItemCreateParams.
type ModelsKanbanStep ¶
type ModelsKanbanStep = KanbanStep
ModelsKanbanStep defines the model for ModelsKanbanStep.
type ModelsNotification ¶
type ModelsNotification = Notification
ModelsNotification defines the model for ModelsNotification.
type ModelsProject ¶
type ModelsProject = Project
ModelsProject defines the model for ModelsProject.
type ModelsProjectConfig ¶
type ModelsProjectConfig = ProjectConfig
ModelsProjectConfig defines the model for ModelsProjectConfig.
type ModelsProjectConfigField ¶
type ModelsProjectConfigField = ProjectConfigField
ModelsProjectConfigField defines the model for ModelsProjectConfigField.
type ModelsTeamCreateParams ¶
type ModelsTeamCreateParams = TeamCreateParams
ModelsTeamCreateParams defines the model for ModelsTeamCreateParams.
type ModelsTimeEntry ¶
type ModelsTimeEntry = TimeEntry
ModelsTimeEntry defines the model for ModelsTimeEntry.
type ModelsUserAPIKey ¶
type ModelsUserAPIKey = UserAPIKey
ModelsUserAPIKey defines the model for ModelsUserAPIKey.
type ModelsUserJoins ¶
type ModelsUserJoins = UserJoins
ModelsUserJoins defines the model for ModelsUserJoins.
type ModelsWorkItem ¶
type ModelsWorkItem = WorkItem
ModelsWorkItem defines the model for ModelsWorkItem.
type ModelsWorkItemComment ¶
type ModelsWorkItemComment = WorkItemComment
ModelsWorkItemComment defines the model for ModelsWorkItemComment.
type ModelsWorkItemCreateParams ¶
type ModelsWorkItemCreateParams = WorkItemCreateParams
ModelsWorkItemCreateParams defines the model for ModelsWorkItemCreateParams.
type ModelsWorkItemM2MAssigneeWIA ¶
type ModelsWorkItemM2MAssigneeWIA = WorkItemM2MAssigneeWIA
ModelsWorkItemM2MAssigneeWIA defines the model for ModelsWorkItemM2MAssigneeWIA.
type ModelsWorkItemTag ¶
type ModelsWorkItemTag = WorkItemTag
ModelsWorkItemTag defines the model for ModelsWorkItemTag.
type ModelsWorkItemTagCreateParams ¶
type ModelsWorkItemTagCreateParams = WorkItemTagCreateParams
ModelsWorkItemTagCreateParams defines the model for ModelsWorkItemTagCreateParams.
type ModelsWorkItemType ¶
type ModelsWorkItemType = WorkItemType
ModelsWorkItemType defines the model for ModelsWorkItemType.
type Movie ¶
type Movie struct { MovieID MovieID `json:"movieID" db:"movie_id" required:"true" nullable:"false"` // movie_id Title string `json:"title" db:"title" required:"true" nullable:"false"` // title Year int `json:"year" db:"year" required:"true" nullable:"false"` // year Synopsis string `json:"synopsis" db:"synopsis" required:"true" nullable:"false"` // synopsis }
Movie represents a row from 'public.movies'.
func CreateMovie ¶
CreateMovie creates a new Movie in the database with the given params.
func MovieByMovieID ¶
func MovieByMovieID(ctx context.Context, db DB, movieID MovieID, opts ...MovieSelectConfigOption) (*Movie, error)
MovieByMovieID retrieves a row from 'public.movies' as a Movie.
Generated from index 'movies_pkey'.
func MoviePaginated ¶
func MoviePaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...MovieSelectConfigOption) ([]Movie, error)
MoviePaginated returns a cursor-paginated list of Movie. At least one cursor is required.
func (*Movie) SetUpdateParams ¶
func (m *Movie) SetUpdateParams(params *MovieUpdateParams)
SetUpdateParams updates public.movies struct fields with the specified params.
type MovieCreateParams ¶
type MovieCreateParams struct { Synopsis string `json:"synopsis" required:"true" nullable:"false"` // synopsis Title string `json:"title" required:"true" nullable:"false"` // title Year int `json:"year" required:"true" nullable:"false"` // year }
MovieCreateParams represents insert params for 'public.movies'.
func (MovieCreateParams) GetSynopsis ¶
func (p MovieCreateParams) GetSynopsis() *string
func (MovieCreateParams) GetTitle ¶
func (p MovieCreateParams) GetTitle() *string
func (MovieCreateParams) GetYear ¶
func (p MovieCreateParams) GetYear() *int
type MovieJoins ¶
type MovieJoins struct { }
type MovieParams ¶
MovieParams represents common params for both insert and update of 'public.movies'.
type MovieSelectConfig ¶
type MovieSelectConfig struct {
// contains filtered or unexported fields
}
type MovieSelectConfigOption ¶
type MovieSelectConfigOption func(*MovieSelectConfig)
func WithMovieFilters ¶
func WithMovieFilters(filters map[string][]any) MovieSelectConfigOption
WithMovieFilters 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 WithMovieHavingClause ¶
func WithMovieHavingClause(conditions map[string][]any) MovieSelectConfigOption
WithMovieHavingClause 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 WithMovieJoin ¶
func WithMovieJoin(joins MovieJoins) MovieSelectConfigOption
WithMovieJoin joins with the given tables.
func WithMovieLimit ¶
func WithMovieLimit(limit int) MovieSelectConfigOption
WithMovieLimit limits row selection.
func WithMovieOrderBy ¶
func WithMovieOrderBy(rows map[string]*Direction) MovieSelectConfigOption
WithMovieOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type MovieUpdateParams ¶
type MovieUpdateParams struct { Synopsis *string `json:"synopsis" nullable:"false"` // synopsis Title *string `json:"title" nullable:"false"` // title Year *int `json:"year" nullable:"false"` // year }
MovieUpdateParams represents update params for 'public.movies'.
func (MovieUpdateParams) GetSynopsis ¶
func (p MovieUpdateParams) GetSynopsis() *string
func (MovieUpdateParams) GetTitle ¶
func (p MovieUpdateParams) GetTitle() *string
func (MovieUpdateParams) GetYear ¶
func (p MovieUpdateParams) GetYear() *int
type MyProviderLoginParams ¶
type MyProviderLoginParams struct {
AuthRedirectUri string `form:"auth-redirect-uri" json:"auth-redirect-uri"`
}
MyProviderLoginParams defines parameters for MyProviderLogin.
type Notification ¶
type Notification struct { NotificationID NotificationID `json:"notificationID" db:"notification_id" required:"true" nullable:"false"` // notification_id ReceiverRank *int `json:"-" db:"receiver_rank"` // receiver_rank Title string `json:"title" db:"title" required:"true" nullable:"false"` // title Body string `json:"body" db:"body" required:"true" nullable:"false"` // body Labels []string `json:"labels" db:"labels" required:"true" nullable:"false"` // labels Link *string `json:"link" db:"link"` // link CreatedAt time.Time `json:"createdAt" db:"created_at" required:"true" nullable:"false"` // created_at Sender UserID `json:"sender" db:"sender" required:"true" nullable:"false"` // sender Receiver *UserID `json:"receiver" db:"receiver"` // receiver NotificationType NotificationType `json:"notificationType" db:"notification_type" required:"true" nullable:"false" ref:"#/components/schemas/NotificationType"` // notification_type UserReceiverJoin *User `json:"-" db:"user_receiver"` // O2O users (generated from M2O) UserSenderJoin *User `json:"-" db:"user_sender"` // O2O users (generated from M2O) UserNotificationsJoin *[]UserNotification `json:"-" db:"user_notifications"` // M2O notifications }
Notification represents a row from 'public.notifications'.
func CreateNotification ¶
func CreateNotification(ctx context.Context, db DB, params *NotificationCreateParams) (*Notification, error)
CreateNotification creates a new Notification in the database with the given params.
func NotificationByNotificationID ¶
func NotificationByNotificationID(ctx context.Context, db DB, notificationID NotificationID, opts ...NotificationSelectConfigOption) (*Notification, error)
NotificationByNotificationID retrieves a row from 'public.notifications' as a Notification.
Generated from index 'notifications_pkey'.
func NotificationPaginated ¶
func NotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...NotificationSelectConfigOption) ([]Notification, error)
NotificationPaginated returns a cursor-paginated list of Notification. At least one cursor is required.
func NotificationsByReceiverRankNotificationTypeCreatedAt ¶
func NotificationsByReceiverRankNotificationTypeCreatedAt(ctx context.Context, db DB, receiverRank *int, notificationType NotificationType, createdAt time.Time, opts ...NotificationSelectConfigOption) ([]Notification, error)
NotificationsByReceiverRankNotificationTypeCreatedAt retrieves a row from 'public.notifications' as a Notification.
Generated from index 'notifications_receiver_rank_notification_type_created_at_idx'.
func (*Notification) Delete ¶
func (n *Notification) Delete(ctx context.Context, db DB) error
Delete deletes the Notification from the database.
func (*Notification) FKUser_Receiver ¶
FKUser_Receiver returns the User associated with the Notification's (Receiver).
Generated from foreign key 'notifications_receiver_fkey'.
func (*Notification) FKUser_Sender ¶
FKUser_Sender returns the User associated with the Notification's (Sender).
Generated from foreign key 'notifications_sender_fkey'.
func (*Notification) Insert ¶
func (n *Notification) Insert(ctx context.Context, db DB) (*Notification, error)
Insert inserts the Notification to the database.
func (*Notification) SetUpdateParams ¶
func (n *Notification) SetUpdateParams(params *NotificationUpdateParams)
SetUpdateParams updates public.notifications struct fields with the specified params.
func (*Notification) Update ¶
func (n *Notification) Update(ctx context.Context, db DB) (*Notification, error)
Update updates a Notification in the database.
func (*Notification) Upsert ¶
func (n *Notification) Upsert(ctx context.Context, db DB, params *NotificationCreateParams) (*Notification, error)
Upsert upserts a Notification in the database. Requires appropriate PK(s) to be set beforehand.
type NotificationCreateParams ¶
type NotificationCreateParams struct { Body string `json:"body" required:"true" nullable:"false"` // body Labels []string `json:"labels" required:"true" nullable:"false"` // labels Link *string `json:"link"` // link NotificationType NotificationType `json:"notificationType" required:"true" nullable:"false" ref:"#/components/schemas/NotificationType"` // notification_type Receiver *UserID `json:"receiver"` // receiver ReceiverRank *int `json:"-"` // receiver_rank Sender UserID `json:"sender" required:"true" nullable:"false"` // sender Title string `json:"title" required:"true" nullable:"false"` // title }
NotificationCreateParams represents insert params for 'public.notifications'.
func (NotificationCreateParams) GetBody ¶
func (p NotificationCreateParams) GetBody() *string
func (NotificationCreateParams) GetLabels ¶
func (p NotificationCreateParams) GetLabels() *[]string
func (NotificationCreateParams) GetLink ¶
func (p NotificationCreateParams) GetLink() *string
func (NotificationCreateParams) GetNotificationType ¶
func (p NotificationCreateParams) GetNotificationType() *NotificationType
func (NotificationCreateParams) GetReceiver ¶
func (p NotificationCreateParams) GetReceiver() *UserID
func (NotificationCreateParams) GetReceiverRank ¶
func (p NotificationCreateParams) GetReceiverRank() *int
func (NotificationCreateParams) GetSender ¶
func (p NotificationCreateParams) GetSender() *UserID
func (NotificationCreateParams) GetTitle ¶
func (p NotificationCreateParams) GetTitle() *string
type NotificationID ¶
type NotificationID int
type NotificationJoins ¶
type NotificationJoins struct { UserReceiver bool `json:"userReceiver" required:"true" nullable:"false"` // O2O users UserSender bool `json:"userSender" required:"true" nullable:"false"` // O2O users UserNotifications bool `json:"userNotifications" required:"true" nullable:"false"` // M2O user_notifications }
type NotificationParams ¶
type NotificationParams interface { GetBody() *string GetLabels() *[]string GetLink() *string GetNotificationType() *NotificationType GetReceiver() *UserID GetReceiverRank() *int GetSender() *UserID GetTitle() *string }
NotificationParams represents common params for both insert and update of 'public.notifications'.
type NotificationResponse ¶
type NotificationResponse struct { Notification ModelsNotification `json:"notification"` NotificationID NotificationID `json:"notificationID"` Read bool `json:"read"` UserID ModelsUserID `json:"userID"` UserNotificationID UserNotificationID `json:"userNotificationID"` }
NotificationResponse defines the model for NotificationResponse.
type NotificationSelectConfig ¶
type NotificationSelectConfig struct {
// contains filtered or unexported fields
}
type NotificationSelectConfigOption ¶
type NotificationSelectConfigOption func(*NotificationSelectConfig)
func WithNotificationFilters ¶
func WithNotificationFilters(filters map[string][]any) NotificationSelectConfigOption
WithNotificationFilters 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 WithNotificationHavingClause ¶
func WithNotificationHavingClause(conditions map[string][]any) NotificationSelectConfigOption
WithNotificationHavingClause 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 WithNotificationJoin ¶
func WithNotificationJoin(joins NotificationJoins) NotificationSelectConfigOption
WithNotificationJoin joins with the given tables.
func WithNotificationLimit ¶
func WithNotificationLimit(limit int) NotificationSelectConfigOption
WithNotificationLimit limits row selection.
func WithNotificationOrderBy ¶
func WithNotificationOrderBy(rows map[string]*Direction) NotificationSelectConfigOption
WithNotificationOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type NotificationType ¶
type NotificationType string
NotificationType is the 'notification_type' enum type from schema 'public'.
const ( // NotificationTypePersonal is the 'personal' notification_type. NotificationTypePersonal NotificationType = "personal" // NotificationTypeGlobal is the 'global' notification_type. NotificationTypeGlobal NotificationType = "global" )
NotificationType values.
func AllNotificationTypeValues ¶
func AllNotificationTypeValues() []NotificationType
func (*NotificationType) Scan ¶
func (nt *NotificationType) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface.
type NotificationUpdateParams ¶
type NotificationUpdateParams struct { Body *string `json:"body" nullable:"false"` // body Labels *[]string `json:"labels" nullable:"false"` // labels Link **string `json:"link"` // link NotificationType *NotificationType `json:"notificationType" nullable:"false" ref:"#/components/schemas/NotificationType"` // notification_type Receiver **UserID `json:"receiver"` // receiver ReceiverRank **int `json:"-"` // receiver_rank Sender *UserID `json:"sender" nullable:"false"` // sender Title *string `json:"title" nullable:"false"` // title }
NotificationUpdateParams represents update params for 'public.notifications'.
func (NotificationUpdateParams) GetBody ¶
func (p NotificationUpdateParams) GetBody() *string
func (NotificationUpdateParams) GetLabels ¶
func (p NotificationUpdateParams) GetLabels() *[]string
func (NotificationUpdateParams) GetLink ¶
func (p NotificationUpdateParams) GetLink() *string
func (NotificationUpdateParams) GetNotificationType ¶
func (p NotificationUpdateParams) GetNotificationType() *NotificationType
func (NotificationUpdateParams) GetReceiver ¶
func (p NotificationUpdateParams) GetReceiver() *UserID
func (NotificationUpdateParams) GetReceiverRank ¶
func (p NotificationUpdateParams) GetReceiverRank() *int
func (NotificationUpdateParams) GetSender ¶
func (p NotificationUpdateParams) GetSender() *UserID
func (NotificationUpdateParams) GetTitle ¶
func (p NotificationUpdateParams) GetTitle() *string
type PaginatedDemoWorkItemsResponse ¶
type PaginatedDemoWorkItemsResponse struct { Items *[]CacheDemoWorkItemResponse `json:"items"` Page PaginationPage `json:"page"` }
PaginatedDemoWorkItemsResponse defines the model for PaginatedDemoWorkItemsResponse.
type PaginatedNotificationsResponse ¶
type PaginatedNotificationsResponse struct { Items *[]NotificationResponse `json:"items"` Page PaginationPage `json:"page"` }
PaginatedNotificationsResponse defines the model for PaginatedNotificationsResponse.
type PaginatedUsersResponse ¶
type PaginatedUsersResponse struct { Items *[]UserResponse `json:"items"` Page PaginationPage `json:"page"` }
PaginatedUsersResponse defines the model for PaginatedUsersResponse.
type Pagination ¶
type Pagination struct { Filter *PaginationFilter `json:"filter,omitempty"` Sort *Direction `json:"sort,omitempty"` }
Pagination defines the model for Pagination.
type PaginationCursor ¶
type PaginationCursor struct { // Column represents the JSON name of the models column Column string `json:"column"` Direction Direction `json:"direction"` // Value represents a cursor value Value *interface{} `json:"value"` }
PaginationCursor defines the model for PaginationCursor.
type PaginationFilter ¶
type PaginationFilter struct { FromQueryParams bool // contains filtered or unexported fields }
PaginationFilter defines the model for PaginationFilter.
func (PaginationFilter) AsPaginationFilterArray ¶
func (t PaginationFilter) AsPaginationFilterArray() (PaginationFilterArray, error)
AsPaginationFilterArray returns the union data inside the PaginationFilter as a PaginationFilterArray
func (PaginationFilter) AsPaginationFilterPrimitive ¶
func (t PaginationFilter) AsPaginationFilterPrimitive() (PaginationFilterPrimitive, error)
AsPaginationFilterPrimitive returns the union data inside the PaginationFilter as a PaginationFilterPrimitive
func (PaginationFilter) Discriminator ¶
func (t PaginationFilter) Discriminator() (string, error)
Discriminator via struct field FilterMode.
func (PaginationFilter) MarshalJSON ¶
func (t PaginationFilter) MarshalJSON() ([]byte, error)
func (*PaginationFilter) UnmarshalJSON ¶
func (t *PaginationFilter) UnmarshalJSON(b []byte) error
func (PaginationFilter) ValueByDiscriminator ¶
func (t PaginationFilter) ValueByDiscriminator() (interface{}, error)
type PaginationFilterArray ¶
type PaginationFilterArray struct { FilterMode PaginationFilterModes `json:"filterMode"` Value *[]string `json:"value"` }
PaginationFilterArray defines the model for PaginationFilterArray.
type PaginationFilterModes ¶
type PaginationFilterModes string
PaginationFilterModes defines the model for PaginationFilterModes.
const ( PaginationFilterModesBetween PaginationFilterModes = "between" PaginationFilterModesBetweenInclusive PaginationFilterModes = "betweenInclusive" PaginationFilterModesContains PaginationFilterModes = "contains" PaginationFilterModesEmpty PaginationFilterModes = "empty" PaginationFilterModesEndsWith PaginationFilterModes = "endsWith" PaginationFilterModesEquals PaginationFilterModes = "equals" PaginationFilterModesFuzzy PaginationFilterModes = "fuzzy" PaginationFilterModesGreaterThan PaginationFilterModes = "greaterThan" PaginationFilterModesGreaterThanOrEqualTo PaginationFilterModes = "greaterThanOrEqualTo" PaginationFilterModesLessThan PaginationFilterModes = "lessThan" PaginationFilterModesLessThanOrEqualTo PaginationFilterModes = "lessThanOrEqualTo" PaginationFilterModesNotEmpty PaginationFilterModes = "notEmpty" PaginationFilterModesNotEquals PaginationFilterModes = "notEquals" PaginationFilterModesStartsWith PaginationFilterModes = "startsWith" )
Defines values for PaginationFilterModes.
func AllPaginationFilterModesValues ¶
func AllPaginationFilterModesValues() []PaginationFilterModes
AllPaginationFilterModesValues returns all possible values for PaginationFilterModes.
type PaginationFilterPrimitive ¶
type PaginationFilterPrimitive struct { CaseSensitive *bool `json:"caseSensitive"` FilterMode PaginationFilterModes `json:"filterMode"` Value *string `json:"value"` }
PaginationFilterPrimitive defines the model for PaginationFilterPrimitive.
type PaginationItems ¶
type PaginationItems map[string]Pagination
PaginationItems represents pagination data indexed by column id
type PaginationPage ¶
type PaginationPage struct {
NextCursor *string `json:"nextCursor,omitempty"`
}
PaginationPage defines the model for PaginationPage.
type Project ¶
type Project struct { ProjectID ProjectID `json:"projectID" db:"project_id" required:"true" nullable:"false"` // project_id Name ProjectName `json:"name" db:"name" required:"true" nullable:"false" ref:"#/components/schemas/ProjectName"` // name Description string `json:"description" db:"description" required:"true" nullable:"false"` // description WorkItemsTableName string `json:"-" db:"work_items_table_name" nullable:"false"` // work_items_table_name BoardConfig ProjectConfig `json:"boardConfig" db:"board_config" required:"true" nullable:"false" ref:"#/components/schemas/ProjectConfig"` // board_config 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 ActivitiesJoin *[]Activity `json:"-" db:"activities"` // M2O projects KanbanStepsJoin *[]KanbanStep `json:"-" db:"kanban_steps"` // M2O projects TeamsJoin *[]Team `json:"-" db:"teams"` // M2O projects MembersJoin *[]User `json:"-" db:"user_project_members"` // M2M user_project WorkItemTagsJoin *[]WorkItemTag `json:"-" db:"work_item_tags"` // M2O projects WorkItemTypesJoin *[]WorkItemType `json:"-" db:"work_item_types"` // M2O projects }
Project represents a row from 'public.projects'.
func CreateProject ¶
CreateProject creates a new Project in the database with the given params.
func ProjectByName ¶
func ProjectByName(ctx context.Context, db DB, name ProjectName, opts ...ProjectSelectConfigOption) (*Project, error)
ProjectByName retrieves a row from 'public.projects' as a Project.
Generated from index 'projects_name_key'.
func ProjectByProjectID ¶
func ProjectByProjectID(ctx context.Context, db DB, projectID ProjectID, opts ...ProjectSelectConfigOption) (*Project, error)
ProjectByProjectID retrieves a row from 'public.projects' as a Project.
Generated from index 'projects_pkey'.
func ProjectByWorkItemsTableName ¶
func ProjectByWorkItemsTableName(ctx context.Context, db DB, workItemsTableName string, opts ...ProjectSelectConfigOption) (*Project, error)
ProjectByWorkItemsTableName retrieves a row from 'public.projects' as a Project.
Generated from index 'projects_work_items_table_name_key'.
func ProjectPaginated ¶
func ProjectPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...ProjectSelectConfigOption) ([]Project, error)
ProjectPaginated returns a cursor-paginated list of Project. At least one cursor is required.
func (*Project) SetUpdateParams ¶
func (p *Project) SetUpdateParams(params *ProjectUpdateParams)
SetUpdateParams updates public.projects struct fields with the specified params.
type ProjectBoard ¶
type ProjectBoard struct { // ProjectName is generated from projects table. ProjectName ProjectName `json:"projectName"` }
ProjectBoard defines the model for ProjectBoard.
type ProjectConfig ¶
type ProjectConfig struct { Fields *[]ProjectConfigField `json:"fields,omitempty"` Header *[]string `json:"header,omitempty"` Visualization *map[string]interface{} `json:"visualization,omitempty"` }
ProjectConfig defines the model for ProjectConfig.
type ProjectConfigField ¶
type ProjectConfigField struct { IsEditable bool `json:"isEditable"` IsVisible bool `json:"isVisible"` Name string `json:"name"` Path string `json:"path"` ShowCollapsed bool `json:"showCollapsed"` }
ProjectConfigField defines the model for ProjectConfigField.
type ProjectCreateParams ¶
type ProjectCreateParams struct { BoardConfig ProjectConfig `json:"boardConfig" required:"true" nullable:"false" ref:"#/components/schemas/ProjectConfig"` // board_config Description string `json:"description" required:"true" nullable:"false"` // description Name ProjectName `json:"name" required:"true" nullable:"false" ref:"#/components/schemas/ProjectName"` // name WorkItemsTableName string `json:"-" nullable:"false"` // work_items_table_name }
ProjectCreateParams represents insert params for 'public.projects'.
func (ProjectCreateParams) GetBoardConfig ¶
func (p ProjectCreateParams) GetBoardConfig() *ProjectConfig
func (ProjectCreateParams) GetDescription ¶
func (p ProjectCreateParams) GetDescription() *string
func (ProjectCreateParams) GetName ¶
func (p ProjectCreateParams) GetName() *ProjectName
func (ProjectCreateParams) GetWorkItemsTableName ¶
func (p ProjectCreateParams) GetWorkItemsTableName() *string
type ProjectJoins ¶
type ProjectJoins struct { Activities bool `json:"activities" required:"true" nullable:"false"` // M2O activities KanbanSteps bool `json:"kanbanSteps" required:"true" nullable:"false"` // M2O kanban_steps Teams bool `json:"teams" required:"true" nullable:"false"` // M2O teams Members bool `json:"members" required:"true" nullable:"false"` // M2M user_project WorkItemTags bool `json:"workItemTags" required:"true" nullable:"false"` // M2O work_item_tags WorkItemTypes bool `json:"workItemTypes" required:"true" nullable:"false"` // M2O work_item_types }
type ProjectName ¶
type ProjectName string
ProjectName is generated from projects table.
const ( ProjectNameDemo ProjectName = "demo" ProjectNameDemoTwo ProjectName = "demo_two" )
ProjectName is generated from projects table.
func AllProjectNameValues ¶
func AllProjectNameValues() []ProjectName
AllProjectNameValues returns all possible values for ProjectName.
type ProjectParams ¶
type ProjectParams interface { GetBoardConfig() *ProjectConfig GetDescription() *string GetName() *ProjectName GetWorkItemsTableName() *string }
ProjectParams represents common params for both insert and update of 'public.projects'.
type ProjectSelectConfig ¶
type ProjectSelectConfig struct {
// contains filtered or unexported fields
}
type ProjectSelectConfigOption ¶
type ProjectSelectConfigOption func(*ProjectSelectConfig)
func WithProjectFilters ¶
func WithProjectFilters(filters map[string][]any) ProjectSelectConfigOption
WithProjectFilters 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 WithProjectHavingClause ¶
func WithProjectHavingClause(conditions map[string][]any) ProjectSelectConfigOption
WithProjectHavingClause 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 WithProjectJoin ¶
func WithProjectJoin(joins ProjectJoins) ProjectSelectConfigOption
WithProjectJoin joins with the given tables.
func WithProjectLimit ¶
func WithProjectLimit(limit int) ProjectSelectConfigOption
WithProjectLimit limits row selection.
func WithProjectOrderBy ¶
func WithProjectOrderBy(rows map[string]*Direction) ProjectSelectConfigOption
WithProjectOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type ProjectUpdateParams ¶
type ProjectUpdateParams struct { BoardConfig *ProjectConfig `json:"boardConfig" nullable:"false" ref:"#/components/schemas/ProjectConfig"` // board_config Description *string `json:"description" nullable:"false"` // description Name *ProjectName `json:"name" nullable:"false" ref:"#/components/schemas/ProjectName"` // name WorkItemsTableName *string `json:"-" nullable:"false"` // work_items_table_name }
ProjectUpdateParams represents update params for 'public.projects'.
func (ProjectUpdateParams) GetBoardConfig ¶
func (p ProjectUpdateParams) GetBoardConfig() *ProjectConfig
func (ProjectUpdateParams) GetDescription ¶
func (p ProjectUpdateParams) GetDescription() *string
func (ProjectUpdateParams) GetName ¶
func (p ProjectUpdateParams) GetName() *ProjectName
func (ProjectUpdateParams) GetWorkItemsTableName ¶
func (p ProjectUpdateParams) GetWorkItemsTableName() *string
type Querier ¶
type Querier interface { // plpgsql-language-server:use-keyword-query-parameter GetExtraSchemaNotifications(ctx context.Context, d DBTX, arg GetExtraSchemaNotificationsParams) ([]GetExtraSchemaNotificationsRow, error) // plpgsql-language-server:use-keyword-query-parameter GetUser(ctx context.Context, d DBTX, arg GetUserParams) (GetUserRow, error) // plpgsql-language-server:use-keyword-query-parameter GetUserNotifications(ctx context.Context, d DBTX, arg GetUserNotificationsParams) ([]GetUserNotificationsRow, error) IsTeamInProject(ctx context.Context, d DBTX, arg IsTeamInProjectParams) (bool, error) }
type Queries ¶
type Queries struct { }
func (*Queries) GetExtraSchemaNotifications ¶
func (q *Queries) GetExtraSchemaNotifications(ctx context.Context, db DBTX, arg GetExtraSchemaNotificationsParams) ([]GetExtraSchemaNotificationsRow, error)
plpgsql-language-server:use-keyword-query-parameter
func (*Queries) GetUser ¶
func (q *Queries) GetUser(ctx context.Context, db DBTX, arg GetUserParams) (GetUserRow, error)
plpgsql-language-server:use-keyword-query-parameter
func (*Queries) GetUserNotifications ¶
func (q *Queries) GetUserNotifications(ctx context.Context, db DBTX, arg GetUserNotificationsParams) ([]GetUserNotificationsRow, error)
plpgsql-language-server:use-keyword-query-parameter
func (*Queries) IsTeamInProject ¶
type Role ¶
type Role string
Role is generated from roles.json keys.
const ( RoleAdmin Role = "admin" RoleAdvancedUser Role = "advancedUser" RoleGuest Role = "guest" RoleManager Role = "manager" RoleSuperAdmin Role = "superAdmin" RoleUser Role = "user" )
Role is generated from roles.json keys.
func AllRoleValues ¶
func AllRoleValues() []Role
AllRoleValues returns all possible values for Role.
type Scope ¶
type Scope string
Scope is generated from scopes.json keys.
const ( ScopeActivityCreate Scope = "activity:create" ScopeActivityDelete Scope = "activity:delete" ScopeActivityEdit Scope = "activity:edit" ScopeProjectMember Scope = "project-member" ScopeProjectSettingsWrite Scope = "project-settings:write" ScopeScopesWrite Scope = "scopes:write" ScopeTeamSettingsWrite Scope = "team-settings:write" ScopeUsersDelete Scope = "users:delete" ScopeUsersRead Scope = "users:read" ScopeUsersWrite Scope = "users:write" ScopeWorkItemCommentCreate Scope = "work-item-comment:create" ScopeWorkItemCommentDelete Scope = "work-item-comment:delete" ScopeWorkItemCommentEdit Scope = "work-item-comment:edit" ScopeWorkItemReview Scope = "work-item:review" ScopeWorkItemTagCreate Scope = "work-item-tag:create" ScopeWorkItemTagDelete Scope = "work-item-tag:delete" ScopeWorkItemTagEdit Scope = "work-item-tag:edit" )
Scope is generated from scopes.json keys.
func AllScopeValues ¶
func AllScopeValues() []Scope
AllScopeValues returns all possible values for Scope.
type ServicesMember ¶
type ServicesMember struct { // Role is generated from database enum 'work_item_role'. Role WorkItemRole `json:"role"` UserID ModelsUserID `json:"userID"` }
ServicesMember defines the model for ServicesMember.
type SharedWorkItemJoins ¶
type SharedWorkItemJoins struct {}
SharedWorkItemJoins defines the model for SharedWorkItemJoins.
type TableEntity ¶
type TableEntity string
const ( TableEntityActivity TableEntity = "activities" TableEntityCacheDemoTwoWorkItem TableEntity = "cache__demo_two_work_items" TableEntityCacheDemoWorkItem TableEntity = "cache__demo_work_items" TableEntityDemoTwoWorkItem TableEntity = "demo_two_work_items" TableEntityDemoWorkItem TableEntity = "demo_work_items" TableEntityEntityNotification TableEntity = "entity_notifications" TableEntityKanbanStep TableEntity = "kanban_steps" TableEntityMovie TableEntity = "movies" TableEntityNotification TableEntity = "notifications" TableEntityProject TableEntity = "projects" TableEntityTeam TableEntity = "teams" TableEntityTimeEntry TableEntity = "time_entries" TableEntityUser TableEntity = "users" TableEntityUserAPIKey TableEntity = "user_api_keys" TableEntityUserNotification TableEntity = "user_notifications" TableEntityUserProject TableEntity = "user_project" TableEntityUserTeam TableEntity = "user_team" TableEntityWorkItem TableEntity = "work_items" TableEntityWorkItemAssignee TableEntity = "work_item_assignee" TableEntityWorkItemComment TableEntity = "work_item_comments" TableEntityWorkItemTag TableEntity = "work_item_tags" TableEntityWorkItemType TableEntity = "work_item_types" TableEntityWorkItemWorkItemTag TableEntity = "work_item_work_item_tag" )
type Team ¶
type Team struct { TeamID TeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id ProjectID ProjectID `json:"projectID" db:"project_id" required:"true" nullable:"false"` // project_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name Description string `json:"description" db:"description" required:"true" nullable:"false"` // description 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 ProjectJoin *Project `json:"-" db:"project_project_id"` // O2O projects (generated from M2O) TimeEntriesJoin *[]TimeEntry `json:"-" db:"time_entries"` // M2O teams MembersJoin *[]User `json:"-" db:"user_team_members"` // M2M user_team }
Team represents a row from 'public.teams'.
func CreateTeam ¶
CreateTeam creates a new Team in the database with the given params.
func TeamByNameProjectID ¶
func TeamByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, opts ...TeamSelectConfigOption) (*Team, error)
TeamByNameProjectID retrieves a row from 'public.teams' as a Team.
Generated from index 'teams_name_project_id_key'.
func TeamByTeamID ¶
func TeamByTeamID(ctx context.Context, db DB, teamID TeamID, opts ...TeamSelectConfigOption) (*Team, error)
TeamByTeamID retrieves a row from 'public.teams' as a Team.
Generated from index 'teams_pkey'.
func TeamPaginated ¶
func TeamPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...TeamSelectConfigOption) ([]Team, error)
TeamPaginated returns a cursor-paginated list of Team. At least one cursor is required.
func TeamsByName ¶
func TeamsByName(ctx context.Context, db DB, name string, opts ...TeamSelectConfigOption) ([]Team, error)
TeamsByName retrieves a row from 'public.teams' as a Team.
Generated from index 'teams_name_project_id_key'.
func TeamsByProjectID ¶
func TeamsByProjectID(ctx context.Context, db DB, projectID ProjectID, opts ...TeamSelectConfigOption) ([]Team, error)
TeamsByProjectID retrieves a row from 'public.teams' as a Team.
Generated from index 'teams_name_project_id_key'.
func (*Team) FKProject_ProjectID ¶
FKProject_ProjectID returns the Project associated with the Team's (ProjectID).
Generated from foreign key 'teams_project_id_fkey'.
func (*Team) SetUpdateParams ¶
func (t *Team) SetUpdateParams(params *TeamUpdateParams)
SetUpdateParams updates public.teams struct fields with the specified params.
type TeamCreateParams ¶
type TeamCreateParams struct { Description string `json:"description" required:"true" nullable:"false"` // description Name string `json:"name" required:"true" nullable:"false"` // name ProjectID ProjectID `json:"-"` // project_id }
TeamCreateParams represents insert params for 'public.teams'.
func (TeamCreateParams) GetDescription ¶
func (p TeamCreateParams) GetDescription() *string
func (TeamCreateParams) GetName ¶
func (p TeamCreateParams) GetName() *string
func (TeamCreateParams) GetProjectID ¶
func (p TeamCreateParams) GetProjectID() *ProjectID
type TeamParams ¶
TeamParams represents common params for both insert and update of 'public.teams'.
type TeamResponse ¶
type TeamResponse struct { CreatedAt time.Time `json:"createdAt"` Description string `json:"description"` Name string `json:"name"` ProjectID ProjectID `json:"projectID"` TeamID TeamID `json:"teamID"` UpdatedAt time.Time `json:"updatedAt"` }
TeamResponse defines the model for TeamResponse.
type TeamSelectConfig ¶
type TeamSelectConfig struct {
// contains filtered or unexported fields
}
type TeamSelectConfigOption ¶
type TeamSelectConfigOption func(*TeamSelectConfig)
func WithTeamFilters ¶
func WithTeamFilters(filters map[string][]any) TeamSelectConfigOption
WithTeamFilters 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 WithTeamHavingClause ¶
func WithTeamHavingClause(conditions map[string][]any) TeamSelectConfigOption
WithTeamHavingClause 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 WithTeamJoin ¶
func WithTeamJoin(joins TeamJoins) TeamSelectConfigOption
WithTeamJoin joins with the given tables.
func WithTeamLimit ¶
func WithTeamLimit(limit int) TeamSelectConfigOption
WithTeamLimit limits row selection.
func WithTeamOrderBy ¶
func WithTeamOrderBy(rows map[string]*Direction) TeamSelectConfigOption
WithTeamOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type TeamUpdateParams ¶
type TeamUpdateParams struct { Description *string `json:"description" nullable:"false"` // description Name *string `json:"name" nullable:"false"` // name ProjectID *ProjectID `json:"-"` // project_id }
TeamUpdateParams represents update params for 'public.teams'.
func (TeamUpdateParams) GetDescription ¶
func (p TeamUpdateParams) GetDescription() *string
func (TeamUpdateParams) GetName ¶
func (p TeamUpdateParams) GetName() *string
func (TeamUpdateParams) GetProjectID ¶
func (p TeamUpdateParams) GetProjectID() *ProjectID
type TimeEntry ¶
type TimeEntry struct { TimeEntryID TimeEntryID `json:"timeEntryID" db:"time_entry_id" required:"true" nullable:"false"` // time_entry_id WorkItemID *WorkItemID `json:"workItemID" db:"work_item_id"` // work_item_id ActivityID ActivityID `json:"activityID" db:"activity_id" required:"true" nullable:"false"` // activity_id TeamID *TeamID `json:"teamID" db:"team_id"` // team_id UserID UserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id Comment string `json:"comment" db:"comment" required:"true" nullable:"false"` // comment Start time.Time `json:"start" db:"start" required:"true" nullable:"false"` // start DurationMinutes *int `json:"durationMinutes" db:"duration_minutes"` // duration_minutes ActivityJoin *Activity `json:"-" db:"activity_activity_id"` // O2O activities (generated from M2O) TeamJoin *Team `json:"-" db:"team_team_id"` // O2O teams (generated from M2O) UserJoin *User `json:"-" db:"user_user_id"` // O2O users (generated from M2O) WorkItemJoin *WorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (generated from M2O) }
TimeEntry represents a row from 'public.time_entries'.
func CreateTimeEntry ¶
CreateTimeEntry creates a new TimeEntry in the database with the given params.
func TimeEntriesByUserIDTeamID ¶
func TimeEntriesByUserIDTeamID(ctx context.Context, db DB, userID UserID, teamID TeamID, opts ...TimeEntrySelectConfigOption) ([]TimeEntry, error)
TimeEntriesByUserIDTeamID retrieves a row from 'public.time_entries' as a TimeEntry.
Generated from index 'time_entries_user_id_team_id_idx'.
func TimeEntriesByWorkItemIDTeamID ¶
func TimeEntriesByWorkItemIDTeamID(ctx context.Context, db DB, workItemID WorkItemID, teamID TeamID, opts ...TimeEntrySelectConfigOption) ([]TimeEntry, error)
TimeEntriesByWorkItemIDTeamID retrieves a row from 'public.time_entries' as a TimeEntry.
Generated from index 'time_entries_work_item_id_team_id_idx'.
func TimeEntryByTimeEntryID ¶
func TimeEntryByTimeEntryID(ctx context.Context, db DB, timeEntryID TimeEntryID, opts ...TimeEntrySelectConfigOption) (*TimeEntry, error)
TimeEntryByTimeEntryID retrieves a row from 'public.time_entries' as a TimeEntry.
Generated from index 'time_entries_pkey'.
func TimeEntryPaginated ¶
func TimeEntryPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...TimeEntrySelectConfigOption) ([]TimeEntry, error)
TimeEntryPaginated returns a cursor-paginated list of TimeEntry. At least one cursor is required.
func (*TimeEntry) FKActivity_ActivityID ¶
FKActivity_ActivityID returns the Activity associated with the TimeEntry's (ActivityID).
Generated from foreign key 'time_entries_activity_id_fkey'.
func (*TimeEntry) FKTeam_TeamID ¶
FKTeam_TeamID returns the Team associated with the TimeEntry's (TeamID).
Generated from foreign key 'time_entries_team_id_fkey'.
func (*TimeEntry) FKUser_UserID ¶
FKUser_UserID returns the User associated with the TimeEntry's (UserID).
Generated from foreign key 'time_entries_user_id_fkey'.
func (*TimeEntry) FKWorkItem_WorkItemID ¶
FKWorkItem_WorkItemID returns the WorkItem associated with the TimeEntry's (WorkItemID).
Generated from foreign key 'time_entries_work_item_id_fkey'.
func (*TimeEntry) SetUpdateParams ¶
func (te *TimeEntry) SetUpdateParams(params *TimeEntryUpdateParams)
SetUpdateParams updates public.time_entries struct fields with the specified params.
type TimeEntryCreateParams ¶
type TimeEntryCreateParams struct { ActivityID ActivityID `json:"activityID" required:"true" nullable:"false"` // activity_id Comment string `json:"comment" required:"true" nullable:"false"` // comment DurationMinutes *int `json:"durationMinutes"` // duration_minutes Start time.Time `json:"start" required:"true" nullable:"false"` // start TeamID *TeamID `json:"teamID"` // team_id UserID UserID `json:"userID" required:"true" nullable:"false"` // user_id WorkItemID *WorkItemID `json:"workItemID"` // work_item_id }
TimeEntryCreateParams represents insert params for 'public.time_entries'.
func (TimeEntryCreateParams) GetActivityID ¶
func (p TimeEntryCreateParams) GetActivityID() *ActivityID
func (TimeEntryCreateParams) GetComment ¶
func (p TimeEntryCreateParams) GetComment() *string
func (TimeEntryCreateParams) GetDurationMinutes ¶
func (p TimeEntryCreateParams) GetDurationMinutes() *int
func (TimeEntryCreateParams) GetStart ¶
func (p TimeEntryCreateParams) GetStart() *time.Time
func (TimeEntryCreateParams) GetTeamID ¶
func (p TimeEntryCreateParams) GetTeamID() *TeamID
func (TimeEntryCreateParams) GetUserID ¶
func (p TimeEntryCreateParams) GetUserID() *UserID
func (TimeEntryCreateParams) GetWorkItemID ¶
func (p TimeEntryCreateParams) GetWorkItemID() *WorkItemID
type TimeEntryID ¶
type TimeEntryID int
type TimeEntryJoins ¶
type TimeEntryJoins struct { Activity bool `json:"activity" required:"true" nullable:"false"` // O2O activities Team bool `json:"team" required:"true" nullable:"false"` // O2O teams User bool `json:"user" required:"true" nullable:"false"` // O2O users WorkItem bool `json:"workItem" required:"true" nullable:"false"` // O2O work_items }
type TimeEntryParams ¶
type TimeEntryParams interface { GetActivityID() *ActivityID GetComment() *string GetDurationMinutes() *int GetStart() *time.Time GetTeamID() *TeamID GetUserID() *UserID GetWorkItemID() *WorkItemID }
TimeEntryParams represents common params for both insert and update of 'public.time_entries'.
type TimeEntryResponse ¶
type TimeEntryResponse struct { ActivityID ActivityID `json:"activityID"` Comment string `json:"comment"` DurationMinutes *int `json:"durationMinutes"` Start time.Time `json:"start"` TeamID *TeamID `json:"teamID"` TimeEntryID TimeEntryID `json:"timeEntryID"` UserID ModelsUserID `json:"userID"` WorkItemID *WorkItemID `json:"workItemID"` }
TimeEntryResponse defines the model for TimeEntryResponse.
type TimeEntrySelectConfig ¶
type TimeEntrySelectConfig struct {
// contains filtered or unexported fields
}
type TimeEntrySelectConfigOption ¶
type TimeEntrySelectConfigOption func(*TimeEntrySelectConfig)
func WithTimeEntryFilters ¶
func WithTimeEntryFilters(filters map[string][]any) TimeEntrySelectConfigOption
WithTimeEntryFilters 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 WithTimeEntryHavingClause ¶
func WithTimeEntryHavingClause(conditions map[string][]any) TimeEntrySelectConfigOption
WithTimeEntryHavingClause 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 WithTimeEntryJoin ¶
func WithTimeEntryJoin(joins TimeEntryJoins) TimeEntrySelectConfigOption
WithTimeEntryJoin joins with the given tables.
func WithTimeEntryLimit ¶
func WithTimeEntryLimit(limit int) TimeEntrySelectConfigOption
WithTimeEntryLimit limits row selection.
func WithTimeEntryOrderBy ¶
func WithTimeEntryOrderBy(rows map[string]*Direction) TimeEntrySelectConfigOption
WithTimeEntryOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type TimeEntryUpdateParams ¶
type TimeEntryUpdateParams struct { ActivityID *ActivityID `json:"activityID" nullable:"false"` // activity_id Comment *string `json:"comment" nullable:"false"` // comment DurationMinutes **int `json:"durationMinutes"` // duration_minutes Start *time.Time `json:"start" nullable:"false"` // start TeamID **TeamID `json:"teamID"` // team_id UserID *UserID `json:"userID" nullable:"false"` // user_id WorkItemID **WorkItemID `json:"workItemID"` // work_item_id }
TimeEntryUpdateParams represents update params for 'public.time_entries'.
func (TimeEntryUpdateParams) GetActivityID ¶
func (p TimeEntryUpdateParams) GetActivityID() *ActivityID
func (TimeEntryUpdateParams) GetComment ¶
func (p TimeEntryUpdateParams) GetComment() *string
func (TimeEntryUpdateParams) GetDurationMinutes ¶
func (p TimeEntryUpdateParams) GetDurationMinutes() *int
func (TimeEntryUpdateParams) GetStart ¶
func (p TimeEntryUpdateParams) GetStart() *time.Time
func (TimeEntryUpdateParams) GetTeamID ¶
func (p TimeEntryUpdateParams) GetTeamID() *TeamID
func (TimeEntryUpdateParams) GetUserID ¶
func (p TimeEntryUpdateParams) GetUserID() *UserID
func (TimeEntryUpdateParams) GetWorkItemID ¶
func (p TimeEntryUpdateParams) GetWorkItemID() *WorkItemID
type Topic ¶
type Topic string
Topic string identifiers for SSE event listeners.
const ( TopicAppDebug Topic = "AppDebug" TopicGlobalAlerts Topic = "GlobalAlerts" TopicTeamCreated Topic = "TeamCreated" TopicWorkItemUpdated Topic = "WorkItemUpdated" )
Topic string identifiers for SSE event listeners.
func AllTopicValues ¶
func AllTopicValues() []Topic
AllTopicValues returns all possible values for Topic.
type Trigger ¶
type Trigger struct{}
func BeforeUpdateUpdatedAt ¶
BeforeUpdateUpdatedAt calls the stored function 'public.before_update_updated_at() trigger' on db.
func NotificationFanOut ¶
NotificationFanOut calls the stored function 'public.notification_fan_out() trigger' on db.
func SyncUserProjects ¶
SyncUserProjects calls the stored function 'public.sync_user_projects() trigger' on db.
func SyncUserTeams ¶
SyncUserTeams calls the stored function 'public.sync_user_teams() trigger' on db.
type UpdateActivityJSONRequestBody ¶
type UpdateActivityJSONRequestBody = UpdateActivityRequest
UpdateActivityJSONRequestBody defines body for UpdateActivity for application/json ContentType.
type UpdateActivityRequest ¶
type UpdateActivityRequest struct { Description *string `json:"description,omitempty"` IsProductive *bool `json:"isProductive,omitempty"` Name *string `json:"name,omitempty"` }
UpdateActivityRequest defines the model for UpdateActivityRequest.
type UpdateProjectConfigJSONRequestBody ¶
type UpdateProjectConfigJSONRequestBody = ProjectConfig
UpdateProjectConfigJSONRequestBody defines body for UpdateProjectConfig for application/json ContentType.
type UpdateTeamJSONRequestBody ¶
type UpdateTeamJSONRequestBody = UpdateTeamRequest
UpdateTeamJSONRequestBody defines body for UpdateTeam for application/json ContentType.
type UpdateTeamRequest ¶
type UpdateTeamRequest struct { Description *string `json:"description,omitempty"` Name *string `json:"name,omitempty"` }
UpdateTeamRequest defines the model for UpdateTeamRequest.
type UpdateTimeEntryJSONRequestBody ¶
type UpdateTimeEntryJSONRequestBody = UpdateTimeEntryRequest
UpdateTimeEntryJSONRequestBody defines body for UpdateTimeEntry for application/json ContentType.
type UpdateTimeEntryRequest ¶
type UpdateTimeEntryRequest struct { ActivityID *ActivityID `json:"activityID,omitempty"` Comment *string `json:"comment,omitempty"` DurationMinutes *int `json:"durationMinutes"` Start *time.Time `json:"start,omitempty"` TeamID *TeamID `json:"teamID"` UserID *ModelsUserID `json:"userID,omitempty"` WorkItemID *WorkItemID `json:"workItemID"` }
UpdateTimeEntryRequest defines the model for UpdateTimeEntryRequest.
type UpdateUserAuthRequest ¶
type UpdateUserAuthRequest struct { // Role is generated from roles.json keys. Role *Role `json:"role,omitempty"` Scopes *Scopes `json:"scopes,omitempty"` }
UpdateUserAuthRequest represents User authorization data to update
type UpdateUserAuthorizationJSONRequestBody ¶
type UpdateUserAuthorizationJSONRequestBody = UpdateUserAuthRequest
UpdateUserAuthorizationJSONRequestBody defines body for UpdateUserAuthorization for application/json ContentType.
type UpdateUserJSONRequestBody ¶
type UpdateUserJSONRequestBody = UpdateUserRequest
UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
type UpdateUserRequest ¶
type UpdateUserRequest struct { // FirstName originally from auth server but updatable FirstName *string `json:"firstName,omitempty"` // LastName originally from auth server but updatable LastName *string `json:"lastName,omitempty"` }
UpdateUserRequest represents User data to update
type UpdateWorkItemCommentJSONRequestBody ¶
type UpdateWorkItemCommentJSONRequestBody = UpdateWorkItemCommentRequest
UpdateWorkItemCommentJSONRequestBody defines body for UpdateWorkItemComment for application/json ContentType.
type UpdateWorkItemCommentRequest ¶
type UpdateWorkItemCommentRequest struct { Message *string `json:"message,omitempty"` UserID *ModelsUserID `json:"userID,omitempty"` WorkItemID *WorkItemID `json:"workItemID,omitempty"` }
UpdateWorkItemCommentRequest defines the model for UpdateWorkItemCommentRequest.
type UpdateWorkItemTagJSONRequestBody ¶
type UpdateWorkItemTagJSONRequestBody = UpdateWorkItemTagRequest
UpdateWorkItemTagJSONRequestBody defines body for UpdateWorkItemTag for application/json ContentType.
type UpdateWorkItemTagRequest ¶
type UpdateWorkItemTagRequest struct { Color *string `json:"color,omitempty"` Description *string `json:"description,omitempty"` Name *string `json:"name,omitempty"` }
UpdateWorkItemTagRequest defines the model for UpdateWorkItemTagRequest.
type UpdateWorkItemTypeJSONRequestBody ¶
type UpdateWorkItemTypeJSONRequestBody = UpdateWorkItemTypeRequest
UpdateWorkItemTypeJSONRequestBody defines body for UpdateWorkItemType for application/json ContentType.
type UpdateWorkItemTypeRequest ¶
type UpdateWorkItemTypeRequest struct { Color *string `json:"color,omitempty"` Description *string `json:"description,omitempty"` Name *string `json:"name,omitempty"` }
UpdateWorkItemTypeRequest defines the model for UpdateWorkItemTypeRequest.
type User ¶
type User struct { UserID UserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id Username string `json:"username" db:"username" required:"true" nullable:"false"` // username Email string `json:"email" db:"email" required:"true" nullable:"false"` // email Age *int `json:"age" db:"age"` // age FirstName *string `json:"firstName" db:"first_name"` // first_name LastName *string `json:"lastName" db:"last_name"` // last_name FullName *string `json:"fullName" db:"full_name"` // full_name ExternalID string `json:"-" db:"external_id" nullable:"false"` // external_id APIKeyID *UserAPIKeyID `json:"-" db:"api_key_id"` // api_key_id Scopes Scopes `json:"scopes" db:"scopes" required:"true" nullable:"false" ref:"#/components/schemas/Scopes"` // scopes RoleRank int `json:"-" db:"role_rank" nullable:"false"` // role_rank HasPersonalNotifications bool `json:"hasPersonalNotifications" db:"has_personal_notifications" required:"true" nullable:"false"` // has_personal_notifications HasGlobalNotifications bool `json:"hasGlobalNotifications" db:"has_global_notifications" required:"true" nullable:"false"` // has_global_notifications 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 DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` // deleted_at ReceiverNotificationsJoin *[]Notification `json:"-" db:"notifications_receiver"` // M2O users SenderNotificationsJoin *[]Notification `json:"-" db:"notifications_sender"` // M2O users TimeEntriesJoin *[]TimeEntry `json:"-" db:"time_entries"` // M2O users UserNotificationsJoin *[]UserNotification `json:"-" db:"user_notifications"` // M2O users MemberProjectsJoin *[]Project `json:"-" db:"user_project_projects"` // M2M user_project MemberTeamsJoin *[]Team `json:"-" db:"user_team_teams"` // M2M user_team UserAPIKeyJoin *UserAPIKey `json:"-" db:"user_api_key_api_key_id"` // O2O user_api_keys (inferred) AssigneeWorkItemsJoin *[]UserM2MWorkItemWIA `json:"-" db:"work_item_assignee_work_items"` // M2M work_item_assignee WorkItemCommentsJoin *[]WorkItemComment `json:"-" db:"work_item_comments"` // M2O users }
User represents a row from 'public.users'.
func CreateUser ¶
CreateUser creates a new User in the database with the given params.
func UserByCreatedAt ¶
func UserByCreatedAt(ctx context.Context, db DB, createdAt time.Time, opts ...UserSelectConfigOption) (*User, error)
UserByCreatedAt retrieves a row from 'public.users' as a User.
Generated from index 'users_created_at_key'.
func UserByEmail ¶
func UserByEmail(ctx context.Context, db DB, email string, opts ...UserSelectConfigOption) (*User, error)
UserByEmail retrieves a row from 'public.users' as a User.
Generated from index 'users_email_key'.
func UserByExternalID ¶
func UserByExternalID(ctx context.Context, db DB, externalID string, opts ...UserSelectConfigOption) (*User, error)
UserByExternalID retrieves a row from 'public.users' as a User.
Generated from index 'users_external_id_key'.
func UserByUserID ¶
func UserByUserID(ctx context.Context, db DB, userID UserID, opts ...UserSelectConfigOption) (*User, error)
UserByUserID retrieves a row from 'public.users' as a User.
Generated from index 'users_pkey'.
func UserByUsername ¶
func UserByUsername(ctx context.Context, db DB, username string, opts ...UserSelectConfigOption) (*User, error)
UserByUsername retrieves a row from 'public.users' as a User.
Generated from index 'users_username_key'.
func UserPaginated ¶
func UserPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...UserSelectConfigOption) ([]User, error)
UserPaginated returns a cursor-paginated list of User. At least one cursor is required.
func UsersByDeletedAt_WhereDeletedAtIsNotNull ¶
func UsersByDeletedAt_WhereDeletedAtIsNotNull(ctx context.Context, db DB, deletedAt *time.Time, opts ...UserSelectConfigOption) ([]User, error)
UsersByDeletedAt_WhereDeletedAtIsNotNull retrieves a row from 'public.users' as a User.
Generated from index 'users_deleted_at_idx'.
func UsersByRoleRankAge ¶
func UsersByRoleRankAge(ctx context.Context, db DB, roleRank int, age *int, opts ...UserSelectConfigOption) ([]User, error)
UsersByRoleRankAge retrieves a row from 'public.users' as a User.
Generated from index 'users_role_rank_age_username_email_full_name_idx'.
func (*User) FKUserAPIKey_APIKeyID ¶
FKUserAPIKey_APIKeyID returns the UserAPIKey associated with the User's (APIKeyID).
Generated from foreign key 'users_api_key_id_fkey'.
func (*User) SetUpdateParams ¶
func (u *User) SetUpdateParams(params *UserUpdateParams)
SetUpdateParams updates public.users struct fields with the specified params.
func (*User) SoftDelete ¶
SoftDelete soft deletes the User from the database via 'deleted_at'.
type UserAPIKey ¶
type UserAPIKey struct { UserAPIKeyID UserAPIKeyID `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 UserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id UserJoin *User `json:"-" db:"user_user_id"` // O2O users (inferred) }
UserAPIKey represents a row from 'public.user_api_keys'.
func CreateUserAPIKey ¶
func CreateUserAPIKey(ctx context.Context, db DB, params *UserAPIKeyCreateParams) (*UserAPIKey, error)
CreateUserAPIKey creates a new UserAPIKey in the database with the given params.
func UserAPIKeyByAPIKey ¶
func UserAPIKeyByAPIKey(ctx context.Context, db DB, apiKey string, opts ...UserAPIKeySelectConfigOption) (*UserAPIKey, error)
UserAPIKeyByAPIKey retrieves a row from 'public.user_api_keys' as a UserAPIKey.
Generated from index 'user_api_keys_api_key_key'.
func UserAPIKeyByUserAPIKeyID ¶
func UserAPIKeyByUserAPIKeyID(ctx context.Context, db DB, userAPIKeyID UserAPIKeyID, opts ...UserAPIKeySelectConfigOption) (*UserAPIKey, error)
UserAPIKeyByUserAPIKeyID retrieves a row from 'public.user_api_keys' as a UserAPIKey.
Generated from index 'user_api_keys_pkey'.
func UserAPIKeyByUserID ¶
func UserAPIKeyByUserID(ctx context.Context, db DB, userID UserID, opts ...UserAPIKeySelectConfigOption) (*UserAPIKey, error)
UserAPIKeyByUserID retrieves a row from 'public.user_api_keys' as a UserAPIKey.
Generated from index 'user_api_keys_user_id_key'.
func UserAPIKeyPaginated ¶
func UserAPIKeyPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...UserAPIKeySelectConfigOption) ([]UserAPIKey, error)
UserAPIKeyPaginated returns a cursor-paginated list of UserAPIKey. At least one cursor is required.
func (*UserAPIKey) Delete ¶
func (uak *UserAPIKey) Delete(ctx context.Context, db DB) error
Delete deletes the UserAPIKey from the database.
func (*UserAPIKey) FKUser_UserID ¶
FKUser_UserID returns the User associated with the UserAPIKey's (UserID).
Generated from foreign key 'user_api_keys_user_id_fkey'.
func (*UserAPIKey) Insert ¶
func (uak *UserAPIKey) Insert(ctx context.Context, db DB) (*UserAPIKey, error)
Insert inserts the UserAPIKey to the database.
func (*UserAPIKey) SetUpdateParams ¶
func (uak *UserAPIKey) SetUpdateParams(params *UserAPIKeyUpdateParams)
SetUpdateParams updates public.user_api_keys struct fields with the specified params.
func (*UserAPIKey) Update ¶
func (uak *UserAPIKey) Update(ctx context.Context, db DB) (*UserAPIKey, error)
Update updates a UserAPIKey in the database.
func (*UserAPIKey) Upsert ¶
func (uak *UserAPIKey) Upsert(ctx context.Context, db DB, params *UserAPIKeyCreateParams) (*UserAPIKey, error)
Upsert upserts a UserAPIKey in the database. Requires appropriate PK(s) to be set beforehand.
type UserAPIKeyCreateParams ¶
type UserAPIKeyCreateParams struct { APIKey string `json:"apiKey" required:"true" nullable:"false"` // api_key ExpiresOn time.Time `json:"expiresOn" required:"true" nullable:"false"` // expires_on UserID UserID `json:"userID" required:"true" nullable:"false"` // user_id }
UserAPIKeyCreateParams represents insert params for 'public.user_api_keys'.
func (UserAPIKeyCreateParams) GetAPIKey ¶
func (p UserAPIKeyCreateParams) GetAPIKey() *string
func (UserAPIKeyCreateParams) GetExpiresOn ¶
func (p UserAPIKeyCreateParams) GetExpiresOn() *time.Time
func (UserAPIKeyCreateParams) GetUserID ¶
func (p UserAPIKeyCreateParams) GetUserID() *UserID
type UserAPIKeyID ¶
type UserAPIKeyID int
type UserAPIKeyJoins ¶
type UserAPIKeyJoins struct {
User bool `json:"user" required:"true" nullable:"false"` // O2O users
}
type UserAPIKeyParams ¶
type UserAPIKeyParams interface { GetAPIKey() *string GetExpiresOn() *time.Time GetUserID() *UserID }
UserAPIKeyParams represents common params for both insert and update of 'public.user_api_keys'.
type UserAPIKeySelectConfig ¶
type UserAPIKeySelectConfig struct {
// contains filtered or unexported fields
}
type UserAPIKeySelectConfigOption ¶
type UserAPIKeySelectConfigOption func(*UserAPIKeySelectConfig)
func WithUserAPIKeyFilters ¶
func WithUserAPIKeyFilters(filters map[string][]any) UserAPIKeySelectConfigOption
WithUserAPIKeyFilters 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 WithUserAPIKeyHavingClause ¶
func WithUserAPIKeyHavingClause(conditions map[string][]any) UserAPIKeySelectConfigOption
WithUserAPIKeyHavingClause 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 WithUserAPIKeyJoin ¶
func WithUserAPIKeyJoin(joins UserAPIKeyJoins) UserAPIKeySelectConfigOption
WithUserAPIKeyJoin joins with the given tables.
func WithUserAPIKeyLimit ¶
func WithUserAPIKeyLimit(limit int) UserAPIKeySelectConfigOption
WithUserAPIKeyLimit limits row selection.
func WithUserAPIKeyOrderBy ¶
func WithUserAPIKeyOrderBy(rows map[string]*Direction) UserAPIKeySelectConfigOption
WithUserAPIKeyOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type UserAPIKeyUpdateParams ¶
type UserAPIKeyUpdateParams struct { APIKey *string `json:"apiKey" nullable:"false"` // api_key ExpiresOn *time.Time `json:"expiresOn" nullable:"false"` // expires_on UserID *UserID `json:"userID" nullable:"false"` // user_id }
UserAPIKeyUpdateParams represents update params for 'public.user_api_keys'.
func (UserAPIKeyUpdateParams) GetAPIKey ¶
func (p UserAPIKeyUpdateParams) GetAPIKey() *string
func (UserAPIKeyUpdateParams) GetExpiresOn ¶
func (p UserAPIKeyUpdateParams) GetExpiresOn() *time.Time
func (UserAPIKeyUpdateParams) GetUserID ¶
func (p UserAPIKeyUpdateParams) GetUserID() *UserID
type UserCreateParams ¶
type UserCreateParams struct { Age *int `json:"age"` // age APIKeyID *UserAPIKeyID `json:"-"` // api_key_id Email string `json:"email" required:"true" nullable:"false"` // email ExternalID string `json:"-" nullable:"false"` // external_id FirstName *string `json:"firstName"` // first_name HasGlobalNotifications bool `json:"hasGlobalNotifications" required:"true" nullable:"false"` // has_global_notifications HasPersonalNotifications bool `json:"hasPersonalNotifications" required:"true" nullable:"false"` // has_personal_notifications LastName *string `json:"lastName"` // last_name RoleRank int `json:"-" nullable:"false"` // role_rank Scopes Scopes `json:"scopes" required:"true" nullable:"false" ref:"#/components/schemas/Scopes"` // scopes Username string `json:"username" required:"true" nullable:"false"` // username }
UserCreateParams represents insert params for 'public.users'.
func (UserCreateParams) GetAPIKeyID ¶
func (p UserCreateParams) GetAPIKeyID() *UserAPIKeyID
func (UserCreateParams) GetAge ¶
func (p UserCreateParams) GetAge() *int
func (UserCreateParams) GetEmail ¶
func (p UserCreateParams) GetEmail() *string
func (UserCreateParams) GetExternalID ¶
func (p UserCreateParams) GetExternalID() *string
func (UserCreateParams) GetFirstName ¶
func (p UserCreateParams) GetFirstName() *string
func (UserCreateParams) GetHasGlobalNotifications ¶
func (p UserCreateParams) GetHasGlobalNotifications() *bool
func (UserCreateParams) GetHasPersonalNotifications ¶
func (p UserCreateParams) GetHasPersonalNotifications() *bool
func (UserCreateParams) GetLastName ¶
func (p UserCreateParams) GetLastName() *string
func (UserCreateParams) GetRoleRank ¶
func (p UserCreateParams) GetRoleRank() *int
func (UserCreateParams) GetScopes ¶
func (p UserCreateParams) GetScopes() *Scopes
func (UserCreateParams) GetUsername ¶
func (p UserCreateParams) GetUsername() *string
type UserJoins ¶
type UserJoins struct { ReceiverNotifications bool `json:"receiverNotifications" required:"true" nullable:"false"` // M2O notifications SenderNotifications bool `json:"senderNotifications" required:"true" nullable:"false"` // M2O notifications TimeEntries bool `json:"timeEntries" required:"true" nullable:"false"` // M2O time_entries UserNotifications bool `json:"userNotifications" required:"true" nullable:"false"` // M2O user_notifications MemberProjects bool `json:"memberProjects" required:"true" nullable:"false"` // M2M user_project MemberTeams bool `json:"memberTeams" required:"true" nullable:"false"` // M2M user_team 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 UserM2MWorkItemWIA ¶
type UserM2MWorkItemWIA struct { WorkItem WorkItem `json:"workItem" db:"work_items" required:"true"` Role WorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
UserM2MWorkItemWIA represents a M2M join against "public.work_item_assignee"
type UserNotification ¶
type UserNotification struct { UserNotificationID UserNotificationID `json:"userNotificationID" db:"user_notification_id" required:"true" nullable:"false"` // user_notification_id NotificationID NotificationID `json:"notificationID" db:"notification_id" required:"true" nullable:"false"` // notification_id Read bool `json:"read" db:"read" required:"true" nullable:"false"` // read UserID UserID `json:"userID" db:"user_id" required:"true" nullable:"false"` // user_id NotificationJoin *Notification `json:"-" db:"notification_notification_id"` // O2O notifications (generated from M2O) UserJoin *User `json:"-" db:"user_user_id"` // O2O users (generated from M2O) }
UserNotification represents a row from 'public.user_notifications'.
func CreateUserNotification ¶
func CreateUserNotification(ctx context.Context, db DB, params *UserNotificationCreateParams) (*UserNotification, error)
CreateUserNotification creates a new UserNotification in the database with the given params.
func UserNotificationByNotificationIDUserID ¶
func UserNotificationByNotificationIDUserID(ctx context.Context, db DB, notificationID NotificationID, userID UserID, opts ...UserNotificationSelectConfigOption) (*UserNotification, error)
UserNotificationByNotificationIDUserID retrieves a row from 'public.user_notifications' as a UserNotification.
Generated from index 'user_notifications_notification_id_user_id_key'.
func UserNotificationByUserNotificationID ¶
func UserNotificationByUserNotificationID(ctx context.Context, db DB, userNotificationID UserNotificationID, opts ...UserNotificationSelectConfigOption) (*UserNotification, error)
UserNotificationByUserNotificationID retrieves a row from 'public.user_notifications' as a UserNotification.
Generated from index 'user_notifications_pkey'.
func UserNotificationPaginated ¶
func UserNotificationPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...UserNotificationSelectConfigOption) ([]UserNotification, error)
UserNotificationPaginated returns a cursor-paginated list of UserNotification. At least one cursor is required.
func UserNotificationsByNotificationID ¶
func UserNotificationsByNotificationID(ctx context.Context, db DB, notificationID NotificationID, opts ...UserNotificationSelectConfigOption) ([]UserNotification, error)
UserNotificationsByNotificationID retrieves a row from 'public.user_notifications' as a UserNotification.
Generated from index 'user_notifications_notification_id_user_id_key'.
func UserNotificationsByUserID ¶
func UserNotificationsByUserID(ctx context.Context, db DB, userID UserID, opts ...UserNotificationSelectConfigOption) ([]UserNotification, error)
UserNotificationsByUserID retrieves a row from 'public.user_notifications' as a UserNotification.
Generated from index 'user_notifications_user_id_idx'.
func (*UserNotification) Delete ¶
func (un *UserNotification) Delete(ctx context.Context, db DB) error
Delete deletes the UserNotification from the database.
func (*UserNotification) FKNotification_NotificationID ¶
func (un *UserNotification) FKNotification_NotificationID(ctx context.Context, db DB) (*Notification, error)
FKNotification_NotificationID returns the Notification associated with the UserNotification's (NotificationID).
Generated from foreign key 'user_notifications_notification_id_fkey'.
func (*UserNotification) FKUser_UserID ¶
FKUser_UserID returns the User associated with the UserNotification's (UserID).
Generated from foreign key 'user_notifications_user_id_fkey'.
func (*UserNotification) Insert ¶
func (un *UserNotification) Insert(ctx context.Context, db DB) (*UserNotification, error)
Insert inserts the UserNotification to the database.
func (*UserNotification) SetUpdateParams ¶
func (un *UserNotification) SetUpdateParams(params *UserNotificationUpdateParams)
SetUpdateParams updates public.user_notifications struct fields with the specified params.
func (*UserNotification) Update ¶
func (un *UserNotification) Update(ctx context.Context, db DB) (*UserNotification, error)
Update updates a UserNotification in the database.
func (*UserNotification) Upsert ¶
func (un *UserNotification) Upsert(ctx context.Context, db DB, params *UserNotificationCreateParams) (*UserNotification, error)
Upsert upserts a UserNotification in the database. Requires appropriate PK(s) to be set beforehand.
type UserNotificationCreateParams ¶
type UserNotificationCreateParams struct { NotificationID NotificationID `json:"notificationID" required:"true" nullable:"false"` // notification_id Read bool `json:"read" required:"true" nullable:"false"` // read UserID UserID `json:"userID" required:"true" nullable:"false"` // user_id }
UserNotificationCreateParams represents insert params for 'public.user_notifications'.
func (UserNotificationCreateParams) GetNotificationID ¶
func (p UserNotificationCreateParams) GetNotificationID() *NotificationID
func (UserNotificationCreateParams) GetRead ¶
func (p UserNotificationCreateParams) GetRead() *bool
func (UserNotificationCreateParams) GetUserID ¶
func (p UserNotificationCreateParams) GetUserID() *UserID
type UserNotificationID ¶
type UserNotificationID int
type UserNotificationJoins ¶
type UserNotificationParams ¶
type UserNotificationParams interface { GetNotificationID() *NotificationID GetRead() *bool GetUserID() *UserID }
UserNotificationParams represents common params for both insert and update of 'public.user_notifications'.
type UserNotificationSelectConfig ¶
type UserNotificationSelectConfig struct {
// contains filtered or unexported fields
}
type UserNotificationSelectConfigOption ¶
type UserNotificationSelectConfigOption func(*UserNotificationSelectConfig)
func WithUserNotificationFilters ¶
func WithUserNotificationFilters(filters map[string][]any) UserNotificationSelectConfigOption
WithUserNotificationFilters 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 WithUserNotificationHavingClause ¶
func WithUserNotificationHavingClause(conditions map[string][]any) UserNotificationSelectConfigOption
WithUserNotificationHavingClause 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 WithUserNotificationJoin ¶
func WithUserNotificationJoin(joins UserNotificationJoins) UserNotificationSelectConfigOption
WithUserNotificationJoin joins with the given tables.
func WithUserNotificationLimit ¶
func WithUserNotificationLimit(limit int) UserNotificationSelectConfigOption
WithUserNotificationLimit limits row selection.
func WithUserNotificationOrderBy ¶
func WithUserNotificationOrderBy(rows map[string]*Direction) UserNotificationSelectConfigOption
WithUserNotificationOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type UserNotificationUpdateParams ¶
type UserNotificationUpdateParams struct { NotificationID *NotificationID `json:"notificationID" nullable:"false"` // notification_id Read *bool `json:"read" nullable:"false"` // read UserID *UserID `json:"userID" nullable:"false"` // user_id }
UserNotificationUpdateParams represents update params for 'public.user_notifications'.
func (UserNotificationUpdateParams) GetNotificationID ¶
func (p UserNotificationUpdateParams) GetNotificationID() *NotificationID
func (UserNotificationUpdateParams) GetRead ¶
func (p UserNotificationUpdateParams) GetRead() *bool
func (UserNotificationUpdateParams) GetUserID ¶
func (p UserNotificationUpdateParams) GetUserID() *UserID
type UserParams ¶
type UserParams interface { GetAge() *int GetAPIKeyID() *UserAPIKeyID GetEmail() *string GetExternalID() *string GetFirstName() *string GetHasGlobalNotifications() *bool GetHasPersonalNotifications() *bool GetLastName() *string GetRoleRank() *int GetScopes() *Scopes GetUsername() *string }
UserParams represents common params for both insert and update of 'public.users'.
type UserProject ¶
type UserProject struct { ProjectID ProjectID `json:"projectID" db:"project_id" required:"true" nullable:"false"` // project_id Member UserID `json:"member" db:"member" required:"true" nullable:"false"` // member ProjectsJoin *[]Project `json:"-" db:"user_project_projects"` // M2M user_project MembersJoin *[]User `json:"-" db:"user_project_members"` // M2M user_project }
UserProject represents a row from 'public.user_project'.
func CreateUserProject ¶
func CreateUserProject(ctx context.Context, db DB, params *UserProjectCreateParams) (*UserProject, error)
CreateUserProject creates a new UserProject in the database with the given params.
func UserProjectByMemberProjectID ¶
func UserProjectByMemberProjectID(ctx context.Context, db DB, member UserID, projectID ProjectID, opts ...UserProjectSelectConfigOption) (*UserProject, error)
UserProjectByMemberProjectID retrieves a row from 'public.user_project' as a UserProject.
Generated from index 'user_project_pkey'.
func UserProjectPaginated ¶
func UserProjectPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...UserProjectSelectConfigOption) ([]UserProject, error)
UserProjectPaginated returns a cursor-paginated list of UserProject. At least one cursor is required.
func UserProjectsByMember ¶
func UserProjectsByMember(ctx context.Context, db DB, member UserID, opts ...UserProjectSelectConfigOption) ([]UserProject, error)
UserProjectsByMember retrieves a row from 'public.user_project' as a UserProject.
Generated from index 'user_project_member_idx'.
func UserProjectsByProjectID ¶
func UserProjectsByProjectID(ctx context.Context, db DB, projectID ProjectID, opts ...UserProjectSelectConfigOption) ([]UserProject, error)
UserProjectsByProjectID retrieves a row from 'public.user_project' as a UserProject.
Generated from index 'user_project_pkey'.
func UserProjectsByProjectIDMember ¶
func UserProjectsByProjectIDMember(ctx context.Context, db DB, projectID ProjectID, member UserID, opts ...UserProjectSelectConfigOption) ([]UserProject, error)
UserProjectsByProjectIDMember retrieves a row from 'public.user_project' as a UserProject.
Generated from index 'user_project_project_id_member_idx'.
func (*UserProject) Delete ¶
func (up *UserProject) Delete(ctx context.Context, db DB) error
Delete deletes the UserProject from the database.
func (*UserProject) FKProject_ProjectID ¶
FKProject_ProjectID returns the Project associated with the UserProject's (ProjectID).
Generated from foreign key 'user_project_project_id_fkey'.
func (*UserProject) FKUser_Member ¶
FKUser_Member returns the User associated with the UserProject's (Member).
Generated from foreign key 'user_project_member_fkey'.
func (*UserProject) Insert ¶
func (up *UserProject) Insert(ctx context.Context, db DB) (*UserProject, error)
Insert inserts the UserProject to the database.
func (*UserProject) SetUpdateParams ¶
func (up *UserProject) SetUpdateParams(params *UserProjectUpdateParams)
SetUpdateParams updates public.user_project struct fields with the specified params.
type UserProjectCreateParams ¶
type UserProjectCreateParams struct { Member UserID `json:"member" required:"true" nullable:"false"` // member ProjectID ProjectID `json:"projectID" required:"true" nullable:"false"` // project_id }
UserProjectCreateParams represents insert params for 'public.user_project'.
func (UserProjectCreateParams) GetMember ¶
func (p UserProjectCreateParams) GetMember() *UserID
func (UserProjectCreateParams) GetProjectID ¶
func (p UserProjectCreateParams) GetProjectID() *ProjectID
type UserProjectJoins ¶
type UserProjectParams ¶
UserProjectParams represents common params for both insert and update of 'public.user_project'.
type UserProjectSelectConfig ¶
type UserProjectSelectConfig struct {
// contains filtered or unexported fields
}
type UserProjectSelectConfigOption ¶
type UserProjectSelectConfigOption func(*UserProjectSelectConfig)
func WithUserProjectFilters ¶
func WithUserProjectFilters(filters map[string][]any) UserProjectSelectConfigOption
WithUserProjectFilters 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 WithUserProjectHavingClause ¶
func WithUserProjectHavingClause(conditions map[string][]any) UserProjectSelectConfigOption
WithUserProjectHavingClause 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 WithUserProjectJoin ¶
func WithUserProjectJoin(joins UserProjectJoins) UserProjectSelectConfigOption
WithUserProjectJoin joins with the given tables.
func WithUserProjectLimit ¶
func WithUserProjectLimit(limit int) UserProjectSelectConfigOption
WithUserProjectLimit limits row selection.
func WithUserProjectOrderBy ¶
func WithUserProjectOrderBy(rows map[string]*Direction) UserProjectSelectConfigOption
WithUserProjectOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type UserProjectUpdateParams ¶
type UserProjectUpdateParams struct { Member *UserID `json:"member" nullable:"false"` // member ProjectID *ProjectID `json:"projectID" nullable:"false"` // project_id }
UserProjectUpdateParams represents update params for 'public.user_project'.
func (UserProjectUpdateParams) GetMember ¶
func (p UserProjectUpdateParams) GetMember() *UserID
func (UserProjectUpdateParams) GetProjectID ¶
func (p UserProjectUpdateParams) GetProjectID() *ProjectID
type UserResponse ¶
type UserResponse struct { Age *int `json:"age"` ApiKey *ModelsUserAPIKey `json:"apiKey,omitempty"` CreatedAt time.Time `json:"createdAt"` DeletedAt *time.Time `json:"deletedAt"` Email string `json:"email"` FirstName *string `json:"firstName"` FullName *string `json:"fullName"` HasGlobalNotifications bool `json:"hasGlobalNotifications"` HasPersonalNotifications bool `json:"hasPersonalNotifications"` LastName *string `json:"lastName"` Projects *[]ModelsProject `json:"projects"` // Role is generated from roles.json keys. Role Role `json:"role"` Scopes Scopes `json:"scopes"` Teams *[]ModelsTeam `json:"teams"` UpdatedAt time.Time `json:"updatedAt"` UserID ModelsUserID `json:"userID"` Username string `json:"username"` }
UserResponse defines the model for UserResponse.
type UserSelectConfig ¶
type UserSelectConfig struct {
// contains filtered or unexported fields
}
type UserSelectConfigOption ¶
type UserSelectConfigOption func(*UserSelectConfig)
func WithDeletedUserOnly ¶
func WithDeletedUserOnly() UserSelectConfigOption
WithDeletedUserOnly limits result to records marked as deleted.
func WithUserFilters ¶
func WithUserFilters(filters map[string][]any) UserSelectConfigOption
WithUserFilters 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 WithUserHavingClause ¶
func WithUserHavingClause(conditions map[string][]any) UserSelectConfigOption
WithUserHavingClause 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 WithUserJoin ¶
func WithUserJoin(joins UserJoins) UserSelectConfigOption
WithUserJoin joins with the given tables.
func WithUserLimit ¶
func WithUserLimit(limit int) UserSelectConfigOption
WithUserLimit limits row selection.
func WithUserOrderBy ¶
func WithUserOrderBy(rows map[string]*Direction) UserSelectConfigOption
WithUserOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type UserTeam ¶
type UserTeam struct { TeamID TeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id Member UserID `json:"member" db:"member" required:"true" nullable:"false"` // member TeamsJoin *[]Team `json:"-" db:"user_team_teams"` // M2M user_team MembersJoin *[]User `json:"-" db:"user_team_members"` // M2M user_team }
UserTeam represents a row from 'public.user_team'.
func CreateUserTeam ¶
CreateUserTeam creates a new UserTeam in the database with the given params.
func UserTeamByMemberTeamID ¶
func UserTeamByMemberTeamID(ctx context.Context, db DB, member UserID, teamID TeamID, opts ...UserTeamSelectConfigOption) (*UserTeam, error)
UserTeamByMemberTeamID retrieves a row from 'public.user_team' as a UserTeam.
Generated from index 'user_team_pkey'.
func UserTeamPaginated ¶
func UserTeamPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...UserTeamSelectConfigOption) ([]UserTeam, error)
UserTeamPaginated returns a cursor-paginated list of UserTeam. At least one cursor is required.
func UserTeamsByMember ¶
func UserTeamsByMember(ctx context.Context, db DB, member UserID, opts ...UserTeamSelectConfigOption) ([]UserTeam, error)
UserTeamsByMember retrieves a row from 'public.user_team' as a UserTeam.
Generated from index 'user_team_member_idx'.
func UserTeamsByTeamID ¶
func UserTeamsByTeamID(ctx context.Context, db DB, teamID TeamID, opts ...UserTeamSelectConfigOption) ([]UserTeam, error)
UserTeamsByTeamID retrieves a row from 'public.user_team' as a UserTeam.
Generated from index 'user_team_pkey'.
func UserTeamsByTeamIDMember ¶
func UserTeamsByTeamIDMember(ctx context.Context, db DB, teamID TeamID, member UserID, opts ...UserTeamSelectConfigOption) ([]UserTeam, error)
UserTeamsByTeamIDMember retrieves a row from 'public.user_team' as a UserTeam.
Generated from index 'user_team_team_id_member_idx'.
func (*UserTeam) FKTeam_TeamID ¶
FKTeam_TeamID returns the Team associated with the UserTeam's (TeamID).
Generated from foreign key 'user_team_team_id_fkey'.
func (*UserTeam) FKUser_Member ¶
FKUser_Member returns the User associated with the UserTeam's (Member).
Generated from foreign key 'user_team_member_fkey'.
func (*UserTeam) SetUpdateParams ¶
func (ut *UserTeam) SetUpdateParams(params *UserTeamUpdateParams)
SetUpdateParams updates public.user_team struct fields with the specified params.
type UserTeamCreateParams ¶
type UserTeamCreateParams struct { Member UserID `json:"member" required:"true" nullable:"false"` // member TeamID TeamID `json:"teamID" required:"true" nullable:"false"` // team_id }
UserTeamCreateParams represents insert params for 'public.user_team'.
func (UserTeamCreateParams) GetMember ¶
func (p UserTeamCreateParams) GetMember() *UserID
func (UserTeamCreateParams) GetTeamID ¶
func (p UserTeamCreateParams) GetTeamID() *TeamID
type UserTeamJoins ¶
type UserTeamParams ¶
UserTeamParams represents common params for both insert and update of 'public.user_team'.
type UserTeamSelectConfig ¶
type UserTeamSelectConfig struct {
// contains filtered or unexported fields
}
type UserTeamSelectConfigOption ¶
type UserTeamSelectConfigOption func(*UserTeamSelectConfig)
func WithUserTeamFilters ¶
func WithUserTeamFilters(filters map[string][]any) UserTeamSelectConfigOption
WithUserTeamFilters 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 WithUserTeamHavingClause ¶
func WithUserTeamHavingClause(conditions map[string][]any) UserTeamSelectConfigOption
WithUserTeamHavingClause 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 WithUserTeamJoin ¶
func WithUserTeamJoin(joins UserTeamJoins) UserTeamSelectConfigOption
WithUserTeamJoin joins with the given tables.
func WithUserTeamLimit ¶
func WithUserTeamLimit(limit int) UserTeamSelectConfigOption
WithUserTeamLimit limits row selection.
func WithUserTeamOrderBy ¶
func WithUserTeamOrderBy(rows map[string]*Direction) UserTeamSelectConfigOption
WithUserTeamOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type UserTeamUpdateParams ¶
type UserTeamUpdateParams struct { Member *UserID `json:"member" nullable:"false"` // member TeamID *TeamID `json:"teamID" nullable:"false"` // team_id }
UserTeamUpdateParams represents update params for 'public.user_team'.
func (UserTeamUpdateParams) GetMember ¶
func (p UserTeamUpdateParams) GetMember() *UserID
func (UserTeamUpdateParams) GetTeamID ¶
func (p UserTeamUpdateParams) GetTeamID() *TeamID
type UserUpdateParams ¶
type UserUpdateParams struct { Age **int `json:"age"` // age APIKeyID **UserAPIKeyID `json:"-"` // api_key_id Email *string `json:"email" nullable:"false"` // email ExternalID *string `json:"-" nullable:"false"` // external_id FirstName **string `json:"firstName"` // first_name HasGlobalNotifications *bool `json:"hasGlobalNotifications" nullable:"false"` // has_global_notifications HasPersonalNotifications *bool `json:"hasPersonalNotifications" nullable:"false"` // has_personal_notifications LastName **string `json:"lastName"` // last_name RoleRank *int `json:"-" nullable:"false"` // role_rank Scopes *Scopes `json:"scopes" nullable:"false" ref:"#/components/schemas/Scopes"` // scopes Username *string `json:"username" nullable:"false"` // username }
UserUpdateParams represents update params for 'public.users'.
func (UserUpdateParams) GetAPIKeyID ¶
func (p UserUpdateParams) GetAPIKeyID() *UserAPIKeyID
func (UserUpdateParams) GetAge ¶
func (p UserUpdateParams) GetAge() *int
func (UserUpdateParams) GetEmail ¶
func (p UserUpdateParams) GetEmail() *string
func (UserUpdateParams) GetExternalID ¶
func (p UserUpdateParams) GetExternalID() *string
func (UserUpdateParams) GetFirstName ¶
func (p UserUpdateParams) GetFirstName() *string
func (UserUpdateParams) GetHasGlobalNotifications ¶
func (p UserUpdateParams) GetHasGlobalNotifications() *bool
func (UserUpdateParams) GetHasPersonalNotifications ¶
func (p UserUpdateParams) GetHasPersonalNotifications() *bool
func (UserUpdateParams) GetLastName ¶
func (p UserUpdateParams) GetLastName() *string
func (UserUpdateParams) GetRoleRank ¶
func (p UserUpdateParams) GetRoleRank() *int
func (UserUpdateParams) GetScopes ¶
func (p UserUpdateParams) GetScopes() *Scopes
func (UserUpdateParams) GetUsername ¶
func (p UserUpdateParams) GetUsername() *string
type ValidationError ¶
type ValidationError struct { Ctx *map[string]interface{} `json:"ctx,omitempty"` // Detail verbose details of the error Detail struct { Schema map[string]interface{} `json:"schema"` Value string `json:"value"` } `json:"detail"` // Loc location in body path, if any Loc []string `json:"loc"` // Msg should always be shown to the user Msg string `json:"msg"` }
ValidationError defines the model for ValidationError.
type WorkItem ¶
type WorkItem struct { WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Title string `json:"title" db:"title" required:"true" nullable:"false"` // title Description string `json:"description" db:"description" required:"true" nullable:"false"` // description WorkItemTypeID WorkItemTypeID `json:"workItemTypeID" db:"work_item_type_id" required:"true" nullable:"false"` // work_item_type_id Metadata map[string]any `json:"metadata" db:"metadata" required:"true" nullable:"false"` // metadata TeamID TeamID `json:"teamID" db:"team_id" required:"true" nullable:"false"` // team_id KanbanStepID KanbanStepID `json:"kanbanStepID" db:"kanban_step_id" required:"true" nullable:"false"` // kanban_step_id ClosedAt *time.Time `json:"closedAt" db:"closed_at"` // closed_at TargetDate time.Time `json:"targetDate" db:"target_date" required:"true" nullable:"false"` // target_date 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 DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` // deleted_at DemoTwoWorkItemJoin *DemoTwoWorkItem `json:"-" db:"demo_two_work_item_work_item_id"` // O2O demo_two_work_items (inferred) DemoWorkItemJoin *DemoWorkItem `json:"-" db:"demo_work_item_work_item_id"` // O2O demo_work_items (inferred) TimeEntriesJoin *[]TimeEntry `json:"-" db:"time_entries"` // M2O work_items AssigneesJoin *[]WorkItemM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee WorkItemCommentsJoin *[]WorkItemComment `json:"-" db:"work_item_comments"` // M2O work_items WorkItemTagsJoin *[]WorkItemTag `json:"-" db:"work_item_work_item_tag_work_item_tags"` // M2M work_item_work_item_tag KanbanStepJoin *KanbanStep `json:"-" db:"kanban_step_kanban_step_id"` // O2O kanban_steps (inferred) TeamJoin *Team `json:"-" db:"team_team_id"` // O2O teams (inferred) WorkItemTypeJoin *WorkItemType `json:"-" db:"work_item_type_work_item_type_id"` // O2O work_item_types (inferred) }
WorkItem represents a row from 'public.work_items'.
func CreateWorkItem ¶
CreateWorkItem creates a new WorkItem in the database with the given params.
func WorkItemByWorkItemID ¶
func WorkItemByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, opts ...WorkItemSelectConfigOption) (*WorkItem, error)
WorkItemByWorkItemID retrieves a row from 'public.work_items' as a WorkItem.
Generated from index 'work_items_pkey'.
func WorkItemPaginated ¶
func WorkItemPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...WorkItemSelectConfigOption) ([]WorkItem, error)
WorkItemPaginated returns a cursor-paginated list of WorkItem. At least one cursor is required.
func WorkItemsByDeletedAt_WhereDeletedAtIsNotNull ¶
func WorkItemsByDeletedAt_WhereDeletedAtIsNotNull(ctx context.Context, db DB, deletedAt *time.Time, opts ...WorkItemSelectConfigOption) ([]WorkItem, error)
WorkItemsByDeletedAt_WhereDeletedAtIsNotNull retrieves a row from 'public.work_items' as a WorkItem.
Generated from index 'work_items_deleted_at_idx'.
func WorkItemsByTeamID ¶
func WorkItemsByTeamID(ctx context.Context, db DB, teamID TeamID, opts ...WorkItemSelectConfigOption) ([]WorkItem, error)
WorkItemsByTeamID retrieves a row from 'public.work_items' as a WorkItem.
Generated from index 'work_items_team_id_idx'.
func (*WorkItem) FKKanbanStep_KanbanStepID ¶
FKKanbanStep_KanbanStepID returns the KanbanStep associated with the WorkItem's (KanbanStepID).
Generated from foreign key 'work_items_kanban_step_id_fkey'.
func (*WorkItem) FKTeam_TeamID ¶
FKTeam_TeamID returns the Team associated with the WorkItem's (TeamID).
Generated from foreign key 'work_items_team_id_fkey'.
func (*WorkItem) FKWorkItemType_WorkItemTypeID ¶
func (wi *WorkItem) FKWorkItemType_WorkItemTypeID(ctx context.Context, db DB) (*WorkItemType, error)
FKWorkItemType_WorkItemTypeID returns the WorkItemType associated with the WorkItem's (WorkItemTypeID).
Generated from foreign key 'work_items_work_item_type_id_fkey'.
func (*WorkItem) SetUpdateParams ¶
func (wi *WorkItem) SetUpdateParams(params *WorkItemUpdateParams)
SetUpdateParams updates public.work_items struct fields with the specified params.
func (*WorkItem) SoftDelete ¶
SoftDelete soft deletes the WorkItem from the database via 'deleted_at'.
type WorkItemAssignee ¶
type WorkItemAssignee struct { WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id Assignee UserID `json:"assignee" db:"assignee" required:"true" nullable:"false"` // assignee Role WorkItemRole `json:"role" db:"role" required:"true" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemsJoin *[]WorkItemAssigneeM2MWorkItemWIA `json:"-" db:"work_item_assignee_work_items"` // M2M work_item_assignee AssigneesJoin *[]WorkItemAssigneeM2MAssigneeWIA `json:"-" db:"work_item_assignee_assignees"` // M2M work_item_assignee }
WorkItemAssignee represents a row from 'public.work_item_assignee'.
func CreateWorkItemAssignee ¶
func CreateWorkItemAssignee(ctx context.Context, db DB, params *WorkItemAssigneeCreateParams) (*WorkItemAssignee, error)
CreateWorkItemAssignee creates a new WorkItemAssignee in the database with the given params.
func WorkItemAssigneeByWorkItemIDAssignee ¶
func WorkItemAssigneeByWorkItemIDAssignee(ctx context.Context, db DB, workItemID WorkItemID, assignee UserID, opts ...WorkItemAssigneeSelectConfigOption) (*WorkItemAssignee, error)
WorkItemAssigneeByWorkItemIDAssignee retrieves a row from 'public.work_item_assignee' as a WorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func WorkItemAssigneePaginated ¶
func WorkItemAssigneePaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...WorkItemAssigneeSelectConfigOption) ([]WorkItemAssignee, error)
WorkItemAssigneePaginated returns a cursor-paginated list of WorkItemAssignee. At least one cursor is required.
func WorkItemAssigneesByAssignee ¶
func WorkItemAssigneesByAssignee(ctx context.Context, db DB, assignee UserID, opts ...WorkItemAssigneeSelectConfigOption) ([]WorkItemAssignee, error)
WorkItemAssigneesByAssignee retrieves a row from 'public.work_item_assignee' as a WorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func WorkItemAssigneesByAssigneeWorkItemID ¶
func WorkItemAssigneesByAssigneeWorkItemID(ctx context.Context, db DB, assignee UserID, workItemID WorkItemID, opts ...WorkItemAssigneeSelectConfigOption) ([]WorkItemAssignee, error)
WorkItemAssigneesByAssigneeWorkItemID retrieves a row from 'public.work_item_assignee' as a WorkItemAssignee.
Generated from index 'work_item_assignee_assignee_work_item_id_idx'.
func WorkItemAssigneesByWorkItemID ¶
func WorkItemAssigneesByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, opts ...WorkItemAssigneeSelectConfigOption) ([]WorkItemAssignee, error)
WorkItemAssigneesByWorkItemID retrieves a row from 'public.work_item_assignee' as a WorkItemAssignee.
Generated from index 'work_item_assignee_pkey'.
func (*WorkItemAssignee) Delete ¶
func (wia *WorkItemAssignee) Delete(ctx context.Context, db DB) error
Delete deletes the WorkItemAssignee from the database.
func (*WorkItemAssignee) FKUser_Assignee ¶
FKUser_Assignee returns the User associated with the WorkItemAssignee's (Assignee).
Generated from foreign key 'work_item_assignee_assignee_fkey'.
func (*WorkItemAssignee) FKWorkItem_WorkItemID ¶
FKWorkItem_WorkItemID returns the WorkItem associated with the WorkItemAssignee's (WorkItemID).
Generated from foreign key 'work_item_assignee_work_item_id_fkey'.
func (*WorkItemAssignee) Insert ¶
func (wia *WorkItemAssignee) Insert(ctx context.Context, db DB) (*WorkItemAssignee, error)
Insert inserts the WorkItemAssignee to the database.
func (*WorkItemAssignee) SetUpdateParams ¶
func (wia *WorkItemAssignee) SetUpdateParams(params *WorkItemAssigneeUpdateParams)
SetUpdateParams updates public.work_item_assignee struct fields with the specified params.
func (*WorkItemAssignee) Update ¶
func (wia *WorkItemAssignee) Update(ctx context.Context, db DB) (*WorkItemAssignee, error)
Update updates a WorkItemAssignee in the database.
func (*WorkItemAssignee) Upsert ¶
func (wia *WorkItemAssignee) Upsert(ctx context.Context, db DB, params *WorkItemAssigneeCreateParams) (*WorkItemAssignee, error)
Upsert upserts a WorkItemAssignee in the database. Requires appropriate PK(s) to be set beforehand.
type WorkItemAssigneeCreateParams ¶
type WorkItemAssigneeCreateParams struct { Assignee UserID `json:"assignee" required:"true" nullable:"false"` // assignee Role WorkItemRole `json:"role" required:"true" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemID WorkItemID `json:"workItemID" required:"true" nullable:"false"` // work_item_id }
WorkItemAssigneeCreateParams represents insert params for 'public.work_item_assignee'.
func (WorkItemAssigneeCreateParams) GetAssignee ¶
func (p WorkItemAssigneeCreateParams) GetAssignee() *UserID
func (WorkItemAssigneeCreateParams) GetRole ¶
func (p WorkItemAssigneeCreateParams) GetRole() *WorkItemRole
func (WorkItemAssigneeCreateParams) GetWorkItemID ¶
func (p WorkItemAssigneeCreateParams) GetWorkItemID() *WorkItemID
type WorkItemAssigneeJoins ¶
type WorkItemAssigneeM2MAssigneeWIA ¶
type WorkItemAssigneeM2MAssigneeWIA struct { User User `json:"user" db:"users" required:"true"` Role WorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
WorkItemAssigneeM2MAssigneeWIA represents a M2M join against "public.work_item_assignee"
type WorkItemAssigneeM2MWorkItemWIA ¶
type WorkItemAssigneeM2MWorkItemWIA struct { WorkItem WorkItem `json:"workItem" db:"work_items" required:"true"` Role WorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
WorkItemAssigneeM2MWorkItemWIA represents a M2M join against "public.work_item_assignee"
type WorkItemAssigneeParams ¶
type WorkItemAssigneeParams interface { GetAssignee() *UserID GetRole() *WorkItemRole GetWorkItemID() *WorkItemID }
WorkItemAssigneeParams represents common params for both insert and update of 'public.work_item_assignee'.
type WorkItemAssigneeSelectConfig ¶
type WorkItemAssigneeSelectConfig struct {
// contains filtered or unexported fields
}
type WorkItemAssigneeSelectConfigOption ¶
type WorkItemAssigneeSelectConfigOption func(*WorkItemAssigneeSelectConfig)
func WithWorkItemAssigneeFilters ¶
func WithWorkItemAssigneeFilters(filters map[string][]any) WorkItemAssigneeSelectConfigOption
WithWorkItemAssigneeFilters 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 WithWorkItemAssigneeHavingClause ¶
func WithWorkItemAssigneeHavingClause(conditions map[string][]any) WorkItemAssigneeSelectConfigOption
WithWorkItemAssigneeHavingClause 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 WithWorkItemAssigneeJoin ¶
func WithWorkItemAssigneeJoin(joins WorkItemAssigneeJoins) WorkItemAssigneeSelectConfigOption
WithWorkItemAssigneeJoin joins with the given tables.
func WithWorkItemAssigneeLimit ¶
func WithWorkItemAssigneeLimit(limit int) WorkItemAssigneeSelectConfigOption
WithWorkItemAssigneeLimit limits row selection.
func WithWorkItemAssigneeOrderBy ¶
func WithWorkItemAssigneeOrderBy(rows map[string]*Direction) WorkItemAssigneeSelectConfigOption
WithWorkItemAssigneeOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type WorkItemAssigneeUpdateParams ¶
type WorkItemAssigneeUpdateParams struct { Assignee *UserID `json:"assignee" nullable:"false"` // assignee Role *WorkItemRole `json:"role" nullable:"false" ref:"#/components/schemas/WorkItemRole"` // role WorkItemID *WorkItemID `json:"workItemID" nullable:"false"` // work_item_id }
WorkItemAssigneeUpdateParams represents update params for 'public.work_item_assignee'.
func (WorkItemAssigneeUpdateParams) GetAssignee ¶
func (p WorkItemAssigneeUpdateParams) GetAssignee() *UserID
func (WorkItemAssigneeUpdateParams) GetRole ¶
func (p WorkItemAssigneeUpdateParams) GetRole() *WorkItemRole
func (WorkItemAssigneeUpdateParams) GetWorkItemID ¶
func (p WorkItemAssigneeUpdateParams) GetWorkItemID() *WorkItemID
type WorkItemBase ¶
type WorkItemBase struct { ClosedAt *time.Time `json:"closedAt"` CreatedAt time.Time `json:"createdAt"` DeletedAt *time.Time `json:"deletedAt"` Description string `json:"description"` KanbanStepID KanbanStepID `json:"kanbanStepID"` Members *[]ModelsWorkItemM2MAssigneeWIA `json:"members"` Metadata map[string]interface{} `json:"metadata"` // ProjectName is generated from projects table. ProjectName ProjectName `json:"projectName"` TargetDate time.Time `json:"targetDate"` TeamID *TeamID `json:"teamID"` TimeEntries *[]ModelsTimeEntry `json:"timeEntries"` Title string `json:"title"` UpdatedAt time.Time `json:"updatedAt"` WorkItemComments *[]ModelsWorkItemComment `json:"workItemComments"` WorkItemID WorkItemID `json:"workItemID"` WorkItemTags *[]ModelsWorkItemTag `json:"workItemTags"` WorkItemType *ModelsWorkItemType `json:"workItemType,omitempty"` WorkItemTypeID WorkItemTypeID `json:"workItemTypeID"` }
WorkItemBase defines the model for WorkItemBase.
type WorkItemComment ¶
type WorkItemComment struct { WorkItemCommentID WorkItemCommentID `json:"workItemCommentID" db:"work_item_comment_id" required:"true" nullable:"false"` // work_item_comment_id WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id UserID UserID `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 *User `json:"-" db:"user_user_id"` // O2O users (generated from M2O) WorkItemJoin *WorkItem `json:"-" db:"work_item_work_item_id"` // O2O work_items (generated from M2O) }
WorkItemComment represents a row from 'public.work_item_comments'.
func CreateWorkItemComment ¶
func CreateWorkItemComment(ctx context.Context, db DB, params *WorkItemCommentCreateParams) (*WorkItemComment, error)
CreateWorkItemComment creates a new WorkItemComment in the database with the given params.
func WorkItemCommentByWorkItemCommentID ¶
func WorkItemCommentByWorkItemCommentID(ctx context.Context, db DB, workItemCommentID WorkItemCommentID, opts ...WorkItemCommentSelectConfigOption) (*WorkItemComment, error)
WorkItemCommentByWorkItemCommentID retrieves a row from 'public.work_item_comments' as a WorkItemComment.
Generated from index 'work_item_comments_pkey'.
func WorkItemCommentPaginated ¶
func WorkItemCommentPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...WorkItemCommentSelectConfigOption) ([]WorkItemComment, error)
WorkItemCommentPaginated returns a cursor-paginated list of WorkItemComment. At least one cursor is required.
func WorkItemCommentsByWorkItemID ¶
func WorkItemCommentsByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, opts ...WorkItemCommentSelectConfigOption) ([]WorkItemComment, error)
WorkItemCommentsByWorkItemID retrieves a row from 'public.work_item_comments' as a WorkItemComment.
Generated from index 'work_item_comments_work_item_id_idx'.
func (*WorkItemComment) Delete ¶
func (wic *WorkItemComment) Delete(ctx context.Context, db DB) error
Delete deletes the WorkItemComment from the database.
func (*WorkItemComment) FKUser_UserID ¶
FKUser_UserID returns the User associated with the WorkItemComment's (UserID).
Generated from foreign key 'work_item_comments_user_id_fkey'.
func (*WorkItemComment) FKWorkItem_WorkItemID ¶
FKWorkItem_WorkItemID returns the WorkItem associated with the WorkItemComment's (WorkItemID).
Generated from foreign key 'work_item_comments_work_item_id_fkey'.
func (*WorkItemComment) Insert ¶
func (wic *WorkItemComment) Insert(ctx context.Context, db DB) (*WorkItemComment, error)
Insert inserts the WorkItemComment to the database.
func (*WorkItemComment) SetUpdateParams ¶
func (wic *WorkItemComment) SetUpdateParams(params *WorkItemCommentUpdateParams)
SetUpdateParams updates public.work_item_comments struct fields with the specified params.
func (*WorkItemComment) Update ¶
func (wic *WorkItemComment) Update(ctx context.Context, db DB) (*WorkItemComment, error)
Update updates a WorkItemComment in the database.
func (*WorkItemComment) Upsert ¶
func (wic *WorkItemComment) Upsert(ctx context.Context, db DB, params *WorkItemCommentCreateParams) (*WorkItemComment, error)
Upsert upserts a WorkItemComment in the database. Requires appropriate PK(s) to be set beforehand.
type WorkItemCommentCreateParams ¶
type WorkItemCommentCreateParams struct { Message string `json:"message" required:"true" nullable:"false"` // message UserID UserID `json:"userID" required:"true" nullable:"false"` // user_id WorkItemID WorkItemID `json:"workItemID" required:"true" nullable:"false"` // work_item_id }
WorkItemCommentCreateParams represents insert params for 'public.work_item_comments'.
func (WorkItemCommentCreateParams) GetMessage ¶
func (p WorkItemCommentCreateParams) GetMessage() *string
func (WorkItemCommentCreateParams) GetUserID ¶
func (p WorkItemCommentCreateParams) GetUserID() *UserID
func (WorkItemCommentCreateParams) GetWorkItemID ¶
func (p WorkItemCommentCreateParams) GetWorkItemID() *WorkItemID
type WorkItemCommentID ¶
type WorkItemCommentID int
type WorkItemCommentJoins ¶
type WorkItemCommentParams ¶
type WorkItemCommentParams interface { GetMessage() *string GetUserID() *UserID GetWorkItemID() *WorkItemID }
WorkItemCommentParams represents common params for both insert and update of 'public.work_item_comments'.
type WorkItemCommentResponse ¶
type WorkItemCommentResponse struct { CreatedAt time.Time `json:"createdAt"` Message string `json:"message"` UpdatedAt time.Time `json:"updatedAt"` UserID ModelsUserID `json:"userID"` WorkItemCommentID WorkItemCommentID `json:"workItemCommentID"` WorkItemID WorkItemID `json:"workItemID"` }
WorkItemCommentResponse defines the model for WorkItemCommentResponse.
type WorkItemCommentSelectConfig ¶
type WorkItemCommentSelectConfig struct {
// contains filtered or unexported fields
}
type WorkItemCommentSelectConfigOption ¶
type WorkItemCommentSelectConfigOption func(*WorkItemCommentSelectConfig)
func WithWorkItemCommentFilters ¶
func WithWorkItemCommentFilters(filters map[string][]any) WorkItemCommentSelectConfigOption
WithWorkItemCommentFilters 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 WithWorkItemCommentHavingClause ¶
func WithWorkItemCommentHavingClause(conditions map[string][]any) WorkItemCommentSelectConfigOption
WithWorkItemCommentHavingClause 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 WithWorkItemCommentJoin ¶
func WithWorkItemCommentJoin(joins WorkItemCommentJoins) WorkItemCommentSelectConfigOption
WithWorkItemCommentJoin joins with the given tables.
func WithWorkItemCommentLimit ¶
func WithWorkItemCommentLimit(limit int) WorkItemCommentSelectConfigOption
WithWorkItemCommentLimit limits row selection.
func WithWorkItemCommentOrderBy ¶
func WithWorkItemCommentOrderBy(rows map[string]*Direction) WorkItemCommentSelectConfigOption
WithWorkItemCommentOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type WorkItemCommentUpdateParams ¶
type WorkItemCommentUpdateParams struct { Message *string `json:"message" nullable:"false"` // message UserID *UserID `json:"userID" nullable:"false"` // user_id WorkItemID *WorkItemID `json:"workItemID" nullable:"false"` // work_item_id }
WorkItemCommentUpdateParams represents update params for 'public.work_item_comments'.
func (WorkItemCommentUpdateParams) GetMessage ¶
func (p WorkItemCommentUpdateParams) GetMessage() *string
func (WorkItemCommentUpdateParams) GetUserID ¶
func (p WorkItemCommentUpdateParams) GetUserID() *UserID
func (WorkItemCommentUpdateParams) GetWorkItemID ¶
func (p WorkItemCommentUpdateParams) GetWorkItemID() *WorkItemID
type WorkItemCreateParams ¶
type WorkItemCreateParams struct { ClosedAt *time.Time `json:"closedAt"` // closed_at Description string `json:"description" required:"true" nullable:"false"` // description KanbanStepID KanbanStepID `json:"kanbanStepID" required:"true" nullable:"false"` // kanban_step_id Metadata map[string]any `json:"metadata" required:"true" nullable:"false"` // metadata TargetDate time.Time `json:"targetDate" required:"true" nullable:"false"` // target_date TeamID TeamID `json:"teamID" required:"true" nullable:"false"` // team_id Title string `json:"title" required:"true" nullable:"false"` // title WorkItemTypeID WorkItemTypeID `json:"workItemTypeID" required:"true" nullable:"false"` // work_item_type_id }
WorkItemCreateParams represents insert params for 'public.work_items'.
func (WorkItemCreateParams) GetClosedAt ¶
func (p WorkItemCreateParams) GetClosedAt() *time.Time
func (WorkItemCreateParams) GetDescription ¶
func (p WorkItemCreateParams) GetDescription() *string
func (WorkItemCreateParams) GetKanbanStepID ¶
func (p WorkItemCreateParams) GetKanbanStepID() *KanbanStepID
func (WorkItemCreateParams) GetMetadata ¶
func (p WorkItemCreateParams) GetMetadata() *map[string]any
func (WorkItemCreateParams) GetTargetDate ¶
func (p WorkItemCreateParams) GetTargetDate() *time.Time
func (WorkItemCreateParams) GetTeamID ¶
func (p WorkItemCreateParams) GetTeamID() *TeamID
func (WorkItemCreateParams) GetTitle ¶
func (p WorkItemCreateParams) GetTitle() *string
func (WorkItemCreateParams) GetWorkItemTypeID ¶
func (p WorkItemCreateParams) GetWorkItemTypeID() *WorkItemTypeID
type WorkItemID ¶
type WorkItemID int
type WorkItemJoins ¶
type WorkItemJoins struct { DemoTwoWorkItem bool `json:"demoTwoWorkItem" required:"true" nullable:"false"` // O2O demo_two_work_items 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 WorkItemTags bool `json:"workItemTags" required:"true" nullable:"false"` // M2M work_item_work_item_tag KanbanStep bool `json:"kanbanStep" required:"true" nullable:"false"` // O2O kanban_steps Team bool `json:"team" required:"true" nullable:"false"` // O2O teams WorkItemType bool `json:"workItemType" required:"true" nullable:"false"` // O2O work_item_types }
type WorkItemM2MAssigneeWIA ¶
type WorkItemM2MAssigneeWIA struct { User User `json:"user" db:"users" required:"true"` Role WorkItemRole `json:"role" db:"role" required:"true" ref:"#/components/schemas/WorkItemRole" ` }
WorkItemM2MAssigneeWIA represents a M2M join against "public.work_item_assignee"
type WorkItemParams ¶
type WorkItemParams interface { GetClosedAt() *time.Time GetDescription() *string GetKanbanStepID() *KanbanStepID GetMetadata() *map[string]any GetTargetDate() *time.Time GetTeamID() *TeamID GetTitle() *string GetWorkItemTypeID() *WorkItemTypeID }
WorkItemParams represents common params for both insert and update of 'public.work_items'.
type WorkItemResponse ¶
type WorkItemResponse struct { FromQueryParams bool // contains filtered or unexported fields }
WorkItemResponse defines the model for WorkItemResponse.
func (WorkItemResponse) AsDemoTwoWorkItemResponse ¶
func (t WorkItemResponse) AsDemoTwoWorkItemResponse() (DemoTwoWorkItemResponse, error)
AsDemoTwoWorkItemResponse returns the union data inside the WorkItemResponse as a DemoTwoWorkItemResponse
func (WorkItemResponse) AsDemoWorkItemResponse ¶
func (t WorkItemResponse) AsDemoWorkItemResponse() (DemoWorkItemResponse, error)
AsDemoWorkItemResponse returns the union data inside the WorkItemResponse as a DemoWorkItemResponse
func (WorkItemResponse) Discriminator ¶
func (t WorkItemResponse) Discriminator() (string, error)
Discriminator via struct field ProjectName.
func (WorkItemResponse) MarshalJSON ¶
func (t WorkItemResponse) MarshalJSON() ([]byte, error)
func (*WorkItemResponse) UnmarshalJSON ¶
func (t *WorkItemResponse) UnmarshalJSON(b []byte) error
func (WorkItemResponse) ValueByDiscriminator ¶
func (t WorkItemResponse) ValueByDiscriminator() (interface{}, error)
type WorkItemRole ¶
type WorkItemRole string
WorkItemRole is the 'work_item_role' enum type from schema 'public'.
const ( // WorkItemRolePreparer is the 'preparer' work_item_role. WorkItemRolePreparer WorkItemRole = "preparer" // WorkItemRoleReviewer is the 'reviewer' work_item_role. WorkItemRoleReviewer WorkItemRole = "reviewer" )
WorkItemRole values.
func AllWorkItemRoleValues ¶
func AllWorkItemRoleValues() []WorkItemRole
func (*WorkItemRole) Scan ¶
func (wir *WorkItemRole) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface.
type WorkItemSelectConfig ¶
type WorkItemSelectConfig struct {
// contains filtered or unexported fields
}
type WorkItemSelectConfigOption ¶
type WorkItemSelectConfigOption func(*WorkItemSelectConfig)
func WithDeletedWorkItemOnly ¶
func WithDeletedWorkItemOnly() WorkItemSelectConfigOption
WithDeletedWorkItemOnly limits result to records marked as deleted.
func WithWorkItemFilters ¶
func WithWorkItemFilters(filters map[string][]any) WorkItemSelectConfigOption
WithWorkItemFilters 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 WithWorkItemHavingClause ¶
func WithWorkItemHavingClause(conditions map[string][]any) WorkItemSelectConfigOption
WithWorkItemHavingClause 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 WithWorkItemJoin ¶
func WithWorkItemJoin(joins WorkItemJoins) WorkItemSelectConfigOption
WithWorkItemJoin joins with the given tables.
func WithWorkItemLimit ¶
func WithWorkItemLimit(limit int) WorkItemSelectConfigOption
WithWorkItemLimit limits row selection.
func WithWorkItemOrderBy ¶
func WithWorkItemOrderBy(rows map[string]*Direction) WorkItemSelectConfigOption
WithWorkItemOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type WorkItemTag ¶
type WorkItemTag struct { WorkItemTagID WorkItemTagID `json:"workItemTagID" db:"work_item_tag_id" required:"true" nullable:"false"` // work_item_tag_id ProjectID ProjectID `json:"projectID" db:"project_id" required:"true" nullable:"false"` // project_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name Description string `json:"description" db:"description" required:"true" nullable:"false"` // description Color string `json:"color" db:"color" required:"true" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color DeletedAt *time.Time `json:"deletedAt" db:"deleted_at"` // deleted_at ProjectJoin *Project `json:"-" db:"project_project_id"` // O2O projects (generated from M2O) WorkItemsJoin *[]WorkItem `json:"-" db:"work_item_work_item_tag_work_items"` // M2M work_item_work_item_tag }
WorkItemTag represents a row from 'public.work_item_tags'.
func CreateWorkItemTag ¶
func CreateWorkItemTag(ctx context.Context, db DB, params *WorkItemTagCreateParams) (*WorkItemTag, error)
CreateWorkItemTag creates a new WorkItemTag in the database with the given params.
func WorkItemTagByNameProjectID ¶
func WorkItemTagByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, opts ...WorkItemTagSelectConfigOption) (*WorkItemTag, error)
WorkItemTagByNameProjectID retrieves a row from 'public.work_item_tags' as a WorkItemTag.
Generated from index 'work_item_tags_name_project_id_key'.
func WorkItemTagByWorkItemTagID ¶
func WorkItemTagByWorkItemTagID(ctx context.Context, db DB, workItemTagID WorkItemTagID, opts ...WorkItemTagSelectConfigOption) (*WorkItemTag, error)
WorkItemTagByWorkItemTagID retrieves a row from 'public.work_item_tags' as a WorkItemTag.
Generated from index 'work_item_tags_pkey'.
func WorkItemTagPaginated ¶
func WorkItemTagPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...WorkItemTagSelectConfigOption) ([]WorkItemTag, error)
WorkItemTagPaginated returns a cursor-paginated list of WorkItemTag. At least one cursor is required.
func WorkItemTagsByName ¶
func WorkItemTagsByName(ctx context.Context, db DB, name string, opts ...WorkItemTagSelectConfigOption) ([]WorkItemTag, error)
WorkItemTagsByName retrieves a row from 'public.work_item_tags' as a WorkItemTag.
Generated from index 'work_item_tags_name_project_id_key'.
func WorkItemTagsByProjectID ¶
func WorkItemTagsByProjectID(ctx context.Context, db DB, projectID ProjectID, opts ...WorkItemTagSelectConfigOption) ([]WorkItemTag, error)
WorkItemTagsByProjectID retrieves a row from 'public.work_item_tags' as a WorkItemTag.
Generated from index 'work_item_tags_name_project_id_key'.
func (*WorkItemTag) Delete ¶
func (wit *WorkItemTag) Delete(ctx context.Context, db DB) error
Delete deletes the WorkItemTag from the database.
func (*WorkItemTag) FKProject_ProjectID ¶
FKProject_ProjectID returns the Project associated with the WorkItemTag's (ProjectID).
Generated from foreign key 'work_item_tags_project_id_fkey'.
func (*WorkItemTag) Insert ¶
func (wit *WorkItemTag) Insert(ctx context.Context, db DB) (*WorkItemTag, error)
Insert inserts the WorkItemTag to the database.
func (*WorkItemTag) Restore ¶
func (wit *WorkItemTag) Restore(ctx context.Context, db DB) (*WorkItemTag, error)
Restore restores a soft deleted WorkItemTag from the database.
func (*WorkItemTag) SetUpdateParams ¶
func (wit *WorkItemTag) SetUpdateParams(params *WorkItemTagUpdateParams)
SetUpdateParams updates public.work_item_tags struct fields with the specified params.
func (*WorkItemTag) SoftDelete ¶
func (wit *WorkItemTag) SoftDelete(ctx context.Context, db DB) error
SoftDelete soft deletes the WorkItemTag from the database via 'deleted_at'.
func (*WorkItemTag) Update ¶
func (wit *WorkItemTag) Update(ctx context.Context, db DB) (*WorkItemTag, error)
Update updates a WorkItemTag in the database.
func (*WorkItemTag) Upsert ¶
func (wit *WorkItemTag) Upsert(ctx context.Context, db DB, params *WorkItemTagCreateParams) (*WorkItemTag, error)
Upsert upserts a WorkItemTag in the database. Requires appropriate PK(s) to be set beforehand.
type WorkItemTagCreateParams ¶
type WorkItemTagCreateParams struct { Color string `json:"color" required:"true" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color Description string `json:"description" required:"true" nullable:"false"` // description Name string `json:"name" required:"true" nullable:"false"` // name ProjectID ProjectID `json:"-"` // project_id }
WorkItemTagCreateParams represents insert params for 'public.work_item_tags'.
func (WorkItemTagCreateParams) GetColor ¶
func (p WorkItemTagCreateParams) GetColor() *string
func (WorkItemTagCreateParams) GetDescription ¶
func (p WorkItemTagCreateParams) GetDescription() *string
func (WorkItemTagCreateParams) GetName ¶
func (p WorkItemTagCreateParams) GetName() *string
func (WorkItemTagCreateParams) GetProjectID ¶
func (p WorkItemTagCreateParams) GetProjectID() *ProjectID
type WorkItemTagID ¶
type WorkItemTagID int
type WorkItemTagJoins ¶
type WorkItemTagParams ¶
type WorkItemTagParams interface { GetColor() *string GetDescription() *string GetName() *string GetProjectID() *ProjectID }
WorkItemTagParams represents common params for both insert and update of 'public.work_item_tags'.
type WorkItemTagResponse ¶
type WorkItemTagResponse struct { Color string `json:"color"` DeletedAt *time.Time `json:"deletedAt"` Description string `json:"description"` Name string `json:"name"` ProjectID ProjectID `json:"projectID"` WorkItemTagID WorkItemTagID `json:"workItemTagID"` }
WorkItemTagResponse defines the model for WorkItemTagResponse.
type WorkItemTagSelectConfig ¶
type WorkItemTagSelectConfig struct {
// contains filtered or unexported fields
}
type WorkItemTagSelectConfigOption ¶
type WorkItemTagSelectConfigOption func(*WorkItemTagSelectConfig)
func WithDeletedWorkItemTagOnly ¶
func WithDeletedWorkItemTagOnly() WorkItemTagSelectConfigOption
WithDeletedWorkItemTagOnly limits result to records marked as deleted.
func WithWorkItemTagFilters ¶
func WithWorkItemTagFilters(filters map[string][]any) WorkItemTagSelectConfigOption
WithWorkItemTagFilters 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 WithWorkItemTagHavingClause ¶
func WithWorkItemTagHavingClause(conditions map[string][]any) WorkItemTagSelectConfigOption
WithWorkItemTagHavingClause 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 WithWorkItemTagJoin ¶
func WithWorkItemTagJoin(joins WorkItemTagJoins) WorkItemTagSelectConfigOption
WithWorkItemTagJoin joins with the given tables.
func WithWorkItemTagLimit ¶
func WithWorkItemTagLimit(limit int) WorkItemTagSelectConfigOption
WithWorkItemTagLimit limits row selection.
func WithWorkItemTagOrderBy ¶
func WithWorkItemTagOrderBy(rows map[string]*Direction) WorkItemTagSelectConfigOption
WithWorkItemTagOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type WorkItemTagUpdateParams ¶
type WorkItemTagUpdateParams struct { Color *string `json:"color" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color Description *string `json:"description" nullable:"false"` // description Name *string `json:"name" nullable:"false"` // name ProjectID *ProjectID `json:"-"` // project_id }
WorkItemTagUpdateParams represents update params for 'public.work_item_tags'.
func (WorkItemTagUpdateParams) GetColor ¶
func (p WorkItemTagUpdateParams) GetColor() *string
func (WorkItemTagUpdateParams) GetDescription ¶
func (p WorkItemTagUpdateParams) GetDescription() *string
func (WorkItemTagUpdateParams) GetName ¶
func (p WorkItemTagUpdateParams) GetName() *string
func (WorkItemTagUpdateParams) GetProjectID ¶
func (p WorkItemTagUpdateParams) GetProjectID() *ProjectID
type WorkItemType ¶
type WorkItemType struct { WorkItemTypeID WorkItemTypeID `json:"workItemTypeID" db:"work_item_type_id" required:"true" nullable:"false"` // work_item_type_id ProjectID ProjectID `json:"projectID" db:"project_id" required:"true" nullable:"false"` // project_id Name string `json:"name" db:"name" required:"true" nullable:"false"` // name Description string `json:"description" db:"description" required:"true" nullable:"false"` // description Color string `json:"color" db:"color" required:"true" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color ProjectJoin *Project `json:"-" db:"project_project_id"` // O2O projects (generated from M2O) }
WorkItemType represents a row from 'public.work_item_types'.
func CreateWorkItemType ¶
func CreateWorkItemType(ctx context.Context, db DB, params *WorkItemTypeCreateParams) (*WorkItemType, error)
CreateWorkItemType creates a new WorkItemType in the database with the given params.
func WorkItemTypeByNameProjectID ¶
func WorkItemTypeByNameProjectID(ctx context.Context, db DB, name string, projectID ProjectID, opts ...WorkItemTypeSelectConfigOption) (*WorkItemType, error)
WorkItemTypeByNameProjectID retrieves a row from 'public.work_item_types' as a WorkItemType.
Generated from index 'work_item_types_name_project_id_key'.
func WorkItemTypeByWorkItemTypeID ¶
func WorkItemTypeByWorkItemTypeID(ctx context.Context, db DB, workItemTypeID WorkItemTypeID, opts ...WorkItemTypeSelectConfigOption) (*WorkItemType, error)
WorkItemTypeByWorkItemTypeID retrieves a row from 'public.work_item_types' as a WorkItemType.
Generated from index 'work_item_types_pkey'.
func WorkItemTypePaginated ¶
func WorkItemTypePaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...WorkItemTypeSelectConfigOption) ([]WorkItemType, error)
WorkItemTypePaginated returns a cursor-paginated list of WorkItemType. At least one cursor is required.
func WorkItemTypesByName ¶
func WorkItemTypesByName(ctx context.Context, db DB, name string, opts ...WorkItemTypeSelectConfigOption) ([]WorkItemType, error)
WorkItemTypesByName retrieves a row from 'public.work_item_types' as a WorkItemType.
Generated from index 'work_item_types_name_project_id_key'.
func WorkItemTypesByProjectID ¶
func WorkItemTypesByProjectID(ctx context.Context, db DB, projectID ProjectID, opts ...WorkItemTypeSelectConfigOption) ([]WorkItemType, error)
WorkItemTypesByProjectID retrieves a row from 'public.work_item_types' as a WorkItemType.
Generated from index 'work_item_types_name_project_id_key'.
func (*WorkItemType) Delete ¶
func (wit *WorkItemType) Delete(ctx context.Context, db DB) error
Delete deletes the WorkItemType from the database.
func (*WorkItemType) FKProject_ProjectID ¶
FKProject_ProjectID returns the Project associated with the WorkItemType's (ProjectID).
Generated from foreign key 'work_item_types_project_id_fkey'.
func (*WorkItemType) Insert ¶
func (wit *WorkItemType) Insert(ctx context.Context, db DB) (*WorkItemType, error)
Insert inserts the WorkItemType to the database.
func (*WorkItemType) SetUpdateParams ¶
func (wit *WorkItemType) SetUpdateParams(params *WorkItemTypeUpdateParams)
SetUpdateParams updates public.work_item_types struct fields with the specified params.
func (*WorkItemType) Update ¶
func (wit *WorkItemType) Update(ctx context.Context, db DB) (*WorkItemType, error)
Update updates a WorkItemType in the database.
func (*WorkItemType) Upsert ¶
func (wit *WorkItemType) Upsert(ctx context.Context, db DB, params *WorkItemTypeCreateParams) (*WorkItemType, error)
Upsert upserts a WorkItemType in the database. Requires appropriate PK(s) to be set beforehand.
type WorkItemTypeCreateParams ¶
type WorkItemTypeCreateParams struct { Color string `json:"color" required:"true" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color Description string `json:"description" required:"true" nullable:"false"` // description Name string `json:"name" required:"true" nullable:"false"` // name ProjectID ProjectID `json:"-"` // project_id }
WorkItemTypeCreateParams represents insert params for 'public.work_item_types'.
func (WorkItemTypeCreateParams) GetColor ¶
func (p WorkItemTypeCreateParams) GetColor() *string
func (WorkItemTypeCreateParams) GetDescription ¶
func (p WorkItemTypeCreateParams) GetDescription() *string
func (WorkItemTypeCreateParams) GetName ¶
func (p WorkItemTypeCreateParams) GetName() *string
func (WorkItemTypeCreateParams) GetProjectID ¶
func (p WorkItemTypeCreateParams) GetProjectID() *ProjectID
type WorkItemTypeID ¶
type WorkItemTypeID int
type WorkItemTypeJoins ¶
type WorkItemTypeJoins struct {
Project bool `json:"project" required:"true" nullable:"false"` // O2O projects
}
type WorkItemTypeParams ¶
type WorkItemTypeParams interface { GetColor() *string GetDescription() *string GetName() *string GetProjectID() *ProjectID }
WorkItemTypeParams represents common params for both insert and update of 'public.work_item_types'.
type WorkItemTypeResponse ¶
type WorkItemTypeResponse struct { Color string `json:"color"` Description string `json:"description"` Name string `json:"name"` ProjectID ProjectID `json:"projectID"` WorkItemTypeID WorkItemTypeID `json:"workItemTypeID"` }
WorkItemTypeResponse defines the model for WorkItemTypeResponse.
type WorkItemTypeSelectConfig ¶
type WorkItemTypeSelectConfig struct {
// contains filtered or unexported fields
}
type WorkItemTypeSelectConfigOption ¶
type WorkItemTypeSelectConfigOption func(*WorkItemTypeSelectConfig)
func WithWorkItemTypeFilters ¶
func WithWorkItemTypeFilters(filters map[string][]any) WorkItemTypeSelectConfigOption
WithWorkItemTypeFilters 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 WithWorkItemTypeHavingClause ¶
func WithWorkItemTypeHavingClause(conditions map[string][]any) WorkItemTypeSelectConfigOption
WithWorkItemTypeHavingClause 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 WithWorkItemTypeJoin ¶
func WithWorkItemTypeJoin(joins WorkItemTypeJoins) WorkItemTypeSelectConfigOption
WithWorkItemTypeJoin joins with the given tables.
func WithWorkItemTypeLimit ¶
func WithWorkItemTypeLimit(limit int) WorkItemTypeSelectConfigOption
WithWorkItemTypeLimit limits row selection.
func WithWorkItemTypeOrderBy ¶
func WithWorkItemTypeOrderBy(rows map[string]*Direction) WorkItemTypeSelectConfigOption
WithWorkItemTypeOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type WorkItemTypeUpdateParams ¶
type WorkItemTypeUpdateParams struct { Color *string `json:"color" nullable:"false" pattern:"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"` // color Description *string `json:"description" nullable:"false"` // description Name *string `json:"name" nullable:"false"` // name ProjectID *ProjectID `json:"-"` // project_id }
WorkItemTypeUpdateParams represents update params for 'public.work_item_types'.
func (WorkItemTypeUpdateParams) GetColor ¶
func (p WorkItemTypeUpdateParams) GetColor() *string
func (WorkItemTypeUpdateParams) GetDescription ¶
func (p WorkItemTypeUpdateParams) GetDescription() *string
func (WorkItemTypeUpdateParams) GetName ¶
func (p WorkItemTypeUpdateParams) GetName() *string
func (WorkItemTypeUpdateParams) GetProjectID ¶
func (p WorkItemTypeUpdateParams) GetProjectID() *ProjectID
type WorkItemUpdateParams ¶
type WorkItemUpdateParams struct { ClosedAt **time.Time `json:"closedAt"` // closed_at Description *string `json:"description" nullable:"false"` // description KanbanStepID *KanbanStepID `json:"kanbanStepID" nullable:"false"` // kanban_step_id Metadata *map[string]any `json:"metadata" nullable:"false"` // metadata TargetDate *time.Time `json:"targetDate" nullable:"false"` // target_date TeamID *TeamID `json:"teamID" nullable:"false"` // team_id Title *string `json:"title" nullable:"false"` // title WorkItemTypeID *WorkItemTypeID `json:"workItemTypeID" nullable:"false"` // work_item_type_id }
WorkItemUpdateParams represents update params for 'public.work_items'.
func (WorkItemUpdateParams) GetClosedAt ¶
func (p WorkItemUpdateParams) GetClosedAt() *time.Time
func (WorkItemUpdateParams) GetDescription ¶
func (p WorkItemUpdateParams) GetDescription() *string
func (WorkItemUpdateParams) GetKanbanStepID ¶
func (p WorkItemUpdateParams) GetKanbanStepID() *KanbanStepID
func (WorkItemUpdateParams) GetMetadata ¶
func (p WorkItemUpdateParams) GetMetadata() *map[string]any
func (WorkItemUpdateParams) GetTargetDate ¶
func (p WorkItemUpdateParams) GetTargetDate() *time.Time
func (WorkItemUpdateParams) GetTeamID ¶
func (p WorkItemUpdateParams) GetTeamID() *TeamID
func (WorkItemUpdateParams) GetTitle ¶
func (p WorkItemUpdateParams) GetTitle() *string
func (WorkItemUpdateParams) GetWorkItemTypeID ¶
func (p WorkItemUpdateParams) GetWorkItemTypeID() *WorkItemTypeID
type WorkItemWorkItemTag ¶
type WorkItemWorkItemTag struct { WorkItemTagID WorkItemTagID `json:"workItemTagID" db:"work_item_tag_id" required:"true" nullable:"false"` // work_item_tag_id WorkItemID WorkItemID `json:"workItemID" db:"work_item_id" required:"true" nullable:"false"` // work_item_id WorkItemTagsJoin *[]WorkItemTag `json:"-" db:"work_item_work_item_tag_work_item_tags"` // M2M work_item_work_item_tag WorkItemsJoin *[]WorkItem `json:"-" db:"work_item_work_item_tag_work_items"` // M2M work_item_work_item_tag }
WorkItemWorkItemTag represents a row from 'public.work_item_work_item_tag'.
func CreateWorkItemWorkItemTag ¶
func CreateWorkItemWorkItemTag(ctx context.Context, db DB, params *WorkItemWorkItemTagCreateParams) (*WorkItemWorkItemTag, error)
CreateWorkItemWorkItemTag creates a new WorkItemWorkItemTag in the database with the given params.
func WorkItemWorkItemTagByWorkItemIDWorkItemTagID ¶
func WorkItemWorkItemTagByWorkItemIDWorkItemTagID(ctx context.Context, db DB, workItemID WorkItemID, workItemTagID WorkItemTagID, opts ...WorkItemWorkItemTagSelectConfigOption) (*WorkItemWorkItemTag, error)
WorkItemWorkItemTagByWorkItemIDWorkItemTagID retrieves a row from 'public.work_item_work_item_tag' as a WorkItemWorkItemTag.
Generated from index 'work_item_work_item_tag_pkey'.
func WorkItemWorkItemTagPaginated ¶
func WorkItemWorkItemTagPaginated(ctx context.Context, db DB, cursor PaginationCursor, opts ...WorkItemWorkItemTagSelectConfigOption) ([]WorkItemWorkItemTag, error)
WorkItemWorkItemTagPaginated returns a cursor-paginated list of WorkItemWorkItemTag. At least one cursor is required.
func WorkItemWorkItemTagsByWorkItemID ¶
func WorkItemWorkItemTagsByWorkItemID(ctx context.Context, db DB, workItemID WorkItemID, opts ...WorkItemWorkItemTagSelectConfigOption) ([]WorkItemWorkItemTag, error)
WorkItemWorkItemTagsByWorkItemID retrieves a row from 'public.work_item_work_item_tag' as a WorkItemWorkItemTag.
Generated from index 'work_item_work_item_tag_pkey'.
func WorkItemWorkItemTagsByWorkItemTagID ¶
func WorkItemWorkItemTagsByWorkItemTagID(ctx context.Context, db DB, workItemTagID WorkItemTagID, opts ...WorkItemWorkItemTagSelectConfigOption) ([]WorkItemWorkItemTag, error)
WorkItemWorkItemTagsByWorkItemTagID retrieves a row from 'public.work_item_work_item_tag' as a WorkItemWorkItemTag.
Generated from index 'work_item_work_item_tag_pkey'.
func WorkItemWorkItemTagsByWorkItemTagIDWorkItemID ¶
func WorkItemWorkItemTagsByWorkItemTagIDWorkItemID(ctx context.Context, db DB, workItemTagID WorkItemTagID, workItemID WorkItemID, opts ...WorkItemWorkItemTagSelectConfigOption) ([]WorkItemWorkItemTag, error)
WorkItemWorkItemTagsByWorkItemTagIDWorkItemID retrieves a row from 'public.work_item_work_item_tag' as a WorkItemWorkItemTag.
Generated from index 'work_item_work_item_tag_work_item_tag_id_work_item_id_idx'.
func (*WorkItemWorkItemTag) Delete ¶
func (wiwit *WorkItemWorkItemTag) Delete(ctx context.Context, db DB) error
Delete deletes the WorkItemWorkItemTag from the database.
func (*WorkItemWorkItemTag) FKWorkItemTag_WorkItemTagID ¶
func (wiwit *WorkItemWorkItemTag) FKWorkItemTag_WorkItemTagID(ctx context.Context, db DB) (*WorkItemTag, error)
FKWorkItemTag_WorkItemTagID returns the WorkItemTag associated with the WorkItemWorkItemTag's (WorkItemTagID).
Generated from foreign key 'work_item_work_item_tag_work_item_tag_id_fkey'.
func (*WorkItemWorkItemTag) FKWorkItem_WorkItemID ¶
func (wiwit *WorkItemWorkItemTag) FKWorkItem_WorkItemID(ctx context.Context, db DB) (*WorkItem, error)
FKWorkItem_WorkItemID returns the WorkItem associated with the WorkItemWorkItemTag's (WorkItemID).
Generated from foreign key 'work_item_work_item_tag_work_item_id_fkey'.
func (*WorkItemWorkItemTag) Insert ¶
func (wiwit *WorkItemWorkItemTag) Insert(ctx context.Context, db DB) (*WorkItemWorkItemTag, error)
Insert inserts the WorkItemWorkItemTag to the database.
func (*WorkItemWorkItemTag) SetUpdateParams ¶
func (wiwit *WorkItemWorkItemTag) SetUpdateParams(params *WorkItemWorkItemTagUpdateParams)
SetUpdateParams updates public.work_item_work_item_tag struct fields with the specified params.
type WorkItemWorkItemTagCreateParams ¶
type WorkItemWorkItemTagCreateParams struct { WorkItemID WorkItemID `json:"workItemID" required:"true" nullable:"false"` // work_item_id WorkItemTagID WorkItemTagID `json:"workItemTagID" required:"true" nullable:"false"` // work_item_tag_id }
WorkItemWorkItemTagCreateParams represents insert params for 'public.work_item_work_item_tag'.
func (WorkItemWorkItemTagCreateParams) GetWorkItemID ¶
func (p WorkItemWorkItemTagCreateParams) GetWorkItemID() *WorkItemID
func (WorkItemWorkItemTagCreateParams) GetWorkItemTagID ¶
func (p WorkItemWorkItemTagCreateParams) GetWorkItemTagID() *WorkItemTagID
type WorkItemWorkItemTagParams ¶
type WorkItemWorkItemTagParams interface { GetWorkItemID() *WorkItemID GetWorkItemTagID() *WorkItemTagID }
WorkItemWorkItemTagParams represents common params for both insert and update of 'public.work_item_work_item_tag'.
type WorkItemWorkItemTagSelectConfig ¶
type WorkItemWorkItemTagSelectConfig struct {
// contains filtered or unexported fields
}
type WorkItemWorkItemTagSelectConfigOption ¶
type WorkItemWorkItemTagSelectConfigOption func(*WorkItemWorkItemTagSelectConfig)
func WithWorkItemWorkItemTagFilters ¶
func WithWorkItemWorkItemTagFilters(filters map[string][]any) WorkItemWorkItemTagSelectConfigOption
WithWorkItemWorkItemTagFilters 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 WithWorkItemWorkItemTagHavingClause ¶
func WithWorkItemWorkItemTagHavingClause(conditions map[string][]any) WorkItemWorkItemTagSelectConfigOption
WithWorkItemWorkItemTagHavingClause 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 WithWorkItemWorkItemTagJoin ¶
func WithWorkItemWorkItemTagJoin(joins WorkItemWorkItemTagJoins) WorkItemWorkItemTagSelectConfigOption
WithWorkItemWorkItemTagJoin joins with the given tables.
func WithWorkItemWorkItemTagLimit ¶
func WithWorkItemWorkItemTagLimit(limit int) WorkItemWorkItemTagSelectConfigOption
WithWorkItemWorkItemTagLimit limits row selection.
func WithWorkItemWorkItemTagOrderBy ¶
func WithWorkItemWorkItemTagOrderBy(rows map[string]*Direction) WorkItemWorkItemTagSelectConfigOption
WithWorkItemWorkItemTagOrderBy accumulates orders results by the given columns. A nil entry removes the existing column sort, if any.
type WorkItemWorkItemTagUpdateParams ¶
type WorkItemWorkItemTagUpdateParams struct { WorkItemID *WorkItemID `json:"workItemID" nullable:"false"` // work_item_id WorkItemTagID *WorkItemTagID `json:"workItemTagID" nullable:"false"` // work_item_tag_id }
WorkItemWorkItemTagUpdateParams represents update params for 'public.work_item_work_item_tag'.
func (WorkItemWorkItemTagUpdateParams) GetWorkItemID ¶
func (p WorkItemWorkItemTagUpdateParams) GetWorkItemID() *WorkItemID
func (WorkItemWorkItemTagUpdateParams) GetWorkItemTagID ¶
func (p WorkItemWorkItemTagUpdateParams) GetWorkItemTagID() *WorkItemTagID
Source Files
¶
- activity.xo.go
- cache_extra.xo.go
- cachedemotwoworkitem.xo.go
- cachedemoworkitem.xo.go
- db.go
- db.xo.go
- demotwoworkitem.xo.go
- demoworkitem.xo.go
- entitynotification.xo.go
- extra.xo.go
- extra_schema.notification.sql.sqlc.go
- extra_schema_extra.xo.go
- extraschemabook.xo.go
- extraschemabookauthor.xo.go
- extraschemabookauthorssurrogatekey.xo.go
- extraschemabookreview.xo.go
- extraschemabookseller.xo.go
- extraschemademoworkitem.xo.go
- extraschemadummyjoin.xo.go
- extraschemanotification.xo.go
- extraschemanotificationtype.xo.go
- extraschemapagelement.xo.go
- extraschemauser.xo.go
- extraschemauserapikey.xo.go
- extraschemaworkitem.xo.go
- extraschemaworkitemadmin.xo.go
- extraschemaworkitemassignee.xo.go
- extraschemaworkitemrole.xo.go
- kanbanstep.xo.go
- movie.xo.go
- notification.sql.sqlc.go
- notification.xo.go
- notificationtype.xo.go
- openapi_types.gen.go
- project.sql.sqlc.go
- project.xo.go
- public_extra.xo.go
- querier.go
- sf_beforeupdateupdatedat.xo.go
- sf_createorupdateindex.xo.go
- sf_createorupdateworkitemcachetable.xo.go
- sf_jsonbsetdeep.xo.go
- sf_normalizeindexdef.xo.go
- sf_notificationfanout.xo.go
- sf_projectexists.xo.go
- sf_rowestimator.xo.go
- sf_sameindexdefinition.xo.go
- sf_syncuserprojects.xo.go
- sf_syncuserteams.xo.go
- sf_syncworkitems.xo.go
- team.xo.go
- timeentry.xo.go
- user.sql.sqlc.go
- user.xo.go
- userapikey.xo.go
- usernotification.xo.go
- userproject.xo.go
- userteam.xo.go
- workitem.xo.go
- workitemassignee.xo.go
- workitemcomment.xo.go
- workitemrole.xo.go
- workitemtag.xo.go
- workitemtype.xo.go
- workitemworkitemtag.xo.go