Documentation ¶
Overview ¶
Code generated by https://github.com/src-d/go-kallax. DO NOT EDIT. Please, do not touch the code below, and if you do, do it under your own risk. Take into account that all the code you write here will be completely erased from earth the next time you generate the kallax models.
Index ¶
- Variables
- type Issue
- func (i *Issue) BeforeSave() error
- func (r *Issue) ColumnAddress(col string) (interface{}, error)
- func (r *Issue) GetID() kallax.Identifier
- func (r *Issue) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *Issue) SetRelationship(field string, rel interface{}) error
- func (r *Issue) Value(col string) (interface{}, error)
- type IssueComment
- func (i *IssueComment) BeforeSave() error
- func (r *IssueComment) ColumnAddress(col string) (interface{}, error)
- func (r *IssueComment) GetID() kallax.Identifier
- func (r *IssueComment) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *IssueComment) SetRelationship(field string, rel interface{}) error
- func (r *IssueComment) Value(col string) (interface{}, error)
- type IssueCommentQuery
- func (q *IssueCommentQuery) BatchSize(size uint64) *IssueCommentQuery
- func (q *IssueCommentQuery) Copy() *IssueCommentQuery
- func (q *IssueCommentQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *IssueCommentQuery
- func (q *IssueCommentQuery) FindByIssueNumber(cond kallax.ScalarCond, v int) *IssueCommentQuery
- func (q *IssueCommentQuery) FindByKallaxID(v ...int64) *IssueCommentQuery
- func (q *IssueCommentQuery) FindByRepositoryName(v string) *IssueCommentQuery
- func (q *IssueCommentQuery) FindByRepositoryOwner(v string) *IssueCommentQuery
- func (q *IssueCommentQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *IssueCommentQuery
- func (q *IssueCommentQuery) FindByUserID(cond kallax.ScalarCond, v int64) *IssueCommentQuery
- func (q *IssueCommentQuery) FindByUserLogin(v string) *IssueCommentQuery
- func (q *IssueCommentQuery) Limit(n uint64) *IssueCommentQuery
- func (q *IssueCommentQuery) Offset(n uint64) *IssueCommentQuery
- func (q *IssueCommentQuery) Order(cols ...kallax.ColumnOrder) *IssueCommentQuery
- func (q *IssueCommentQuery) Select(columns ...kallax.SchemaField) *IssueCommentQuery
- func (q *IssueCommentQuery) SelectNot(columns ...kallax.SchemaField) *IssueCommentQuery
- func (q *IssueCommentQuery) Where(cond kallax.Condition) *IssueCommentQuery
- type IssueCommentResultSet
- func (rs *IssueCommentResultSet) All() ([]*IssueComment, error)
- func (rs *IssueCommentResultSet) Close() error
- func (rs *IssueCommentResultSet) Err() error
- func (rs *IssueCommentResultSet) ForEach(fn func(*IssueComment) error) error
- func (rs *IssueCommentResultSet) Get() (*IssueComment, error)
- func (rs *IssueCommentResultSet) Next() bool
- func (rs *IssueCommentResultSet) One() (*IssueComment, error)
- type IssueCommentStore
- func (s *IssueCommentStore) Count(q *IssueCommentQuery) (int64, error)
- func (s *IssueCommentStore) Debug() *IssueCommentStore
- func (s *IssueCommentStore) DebugWith(logger kallax.LoggerFunc) *IssueCommentStore
- func (s *IssueCommentStore) Delete(record *IssueComment) error
- func (s *IssueCommentStore) DisableCacher() *IssueCommentStore
- func (s *IssueCommentStore) Find(q *IssueCommentQuery) (*IssueCommentResultSet, error)
- func (s *IssueCommentStore) FindAll(q *IssueCommentQuery) ([]*IssueComment, error)
- func (s *IssueCommentStore) FindOne(q *IssueCommentQuery) (*IssueComment, error)
- func (s *IssueCommentStore) GenericStore() *kallax.Store
- func (s *IssueCommentStore) Insert(record *IssueComment) error
- func (s *IssueCommentStore) MustCount(q *IssueCommentQuery) int64
- func (s *IssueCommentStore) MustFind(q *IssueCommentQuery) *IssueCommentResultSet
- func (s *IssueCommentStore) MustFindOne(q *IssueCommentQuery) *IssueComment
- func (s *IssueCommentStore) Reload(record *IssueComment) error
- func (s *IssueCommentStore) Save(record *IssueComment) (updated bool, err error)
- func (s *IssueCommentStore) SetGenericStore(store *kallax.Store)
- func (s *IssueCommentStore) Transaction(callback func(*IssueCommentStore) error) error
- func (s *IssueCommentStore) Update(record *IssueComment, cols ...kallax.SchemaField) (updated int64, err error)
- type IssueQuery
- func (q *IssueQuery) BatchSize(size uint64) *IssueQuery
- func (q *IssueQuery) Copy() *IssueQuery
- func (q *IssueQuery) FindByAssigneeID(cond kallax.ScalarCond, v int64) *IssueQuery
- func (q *IssueQuery) FindByAssigneeLogin(v string) *IssueQuery
- func (q *IssueQuery) FindByClosedAt(cond kallax.ScalarCond, v time.Time) *IssueQuery
- func (q *IssueQuery) FindByClosedByID(cond kallax.ScalarCond, v int64) *IssueQuery
- func (q *IssueQuery) FindByClosedByLogin(v string) *IssueQuery
- func (q *IssueQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *IssueQuery
- func (q *IssueQuery) FindByKallaxID(v ...int64) *IssueQuery
- func (q *IssueQuery) FindByLabelList(v ...string) *IssueQuery
- func (q *IssueQuery) FindByMilestoneID(cond kallax.ScalarCond, v int64) *IssueQuery
- func (q *IssueQuery) FindByMilestoneTitle(v string) *IssueQuery
- func (q *IssueQuery) FindByRepositoryName(v string) *IssueQuery
- func (q *IssueQuery) FindByRepositoryOwner(v string) *IssueQuery
- func (q *IssueQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *IssueQuery
- func (q *IssueQuery) FindByUserID(cond kallax.ScalarCond, v int64) *IssueQuery
- func (q *IssueQuery) FindByUserLogin(v string) *IssueQuery
- func (q *IssueQuery) Limit(n uint64) *IssueQuery
- func (q *IssueQuery) Offset(n uint64) *IssueQuery
- func (q *IssueQuery) Order(cols ...kallax.ColumnOrder) *IssueQuery
- func (q *IssueQuery) Select(columns ...kallax.SchemaField) *IssueQuery
- func (q *IssueQuery) SelectNot(columns ...kallax.SchemaField) *IssueQuery
- func (q *IssueQuery) Where(cond kallax.Condition) *IssueQuery
- type IssueResultSet
- func (rs *IssueResultSet) All() ([]*Issue, error)
- func (rs *IssueResultSet) Close() error
- func (rs *IssueResultSet) Err() error
- func (rs *IssueResultSet) ForEach(fn func(*Issue) error) error
- func (rs *IssueResultSet) Get() (*Issue, error)
- func (rs *IssueResultSet) Next() bool
- func (rs *IssueResultSet) One() (*Issue, error)
- type IssueStore
- func (s *IssueStore) Count(q *IssueQuery) (int64, error)
- func (s *IssueStore) Debug() *IssueStore
- func (s *IssueStore) DebugWith(logger kallax.LoggerFunc) *IssueStore
- func (s *IssueStore) Delete(record *Issue) error
- func (s *IssueStore) DisableCacher() *IssueStore
- func (s *IssueStore) Find(q *IssueQuery) (*IssueResultSet, error)
- func (s *IssueStore) FindAll(q *IssueQuery) ([]*Issue, error)
- func (s *IssueStore) FindOne(q *IssueQuery) (*Issue, error)
- func (s *IssueStore) GenericStore() *kallax.Store
- func (s *IssueStore) Insert(record *Issue) error
- func (s *IssueStore) MustCount(q *IssueQuery) int64
- func (s *IssueStore) MustFind(q *IssueQuery) *IssueResultSet
- func (s *IssueStore) MustFindOne(q *IssueQuery) *Issue
- func (s *IssueStore) Reload(record *Issue) error
- func (s *IssueStore) Save(record *Issue) (updated bool, err error)
- func (s *IssueStore) SetGenericStore(store *kallax.Store)
- func (s *IssueStore) Transaction(callback func(*IssueStore) error) error
- func (s *IssueStore) Update(record *Issue, cols ...kallax.SchemaField) (updated int64, err error)
- type Organization
- func (o *Organization) BeforeSave() error
- func (r *Organization) ColumnAddress(col string) (interface{}, error)
- func (r *Organization) GetID() kallax.Identifier
- func (r *Organization) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *Organization) SetRelationship(field string, rel interface{}) error
- func (r *Organization) Value(col string) (interface{}, error)
- type OrganizationQuery
- func (q *OrganizationQuery) BatchSize(size uint64) *OrganizationQuery
- func (q *OrganizationQuery) Copy() *OrganizationQuery
- func (q *OrganizationQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *OrganizationQuery
- func (q *OrganizationQuery) FindByKallaxID(v ...int64) *OrganizationQuery
- func (q *OrganizationQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *OrganizationQuery
- func (q *OrganizationQuery) Limit(n uint64) *OrganizationQuery
- func (q *OrganizationQuery) Offset(n uint64) *OrganizationQuery
- func (q *OrganizationQuery) Order(cols ...kallax.ColumnOrder) *OrganizationQuery
- func (q *OrganizationQuery) Select(columns ...kallax.SchemaField) *OrganizationQuery
- func (q *OrganizationQuery) SelectNot(columns ...kallax.SchemaField) *OrganizationQuery
- func (q *OrganizationQuery) Where(cond kallax.Condition) *OrganizationQuery
- type OrganizationResultSet
- func (rs *OrganizationResultSet) All() ([]*Organization, error)
- func (rs *OrganizationResultSet) Close() error
- func (rs *OrganizationResultSet) Err() error
- func (rs *OrganizationResultSet) ForEach(fn func(*Organization) error) error
- func (rs *OrganizationResultSet) Get() (*Organization, error)
- func (rs *OrganizationResultSet) Next() bool
- func (rs *OrganizationResultSet) One() (*Organization, error)
- type OrganizationStore
- func (s *OrganizationStore) Count(q *OrganizationQuery) (int64, error)
- func (s *OrganizationStore) Debug() *OrganizationStore
- func (s *OrganizationStore) DebugWith(logger kallax.LoggerFunc) *OrganizationStore
- func (s *OrganizationStore) Delete(record *Organization) error
- func (s *OrganizationStore) DisableCacher() *OrganizationStore
- func (s *OrganizationStore) Find(q *OrganizationQuery) (*OrganizationResultSet, error)
- func (s *OrganizationStore) FindAll(q *OrganizationQuery) ([]*Organization, error)
- func (s *OrganizationStore) FindOne(q *OrganizationQuery) (*Organization, error)
- func (s *OrganizationStore) GenericStore() *kallax.Store
- func (s *OrganizationStore) Insert(record *Organization) error
- func (s *OrganizationStore) MustCount(q *OrganizationQuery) int64
- func (s *OrganizationStore) MustFind(q *OrganizationQuery) *OrganizationResultSet
- func (s *OrganizationStore) MustFindOne(q *OrganizationQuery) *Organization
- func (s *OrganizationStore) Reload(record *Organization) error
- func (s *OrganizationStore) Save(record *Organization) (updated bool, err error)
- func (s *OrganizationStore) SetGenericStore(store *kallax.Store)
- func (s *OrganizationStore) Transaction(callback func(*OrganizationStore) error) error
- func (s *OrganizationStore) Update(record *Organization, cols ...kallax.SchemaField) (updated int64, err error)
- type PullRequest
- func (i *PullRequest) BeforeSave() error
- func (r *PullRequest) ColumnAddress(col string) (interface{}, error)
- func (r *PullRequest) GetID() kallax.Identifier
- func (r *PullRequest) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *PullRequest) SetRelationship(field string, rel interface{}) error
- func (r *PullRequest) Value(col string) (interface{}, error)
- type PullRequestComment
- func (i *PullRequestComment) BeforeSave() error
- func (r *PullRequestComment) ColumnAddress(col string) (interface{}, error)
- func (r *PullRequestComment) GetID() kallax.Identifier
- func (r *PullRequestComment) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *PullRequestComment) SetRelationship(field string, rel interface{}) error
- func (r *PullRequestComment) Value(col string) (interface{}, error)
- type PullRequestCommentQuery
- func (q *PullRequestCommentQuery) BatchSize(size uint64) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) Copy() *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByKallaxID(v ...int64) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByPullRequestNumber(cond kallax.ScalarCond, v int) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByRepositoryName(v string) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByRepositoryOwner(v string) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByUserID(cond kallax.ScalarCond, v int64) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) FindByUserLogin(v string) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) Limit(n uint64) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) Offset(n uint64) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) Order(cols ...kallax.ColumnOrder) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) Select(columns ...kallax.SchemaField) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) SelectNot(columns ...kallax.SchemaField) *PullRequestCommentQuery
- func (q *PullRequestCommentQuery) Where(cond kallax.Condition) *PullRequestCommentQuery
- type PullRequestCommentResultSet
- func (rs *PullRequestCommentResultSet) All() ([]*PullRequestComment, error)
- func (rs *PullRequestCommentResultSet) Close() error
- func (rs *PullRequestCommentResultSet) Err() error
- func (rs *PullRequestCommentResultSet) ForEach(fn func(*PullRequestComment) error) error
- func (rs *PullRequestCommentResultSet) Get() (*PullRequestComment, error)
- func (rs *PullRequestCommentResultSet) Next() bool
- func (rs *PullRequestCommentResultSet) One() (*PullRequestComment, error)
- type PullRequestCommentStore
- func (s *PullRequestCommentStore) Count(q *PullRequestCommentQuery) (int64, error)
- func (s *PullRequestCommentStore) Debug() *PullRequestCommentStore
- func (s *PullRequestCommentStore) DebugWith(logger kallax.LoggerFunc) *PullRequestCommentStore
- func (s *PullRequestCommentStore) Delete(record *PullRequestComment) error
- func (s *PullRequestCommentStore) DisableCacher() *PullRequestCommentStore
- func (s *PullRequestCommentStore) Find(q *PullRequestCommentQuery) (*PullRequestCommentResultSet, error)
- func (s *PullRequestCommentStore) FindAll(q *PullRequestCommentQuery) ([]*PullRequestComment, error)
- func (s *PullRequestCommentStore) FindOne(q *PullRequestCommentQuery) (*PullRequestComment, error)
- func (s *PullRequestCommentStore) GenericStore() *kallax.Store
- func (s *PullRequestCommentStore) Insert(record *PullRequestComment) error
- func (s *PullRequestCommentStore) MustCount(q *PullRequestCommentQuery) int64
- func (s *PullRequestCommentStore) MustFind(q *PullRequestCommentQuery) *PullRequestCommentResultSet
- func (s *PullRequestCommentStore) MustFindOne(q *PullRequestCommentQuery) *PullRequestComment
- func (s *PullRequestCommentStore) Reload(record *PullRequestComment) error
- func (s *PullRequestCommentStore) Save(record *PullRequestComment) (updated bool, err error)
- func (s *PullRequestCommentStore) SetGenericStore(store *kallax.Store)
- func (s *PullRequestCommentStore) Transaction(callback func(*PullRequestCommentStore) error) error
- func (s *PullRequestCommentStore) Update(record *PullRequestComment, cols ...kallax.SchemaField) (updated int64, err error)
- type PullRequestQuery
- func (q *PullRequestQuery) BatchSize(size uint64) *PullRequestQuery
- func (q *PullRequestQuery) Copy() *PullRequestQuery
- func (q *PullRequestQuery) FindByAssigneeID(cond kallax.ScalarCond, v int64) *PullRequestQuery
- func (q *PullRequestQuery) FindByAssigneeLogin(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByBaseLabel(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByBaseRef(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByBaseRepositoryName(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByBaseRepositoryOwner(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByBaseSHA(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByBaseUser(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByClosedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
- func (q *PullRequestQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
- func (q *PullRequestQuery) FindByHeadLabel(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByHeadRef(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByHeadRepositoryName(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByHeadRepositoryOwner(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByHeadSHA(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByHeadUser(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByKallaxID(v ...int64) *PullRequestQuery
- func (q *PullRequestQuery) FindByLabelList(v ...string) *PullRequestQuery
- func (q *PullRequestQuery) FindByMergedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
- func (q *PullRequestQuery) FindByMergedByID(cond kallax.ScalarCond, v int64) *PullRequestQuery
- func (q *PullRequestQuery) FindByMergedByLogin(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByMilestoneID(cond kallax.ScalarCond, v int64) *PullRequestQuery
- func (q *PullRequestQuery) FindByMilestoneTitle(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByRepositoryName(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByRepositoryOwner(v string) *PullRequestQuery
- func (q *PullRequestQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
- func (q *PullRequestQuery) FindByUserID(cond kallax.ScalarCond, v int64) *PullRequestQuery
- func (q *PullRequestQuery) FindByUserLogin(v string) *PullRequestQuery
- func (q *PullRequestQuery) Limit(n uint64) *PullRequestQuery
- func (q *PullRequestQuery) Offset(n uint64) *PullRequestQuery
- func (q *PullRequestQuery) Order(cols ...kallax.ColumnOrder) *PullRequestQuery
- func (q *PullRequestQuery) Select(columns ...kallax.SchemaField) *PullRequestQuery
- func (q *PullRequestQuery) SelectNot(columns ...kallax.SchemaField) *PullRequestQuery
- func (q *PullRequestQuery) Where(cond kallax.Condition) *PullRequestQuery
- type PullRequestResultSet
- func (rs *PullRequestResultSet) All() ([]*PullRequest, error)
- func (rs *PullRequestResultSet) Close() error
- func (rs *PullRequestResultSet) Err() error
- func (rs *PullRequestResultSet) ForEach(fn func(*PullRequest) error) error
- func (rs *PullRequestResultSet) Get() (*PullRequest, error)
- func (rs *PullRequestResultSet) Next() bool
- func (rs *PullRequestResultSet) One() (*PullRequest, error)
- type PullRequestReview
- func (i *PullRequestReview) BeforeSave() error
- func (r *PullRequestReview) ColumnAddress(col string) (interface{}, error)
- func (r *PullRequestReview) GetID() kallax.Identifier
- func (r *PullRequestReview) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *PullRequestReview) SetRelationship(field string, rel interface{}) error
- func (r *PullRequestReview) Value(col string) (interface{}, error)
- type PullRequestReviewQuery
- func (q *PullRequestReviewQuery) BatchSize(size uint64) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) Copy() *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) FindByKallaxID(v ...int64) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) FindByPullRequestNumber(cond kallax.ScalarCond, v int) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) FindByRepositoryName(v string) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) FindByRepositoryOwner(v string) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) FindBySubmittedAt(cond kallax.ScalarCond, v time.Time) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) FindByUserID(cond kallax.ScalarCond, v int64) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) FindByUserLogin(v string) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) Limit(n uint64) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) Offset(n uint64) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) Order(cols ...kallax.ColumnOrder) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) Select(columns ...kallax.SchemaField) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) SelectNot(columns ...kallax.SchemaField) *PullRequestReviewQuery
- func (q *PullRequestReviewQuery) Where(cond kallax.Condition) *PullRequestReviewQuery
- type PullRequestReviewResultSet
- func (rs *PullRequestReviewResultSet) All() ([]*PullRequestReview, error)
- func (rs *PullRequestReviewResultSet) Close() error
- func (rs *PullRequestReviewResultSet) Err() error
- func (rs *PullRequestReviewResultSet) ForEach(fn func(*PullRequestReview) error) error
- func (rs *PullRequestReviewResultSet) Get() (*PullRequestReview, error)
- func (rs *PullRequestReviewResultSet) Next() bool
- func (rs *PullRequestReviewResultSet) One() (*PullRequestReview, error)
- type PullRequestReviewStore
- func (s *PullRequestReviewStore) Count(q *PullRequestReviewQuery) (int64, error)
- func (s *PullRequestReviewStore) Debug() *PullRequestReviewStore
- func (s *PullRequestReviewStore) DebugWith(logger kallax.LoggerFunc) *PullRequestReviewStore
- func (s *PullRequestReviewStore) Delete(record *PullRequestReview) error
- func (s *PullRequestReviewStore) DisableCacher() *PullRequestReviewStore
- func (s *PullRequestReviewStore) Find(q *PullRequestReviewQuery) (*PullRequestReviewResultSet, error)
- func (s *PullRequestReviewStore) FindAll(q *PullRequestReviewQuery) ([]*PullRequestReview, error)
- func (s *PullRequestReviewStore) FindOne(q *PullRequestReviewQuery) (*PullRequestReview, error)
- func (s *PullRequestReviewStore) GenericStore() *kallax.Store
- func (s *PullRequestReviewStore) Insert(record *PullRequestReview) error
- func (s *PullRequestReviewStore) MustCount(q *PullRequestReviewQuery) int64
- func (s *PullRequestReviewStore) MustFind(q *PullRequestReviewQuery) *PullRequestReviewResultSet
- func (s *PullRequestReviewStore) MustFindOne(q *PullRequestReviewQuery) *PullRequestReview
- func (s *PullRequestReviewStore) Reload(record *PullRequestReview) error
- func (s *PullRequestReviewStore) Save(record *PullRequestReview) (updated bool, err error)
- func (s *PullRequestReviewStore) SetGenericStore(store *kallax.Store)
- func (s *PullRequestReviewStore) Transaction(callback func(*PullRequestReviewStore) error) error
- func (s *PullRequestReviewStore) Update(record *PullRequestReview, cols ...kallax.SchemaField) (updated int64, err error)
- type PullRequestStore
- func (s *PullRequestStore) Count(q *PullRequestQuery) (int64, error)
- func (s *PullRequestStore) Debug() *PullRequestStore
- func (s *PullRequestStore) DebugWith(logger kallax.LoggerFunc) *PullRequestStore
- func (s *PullRequestStore) Delete(record *PullRequest) error
- func (s *PullRequestStore) DisableCacher() *PullRequestStore
- func (s *PullRequestStore) Find(q *PullRequestQuery) (*PullRequestResultSet, error)
- func (s *PullRequestStore) FindAll(q *PullRequestQuery) ([]*PullRequest, error)
- func (s *PullRequestStore) FindOne(q *PullRequestQuery) (*PullRequest, error)
- func (s *PullRequestStore) GenericStore() *kallax.Store
- func (s *PullRequestStore) Insert(record *PullRequest) error
- func (s *PullRequestStore) MustCount(q *PullRequestQuery) int64
- func (s *PullRequestStore) MustFind(q *PullRequestQuery) *PullRequestResultSet
- func (s *PullRequestStore) MustFindOne(q *PullRequestQuery) *PullRequest
- func (s *PullRequestStore) Reload(record *PullRequest) error
- func (s *PullRequestStore) Save(record *PullRequest) (updated bool, err error)
- func (s *PullRequestStore) SetGenericStore(store *kallax.Store)
- func (s *PullRequestStore) Transaction(callback func(*PullRequestStore) error) error
- func (s *PullRequestStore) Update(record *PullRequest, cols ...kallax.SchemaField) (updated int64, err error)
- type Repository
- func (r *Repository) BeforeSave() error
- func (r *Repository) ColumnAddress(col string) (interface{}, error)
- func (r *Repository) GetID() kallax.Identifier
- func (r *Repository) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *Repository) SetRelationship(field string, rel interface{}) error
- func (r *Repository) Value(col string) (interface{}, error)
- type RepositoryQuery
- func (q *RepositoryQuery) BatchSize(size uint64) *RepositoryQuery
- func (q *RepositoryQuery) Copy() *RepositoryQuery
- func (q *RepositoryQuery) FindByCreatedAt(cond kallax.ScalarCond, v github.Timestamp) *RepositoryQuery
- func (q *RepositoryQuery) FindByKallaxID(v ...int64) *RepositoryQuery
- func (q *RepositoryQuery) FindByOrganizationID(cond kallax.ScalarCond, v int64) *RepositoryQuery
- func (q *RepositoryQuery) FindByOrganizationName(v string) *RepositoryQuery
- func (q *RepositoryQuery) FindByOwnerID(cond kallax.ScalarCond, v int64) *RepositoryQuery
- func (q *RepositoryQuery) FindByOwnerLogin(v string) *RepositoryQuery
- func (q *RepositoryQuery) FindByOwnerType(v string) *RepositoryQuery
- func (q *RepositoryQuery) FindByPushedAt(cond kallax.ScalarCond, v github.Timestamp) *RepositoryQuery
- func (q *RepositoryQuery) FindByTopics(v ...string) *RepositoryQuery
- func (q *RepositoryQuery) FindByUpdatedAt(cond kallax.ScalarCond, v github.Timestamp) *RepositoryQuery
- func (q *RepositoryQuery) Limit(n uint64) *RepositoryQuery
- func (q *RepositoryQuery) Offset(n uint64) *RepositoryQuery
- func (q *RepositoryQuery) Order(cols ...kallax.ColumnOrder) *RepositoryQuery
- func (q *RepositoryQuery) Select(columns ...kallax.SchemaField) *RepositoryQuery
- func (q *RepositoryQuery) SelectNot(columns ...kallax.SchemaField) *RepositoryQuery
- func (q *RepositoryQuery) Where(cond kallax.Condition) *RepositoryQuery
- type RepositoryReference
- type RepositoryResultSet
- func (rs *RepositoryResultSet) All() ([]*Repository, error)
- func (rs *RepositoryResultSet) Close() error
- func (rs *RepositoryResultSet) Err() error
- func (rs *RepositoryResultSet) ForEach(fn func(*Repository) error) error
- func (rs *RepositoryResultSet) Get() (*Repository, error)
- func (rs *RepositoryResultSet) Next() bool
- func (rs *RepositoryResultSet) One() (*Repository, error)
- type RepositoryStore
- func (s *RepositoryStore) Count(q *RepositoryQuery) (int64, error)
- func (s *RepositoryStore) Debug() *RepositoryStore
- func (s *RepositoryStore) DebugWith(logger kallax.LoggerFunc) *RepositoryStore
- func (s *RepositoryStore) Delete(record *Repository) error
- func (s *RepositoryStore) DisableCacher() *RepositoryStore
- func (s *RepositoryStore) Find(q *RepositoryQuery) (*RepositoryResultSet, error)
- func (s *RepositoryStore) FindAll(q *RepositoryQuery) ([]*Repository, error)
- func (s *RepositoryStore) FindOne(q *RepositoryQuery) (*Repository, error)
- func (s *RepositoryStore) GenericStore() *kallax.Store
- func (s *RepositoryStore) Insert(record *Repository) error
- func (s *RepositoryStore) MustCount(q *RepositoryQuery) int64
- func (s *RepositoryStore) MustFind(q *RepositoryQuery) *RepositoryResultSet
- func (s *RepositoryStore) MustFindOne(q *RepositoryQuery) *Repository
- func (s *RepositoryStore) Reload(record *Repository) error
- func (s *RepositoryStore) Save(record *Repository) (updated bool, err error)
- func (s *RepositoryStore) SetGenericStore(store *kallax.Store)
- func (s *RepositoryStore) Transaction(callback func(*RepositoryStore) error) error
- func (s *RepositoryStore) Update(record *Repository, cols ...kallax.SchemaField) (updated int64, err error)
- type User
- func (u *User) BeforeSave() error
- func (r *User) ColumnAddress(col string) (interface{}, error)
- func (r *User) GetID() kallax.Identifier
- func (r *User) NewRelationshipRecord(field string) (kallax.Record, error)
- func (r *User) SetRelationship(field string, rel interface{}) error
- func (r *User) Value(col string) (interface{}, error)
- type UserQuery
- func (q *UserQuery) BatchSize(size uint64) *UserQuery
- func (q *UserQuery) Copy() *UserQuery
- func (q *UserQuery) FindByCreatedAt(cond kallax.ScalarCond, v github.Timestamp) *UserQuery
- func (q *UserQuery) FindByKallaxID(v ...int64) *UserQuery
- func (q *UserQuery) FindBySuspendedAt(cond kallax.ScalarCond, v github.Timestamp) *UserQuery
- func (q *UserQuery) FindByUpdatedAt(cond kallax.ScalarCond, v github.Timestamp) *UserQuery
- func (q *UserQuery) Limit(n uint64) *UserQuery
- func (q *UserQuery) Offset(n uint64) *UserQuery
- func (q *UserQuery) Order(cols ...kallax.ColumnOrder) *UserQuery
- func (q *UserQuery) Select(columns ...kallax.SchemaField) *UserQuery
- func (q *UserQuery) SelectNot(columns ...kallax.SchemaField) *UserQuery
- func (q *UserQuery) Where(cond kallax.Condition) *UserQuery
- type UserReference
- type UserResultSet
- func (rs *UserResultSet) All() ([]*User, error)
- func (rs *UserResultSet) Close() error
- func (rs *UserResultSet) Err() error
- func (rs *UserResultSet) ForEach(fn func(*User) error) error
- func (rs *UserResultSet) Get() (*User, error)
- func (rs *UserResultSet) Next() bool
- func (rs *UserResultSet) One() (*User, error)
- type UserStore
- func (s *UserStore) Count(q *UserQuery) (int64, error)
- func (s *UserStore) Debug() *UserStore
- func (s *UserStore) DebugWith(logger kallax.LoggerFunc) *UserStore
- func (s *UserStore) Delete(record *User) error
- func (s *UserStore) DisableCacher() *UserStore
- func (s *UserStore) Find(q *UserQuery) (*UserResultSet, error)
- func (s *UserStore) FindAll(q *UserQuery) ([]*User, error)
- func (s *UserStore) FindOne(q *UserQuery) (*User, error)
- func (s *UserStore) GenericStore() *kallax.Store
- func (s *UserStore) Insert(record *User) error
- func (s *UserStore) MustCount(q *UserQuery) int64
- func (s *UserStore) MustFind(q *UserQuery) *UserResultSet
- func (s *UserStore) MustFindOne(q *UserQuery) *User
- func (s *UserStore) Reload(record *User) error
- func (s *UserStore) Save(record *User) (updated bool, err error)
- func (s *UserStore) SetGenericStore(store *kallax.Store)
- func (s *UserStore) Transaction(callback func(*UserStore) error) error
- func (s *UserStore) Update(record *User, cols ...kallax.SchemaField) (updated int64, err error)
Constants ¶
This section is empty.
Variables ¶
var Schema = &schema{ Issue: &schemaIssue{ BaseSchema: kallax.NewBaseSchema( "issues", "__issue", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(Issue) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("id"), kallax.NewSchemaField("number"), kallax.NewSchemaField("state"), kallax.NewSchemaField("locked"), kallax.NewSchemaField("title"), kallax.NewSchemaField("body"), kallax.NewSchemaField("comments"), kallax.NewSchemaField("closed_at"), kallax.NewSchemaField("created_at"), kallax.NewSchemaField("updated_at"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("repository_owner"), kallax.NewSchemaField("repository_name"), kallax.NewSchemaField("labels"), kallax.NewSchemaField("user_id"), kallax.NewSchemaField("user_login"), kallax.NewSchemaField("assignee_id"), kallax.NewSchemaField("assignee_login"), kallax.NewSchemaField("assignees"), kallax.NewSchemaField("closed_by_id"), kallax.NewSchemaField("closed_by_login"), kallax.NewSchemaField("milestone_id"), kallax.NewSchemaField("milestone_title"), ), KallaxID: kallax.NewSchemaField("kallax_id"), ID: kallax.NewSchemaField("id"), Number: kallax.NewSchemaField("number"), State: kallax.NewSchemaField("state"), Locked: kallax.NewSchemaField("locked"), Title: kallax.NewSchemaField("title"), Body: kallax.NewSchemaField("body"), Comments: kallax.NewSchemaField("comments"), ClosedAt: kallax.NewSchemaField("closed_at"), CreatedAt: kallax.NewSchemaField("created_at"), UpdatedAt: kallax.NewSchemaField("updated_at"), HTMLURL: kallax.NewSchemaField("htmlurl"), NodeID: kallax.NewSchemaField("node_id"), RepositoryOwner: kallax.NewSchemaField("repository_owner"), RepositoryName: kallax.NewSchemaField("repository_name"), LabelList: kallax.NewSchemaField("labels"), UserID: kallax.NewSchemaField("user_id"), UserLogin: kallax.NewSchemaField("user_login"), AssigneeID: kallax.NewSchemaField("assignee_id"), AssigneeLogin: kallax.NewSchemaField("assignee_login"), AssigneesList: &schemaIssueAssigneesList{ BaseSchemaField: kallax.NewSchemaField("assignees").(*kallax.BaseSchemaField), ID: kallax.NewJSONSchemaKey(kallax.JSONInt, "assignees", "id"), Login: kallax.NewJSONSchemaKey(kallax.JSONText, "assignees", "login"), }, ClosedByID: kallax.NewSchemaField("closed_by_id"), ClosedByLogin: kallax.NewSchemaField("closed_by_login"), MilestoneID: kallax.NewSchemaField("milestone_id"), MilestoneTitle: kallax.NewSchemaField("milestone_title"), }, IssueComment: &schemaIssueComment{ BaseSchema: kallax.NewBaseSchema( "issue_comments", "__issuecomment", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(IssueComment) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("id"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("body"), kallax.NewSchemaField("reactions"), kallax.NewSchemaField("created_at"), kallax.NewSchemaField("updated_at"), kallax.NewSchemaField("author_association"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("user_id"), kallax.NewSchemaField("user_login"), kallax.NewSchemaField("issue_number"), kallax.NewSchemaField("repository_owner"), kallax.NewSchemaField("repository_name"), ), KallaxID: kallax.NewSchemaField("kallax_id"), ID: kallax.NewSchemaField("id"), NodeID: kallax.NewSchemaField("node_id"), Body: kallax.NewSchemaField("body"), Reactions: &schemaIssueCommentReactions{ BaseSchemaField: kallax.NewSchemaField("reactions").(*kallax.BaseSchemaField), TotalCount: kallax.NewJSONSchemaKey(kallax.JSONInt, "issue_comment", "reactions", "total_count"), PlusOne: kallax.NewJSONSchemaKey(kallax.JSONInt, "issue_comment", "reactions", "+1"), MinusOne: kallax.NewJSONSchemaKey(kallax.JSONInt, "issue_comment", "reactions", "-1"), Laugh: kallax.NewJSONSchemaKey(kallax.JSONInt, "issue_comment", "reactions", "laugh"), Confused: kallax.NewJSONSchemaKey(kallax.JSONInt, "issue_comment", "reactions", "confused"), Heart: kallax.NewJSONSchemaKey(kallax.JSONInt, "issue_comment", "reactions", "heart"), Hooray: kallax.NewJSONSchemaKey(kallax.JSONInt, "issue_comment", "reactions", "hooray"), }, CreatedAt: kallax.NewSchemaField("created_at"), UpdatedAt: kallax.NewSchemaField("updated_at"), AuthorAssociation: kallax.NewSchemaField("author_association"), HTMLURL: kallax.NewSchemaField("htmlurl"), UserID: kallax.NewSchemaField("user_id"), UserLogin: kallax.NewSchemaField("user_login"), IssueNumber: kallax.NewSchemaField("issue_number"), RepositoryOwner: kallax.NewSchemaField("repository_owner"), RepositoryName: kallax.NewSchemaField("repository_name"), }, Organization: &schemaOrganization{ BaseSchema: kallax.NewBaseSchema( "organizations", "__organization", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(Organization) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("login"), kallax.NewSchemaField("id"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("avatar_url"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("name"), kallax.NewSchemaField("company"), kallax.NewSchemaField("blog"), kallax.NewSchemaField("location"), kallax.NewSchemaField("email"), kallax.NewSchemaField("description"), kallax.NewSchemaField("public_repos"), kallax.NewSchemaField("public_gists"), kallax.NewSchemaField("followers"), kallax.NewSchemaField("following"), kallax.NewSchemaField("created_at"), kallax.NewSchemaField("updated_at"), kallax.NewSchemaField("total_private_repos"), kallax.NewSchemaField("owned_private_repos"), kallax.NewSchemaField("private_gists"), kallax.NewSchemaField("disk_usage"), kallax.NewSchemaField("collaborators"), kallax.NewSchemaField("billing_email"), kallax.NewSchemaField("type"), kallax.NewSchemaField("two_factor_requirement_enabled"), ), KallaxID: kallax.NewSchemaField("kallax_id"), Login: kallax.NewSchemaField("login"), ID: kallax.NewSchemaField("id"), NodeID: kallax.NewSchemaField("node_id"), AvatarURL: kallax.NewSchemaField("avatar_url"), HTMLURL: kallax.NewSchemaField("htmlurl"), Name: kallax.NewSchemaField("name"), Company: kallax.NewSchemaField("company"), Blog: kallax.NewSchemaField("blog"), Location: kallax.NewSchemaField("location"), Email: kallax.NewSchemaField("email"), Description: kallax.NewSchemaField("description"), PublicRepos: kallax.NewSchemaField("public_repos"), PublicGists: kallax.NewSchemaField("public_gists"), Followers: kallax.NewSchemaField("followers"), Following: kallax.NewSchemaField("following"), CreatedAt: kallax.NewSchemaField("created_at"), UpdatedAt: kallax.NewSchemaField("updated_at"), TotalPrivateRepos: kallax.NewSchemaField("total_private_repos"), OwnedPrivateRepos: kallax.NewSchemaField("owned_private_repos"), PrivateGists: kallax.NewSchemaField("private_gists"), DiskUsage: kallax.NewSchemaField("disk_usage"), Collaborators: kallax.NewSchemaField("collaborators"), BillingEmail: kallax.NewSchemaField("billing_email"), Type: kallax.NewSchemaField("type"), TwoFactorRequirementEnabled: kallax.NewSchemaField("two_factor_requirement_enabled"), }, PullRequest: &schemaPullRequest{ BaseSchema: kallax.NewBaseSchema( "pull_requests", "__pullrequest", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(PullRequest) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("id"), kallax.NewSchemaField("number"), kallax.NewSchemaField("state"), kallax.NewSchemaField("title"), kallax.NewSchemaField("body"), kallax.NewSchemaField("created_at"), kallax.NewSchemaField("updated_at"), kallax.NewSchemaField("closed_at"), kallax.NewSchemaField("merged_at"), kallax.NewSchemaField("draft"), kallax.NewSchemaField("merged"), kallax.NewSchemaField("mergeable"), kallax.NewSchemaField("mergeable_state"), kallax.NewSchemaField("merge_commit_sha"), kallax.NewSchemaField("comments"), kallax.NewSchemaField("commits"), kallax.NewSchemaField("additions"), kallax.NewSchemaField("deletions"), kallax.NewSchemaField("changed_files"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("review_comments"), kallax.NewSchemaField("maintainer_can_modify"), kallax.NewSchemaField("author_association"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("repository_owner"), kallax.NewSchemaField("repository_name"), kallax.NewSchemaField("labels"), kallax.NewSchemaField("user_id"), kallax.NewSchemaField("user_login"), kallax.NewSchemaField("merged_by_id"), kallax.NewSchemaField("merged_by_login"), kallax.NewSchemaField("assignee_id"), kallax.NewSchemaField("assignee_login"), kallax.NewSchemaField("assignees"), kallax.NewSchemaField("requested_reviewers"), kallax.NewSchemaField("milestone_id"), kallax.NewSchemaField("milestone_title"), kallax.NewSchemaField("head_sha"), kallax.NewSchemaField("head_ref"), kallax.NewSchemaField("head_label"), kallax.NewSchemaField("head_user"), kallax.NewSchemaField("head_repository_owner"), kallax.NewSchemaField("head_repository_name"), kallax.NewSchemaField("base_sha"), kallax.NewSchemaField("base_ref"), kallax.NewSchemaField("base_label"), kallax.NewSchemaField("base_user"), kallax.NewSchemaField("base_repository_owner"), kallax.NewSchemaField("base_repository_name"), ), KallaxID: kallax.NewSchemaField("kallax_id"), ID: kallax.NewSchemaField("id"), Number: kallax.NewSchemaField("number"), State: kallax.NewSchemaField("state"), Title: kallax.NewSchemaField("title"), Body: kallax.NewSchemaField("body"), CreatedAt: kallax.NewSchemaField("created_at"), UpdatedAt: kallax.NewSchemaField("updated_at"), ClosedAt: kallax.NewSchemaField("closed_at"), MergedAt: kallax.NewSchemaField("merged_at"), Draft: kallax.NewSchemaField("draft"), Merged: kallax.NewSchemaField("merged"), Mergeable: kallax.NewSchemaField("mergeable"), MergeableState: kallax.NewSchemaField("mergeable_state"), MergeCommitSHA: kallax.NewSchemaField("merge_commit_sha"), Comments: kallax.NewSchemaField("comments"), Commits: kallax.NewSchemaField("commits"), Additions: kallax.NewSchemaField("additions"), Deletions: kallax.NewSchemaField("deletions"), ChangedFiles: kallax.NewSchemaField("changed_files"), HTMLURL: kallax.NewSchemaField("htmlurl"), ReviewComments: kallax.NewSchemaField("review_comments"), MaintainerCanModify: kallax.NewSchemaField("maintainer_can_modify"), AuthorAssociation: kallax.NewSchemaField("author_association"), NodeID: kallax.NewSchemaField("node_id"), RepositoryOwner: kallax.NewSchemaField("repository_owner"), RepositoryName: kallax.NewSchemaField("repository_name"), LabelList: kallax.NewSchemaField("labels"), UserID: kallax.NewSchemaField("user_id"), UserLogin: kallax.NewSchemaField("user_login"), MergedByID: kallax.NewSchemaField("merged_by_id"), MergedByLogin: kallax.NewSchemaField("merged_by_login"), AssigneeID: kallax.NewSchemaField("assignee_id"), AssigneeLogin: kallax.NewSchemaField("assignee_login"), AssigneesList: &schemaPullRequestAssigneesList{ BaseSchemaField: kallax.NewSchemaField("assignees").(*kallax.BaseSchemaField), ID: kallax.NewJSONSchemaKey(kallax.JSONInt, "assignees", "id"), Login: kallax.NewJSONSchemaKey(kallax.JSONText, "assignees", "login"), }, RequestedReviewersList: &schemaPullRequestRequestedReviewersList{ BaseSchemaField: kallax.NewSchemaField("requested_reviewers").(*kallax.BaseSchemaField), ID: kallax.NewJSONSchemaKey(kallax.JSONInt, "requested_reviewers", "id"), Login: kallax.NewJSONSchemaKey(kallax.JSONText, "requested_reviewers", "login"), }, MilestoneID: kallax.NewSchemaField("milestone_id"), MilestoneTitle: kallax.NewSchemaField("milestone_title"), HeadSHA: kallax.NewSchemaField("head_sha"), HeadRef: kallax.NewSchemaField("head_ref"), HeadLabel: kallax.NewSchemaField("head_label"), HeadUser: kallax.NewSchemaField("head_user"), HeadRepositoryOwner: kallax.NewSchemaField("head_repository_owner"), HeadRepositoryName: kallax.NewSchemaField("head_repository_name"), BaseSHA: kallax.NewSchemaField("base_sha"), BaseRef: kallax.NewSchemaField("base_ref"), BaseLabel: kallax.NewSchemaField("base_label"), BaseUser: kallax.NewSchemaField("base_user"), BaseRepositoryOwner: kallax.NewSchemaField("base_repository_owner"), BaseRepositoryName: kallax.NewSchemaField("base_repository_name"), }, PullRequestComment: &schemaPullRequestComment{ BaseSchema: kallax.NewBaseSchema( "pull_request_comments", "__pullrequestcomment", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(PullRequestComment) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("id"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("in_reply_to"), kallax.NewSchemaField("body"), kallax.NewSchemaField("path"), kallax.NewSchemaField("diff_hunk"), kallax.NewSchemaField("pull_request_review_id"), kallax.NewSchemaField("position"), kallax.NewSchemaField("original_position"), kallax.NewSchemaField("commit_id"), kallax.NewSchemaField("original_commit_id"), kallax.NewSchemaField("reactions"), kallax.NewSchemaField("created_at"), kallax.NewSchemaField("updated_at"), kallax.NewSchemaField("author_association"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("user_id"), kallax.NewSchemaField("user_login"), kallax.NewSchemaField("pull_request_number"), kallax.NewSchemaField("repository_owner"), kallax.NewSchemaField("repository_name"), ), KallaxID: kallax.NewSchemaField("kallax_id"), ID: kallax.NewSchemaField("id"), NodeID: kallax.NewSchemaField("node_id"), InReplyTo: kallax.NewSchemaField("in_reply_to"), Body: kallax.NewSchemaField("body"), Path: kallax.NewSchemaField("path"), DiffHunk: kallax.NewSchemaField("diff_hunk"), PullRequestReviewID: kallax.NewSchemaField("pull_request_review_id"), Position: kallax.NewSchemaField("position"), OriginalPosition: kallax.NewSchemaField("original_position"), CommitID: kallax.NewSchemaField("commit_id"), OriginalCommitID: kallax.NewSchemaField("original_commit_id"), Reactions: &schemaPullRequestCommentReactions{ BaseSchemaField: kallax.NewSchemaField("reactions").(*kallax.BaseSchemaField), TotalCount: kallax.NewJSONSchemaKey(kallax.JSONInt, "pull_request_comment", "reactions", "total_count"), PlusOne: kallax.NewJSONSchemaKey(kallax.JSONInt, "pull_request_comment", "reactions", "+1"), MinusOne: kallax.NewJSONSchemaKey(kallax.JSONInt, "pull_request_comment", "reactions", "-1"), Laugh: kallax.NewJSONSchemaKey(kallax.JSONInt, "pull_request_comment", "reactions", "laugh"), Confused: kallax.NewJSONSchemaKey(kallax.JSONInt, "pull_request_comment", "reactions", "confused"), Heart: kallax.NewJSONSchemaKey(kallax.JSONInt, "pull_request_comment", "reactions", "heart"), Hooray: kallax.NewJSONSchemaKey(kallax.JSONInt, "pull_request_comment", "reactions", "hooray"), }, CreatedAt: kallax.NewSchemaField("created_at"), UpdatedAt: kallax.NewSchemaField("updated_at"), AuthorAssociation: kallax.NewSchemaField("author_association"), HTMLURL: kallax.NewSchemaField("htmlurl"), UserID: kallax.NewSchemaField("user_id"), UserLogin: kallax.NewSchemaField("user_login"), PullRequestNumber: kallax.NewSchemaField("pull_request_number"), RepositoryOwner: kallax.NewSchemaField("repository_owner"), RepositoryName: kallax.NewSchemaField("repository_name"), }, PullRequestReview: &schemaPullRequestReview{ BaseSchema: kallax.NewBaseSchema( "pull_request_reviews", "__pullrequestreview", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(PullRequestReview) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("id"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("body"), kallax.NewSchemaField("submitted_at"), kallax.NewSchemaField("commit_id"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("state"), kallax.NewSchemaField("user_id"), kallax.NewSchemaField("user_login"), kallax.NewSchemaField("pull_request_number"), kallax.NewSchemaField("repository_owner"), kallax.NewSchemaField("repository_name"), ), KallaxID: kallax.NewSchemaField("kallax_id"), ID: kallax.NewSchemaField("id"), NodeID: kallax.NewSchemaField("node_id"), Body: kallax.NewSchemaField("body"), SubmittedAt: kallax.NewSchemaField("submitted_at"), CommitID: kallax.NewSchemaField("commit_id"), HTMLURL: kallax.NewSchemaField("htmlurl"), State: kallax.NewSchemaField("state"), UserID: kallax.NewSchemaField("user_id"), UserLogin: kallax.NewSchemaField("user_login"), PullRequestNumber: kallax.NewSchemaField("pull_request_number"), RepositoryOwner: kallax.NewSchemaField("repository_owner"), RepositoryName: kallax.NewSchemaField("repository_name"), }, Repository: &schemaRepository{ BaseSchema: kallax.NewBaseSchema( "repositories", "__repository", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(Repository) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("id"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("name"), kallax.NewSchemaField("full_name"), kallax.NewSchemaField("description"), kallax.NewSchemaField("homepage"), kallax.NewSchemaField("code_of_conduct"), kallax.NewSchemaField("default_branch"), kallax.NewSchemaField("master_branch"), kallax.NewSchemaField("created_at"), kallax.NewSchemaField("pushed_at"), kallax.NewSchemaField("updated_at"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("clone_url"), kallax.NewSchemaField("git_url"), kallax.NewSchemaField("mirror_url"), kallax.NewSchemaField("sshurl"), kallax.NewSchemaField("svnurl"), kallax.NewSchemaField("language"), kallax.NewSchemaField("fork"), kallax.NewSchemaField("forks_count"), kallax.NewSchemaField("network_count"), kallax.NewSchemaField("open_issues_count"), kallax.NewSchemaField("stargazers_count"), kallax.NewSchemaField("subscribers_count"), kallax.NewSchemaField("watchers_count"), kallax.NewSchemaField("size"), kallax.NewSchemaField("auto_init"), kallax.NewSchemaField("permissions"), kallax.NewSchemaField("allow_rebase_merge"), kallax.NewSchemaField("allow_squash_merge"), kallax.NewSchemaField("allow_merge_commit"), kallax.NewSchemaField("topics"), kallax.NewSchemaField("archived"), kallax.NewSchemaField("disabled"), kallax.NewSchemaField("license"), kallax.NewSchemaField("private"), kallax.NewSchemaField("has_issues"), kallax.NewSchemaField("has_wiki"), kallax.NewSchemaField("has_pages"), kallax.NewSchemaField("has_projects"), kallax.NewSchemaField("has_downloads"), kallax.NewSchemaField("license_template"), kallax.NewSchemaField("gitignore_template"), kallax.NewSchemaField("team_id"), kallax.NewSchemaField("parent"), kallax.NewSchemaField("source"), kallax.NewSchemaField("owner_id"), kallax.NewSchemaField("owner_type"), kallax.NewSchemaField("owner_login"), kallax.NewSchemaField("organization_id"), kallax.NewSchemaField("organization_name"), ), KallaxID: kallax.NewSchemaField("kallax_id"), ID: kallax.NewSchemaField("id"), NodeID: kallax.NewSchemaField("node_id"), Name: kallax.NewSchemaField("name"), FullName: kallax.NewSchemaField("full_name"), Description: kallax.NewSchemaField("description"), Homepage: kallax.NewSchemaField("homepage"), CodeOfConduct: &schemaRepositoryCodeOfConduct{ BaseSchemaField: kallax.NewSchemaField("code_of_conduct").(*kallax.BaseSchemaField), Name: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "code_of_conduct", "name"), Key: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "code_of_conduct", "key"), Body: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "code_of_conduct", "body"), }, DefaultBranch: kallax.NewSchemaField("default_branch"), MasterBranch: kallax.NewSchemaField("master_branch"), CreatedAt: kallax.NewSchemaField("created_at"), PushedAt: kallax.NewSchemaField("pushed_at"), UpdatedAt: kallax.NewSchemaField("updated_at"), HTMLURL: kallax.NewSchemaField("htmlurl"), CloneURL: kallax.NewSchemaField("clone_url"), GitURL: kallax.NewSchemaField("git_url"), MirrorURL: kallax.NewSchemaField("mirror_url"), SSHURL: kallax.NewSchemaField("sshurl"), SVNURL: kallax.NewSchemaField("svnurl"), Language: kallax.NewSchemaField("language"), Fork: kallax.NewSchemaField("fork"), ForksCount: kallax.NewSchemaField("forks_count"), NetworkCount: kallax.NewSchemaField("network_count"), OpenIssuesCount: kallax.NewSchemaField("open_issues_count"), StargazersCount: kallax.NewSchemaField("stargazers_count"), SubscribersCount: kallax.NewSchemaField("subscribers_count"), WatchersCount: kallax.NewSchemaField("watchers_count"), Size: kallax.NewSchemaField("size"), AutoInit: kallax.NewSchemaField("auto_init"), Permissions: kallax.NewSchemaField("permissions"), AllowRebaseMerge: kallax.NewSchemaField("allow_rebase_merge"), AllowSquashMerge: kallax.NewSchemaField("allow_squash_merge"), AllowMergeCommit: kallax.NewSchemaField("allow_merge_commit"), Topics: kallax.NewSchemaField("topics"), Archived: kallax.NewSchemaField("archived"), Disabled: kallax.NewSchemaField("disabled"), License: &schemaRepositoryLicense{ BaseSchemaField: kallax.NewSchemaField("license").(*kallax.BaseSchemaField), Key: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "license", "key"), Name: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "license", "name"), SPDXID: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "license", "spdx_id"), HTMLURL: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "license", "html_url"), Featured: kallax.NewJSONSchemaKey(kallax.JSONBool, "repository", "license", "featured"), Description: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "license", "description"), Implementation: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "license", "implementation"), Permissions: kallax.NewJSONSchemaKey(kallax.JSONAny, "repository", "license", "permissions"), Conditions: kallax.NewJSONSchemaKey(kallax.JSONAny, "repository", "license", "conditions"), Limitations: kallax.NewJSONSchemaKey(kallax.JSONAny, "repository", "license", "limitations"), Body: kallax.NewJSONSchemaKey(kallax.JSONText, "repository", "license", "body"), }, Private: kallax.NewSchemaField("private"), HasIssues: kallax.NewSchemaField("has_issues"), HasWiki: kallax.NewSchemaField("has_wiki"), HasPages: kallax.NewSchemaField("has_pages"), HasProjects: kallax.NewSchemaField("has_projects"), HasDownloads: kallax.NewSchemaField("has_downloads"), LicenseTemplate: kallax.NewSchemaField("license_template"), GitignoreTemplate: kallax.NewSchemaField("gitignore_template"), TeamID: kallax.NewSchemaField("team_id"), ParentRepository: &schemaRepositoryParentRepository{ BaseSchemaField: kallax.NewSchemaField("parent").(*kallax.BaseSchemaField), ID: kallax.NewJSONSchemaKey(kallax.JSONInt, "parent", "id"), Name: kallax.NewJSONSchemaKey(kallax.JSONText, "parent", "name"), Fork: kallax.NewJSONSchemaKey(kallax.JSONBool, "parent", "fork"), Size: kallax.NewJSONSchemaKey(kallax.JSONInt, "parent", "size"), OwnerLogin: kallax.NewJSONSchemaKey(kallax.JSONText, "parent", "owner_login"), OwnerType: kallax.NewJSONSchemaKey(kallax.JSONText, "parent", "owner_type"), OwnerID: kallax.NewJSONSchemaKey(kallax.JSONInt, "parent", "owner_id"), }, SourceRepository: &schemaRepositorySourceRepository{ BaseSchemaField: kallax.NewSchemaField("source").(*kallax.BaseSchemaField), ID: kallax.NewJSONSchemaKey(kallax.JSONInt, "source", "id"), Name: kallax.NewJSONSchemaKey(kallax.JSONText, "source", "name"), Fork: kallax.NewJSONSchemaKey(kallax.JSONBool, "source", "fork"), Size: kallax.NewJSONSchemaKey(kallax.JSONInt, "source", "size"), OwnerLogin: kallax.NewJSONSchemaKey(kallax.JSONText, "source", "owner_login"), OwnerType: kallax.NewJSONSchemaKey(kallax.JSONText, "source", "owner_type"), OwnerID: kallax.NewJSONSchemaKey(kallax.JSONInt, "source", "owner_id"), }, OwnerID: kallax.NewSchemaField("owner_id"), OwnerType: kallax.NewSchemaField("owner_type"), OwnerLogin: kallax.NewSchemaField("owner_login"), OrganizationID: kallax.NewSchemaField("organization_id"), OrganizationName: kallax.NewSchemaField("organization_name"), }, User: &schemaUser{ BaseSchema: kallax.NewBaseSchema( "users", "__user", kallax.NewSchemaField("kallax_id"), kallax.ForeignKeys{}, func() kallax.Record { return new(User) }, false, kallax.NewSchemaField("kallax_id"), kallax.NewSchemaField("login"), kallax.NewSchemaField("id"), kallax.NewSchemaField("node_id"), kallax.NewSchemaField("avatar_url"), kallax.NewSchemaField("htmlurl"), kallax.NewSchemaField("gravatar_id"), kallax.NewSchemaField("name"), kallax.NewSchemaField("company"), kallax.NewSchemaField("blog"), kallax.NewSchemaField("location"), kallax.NewSchemaField("email"), kallax.NewSchemaField("hireable"), kallax.NewSchemaField("bio"), kallax.NewSchemaField("public_repos"), kallax.NewSchemaField("public_gists"), kallax.NewSchemaField("followers"), kallax.NewSchemaField("following"), kallax.NewSchemaField("created_at"), kallax.NewSchemaField("updated_at"), kallax.NewSchemaField("suspended_at"), kallax.NewSchemaField("type"), kallax.NewSchemaField("site_admin"), kallax.NewSchemaField("total_private_repos"), kallax.NewSchemaField("owned_private_repos"), kallax.NewSchemaField("private_gists"), kallax.NewSchemaField("disk_usage"), kallax.NewSchemaField("collaborators"), kallax.NewSchemaField("two_factor_authentication"), ), KallaxID: kallax.NewSchemaField("kallax_id"), Login: kallax.NewSchemaField("login"), ID: kallax.NewSchemaField("id"), NodeID: kallax.NewSchemaField("node_id"), AvatarURL: kallax.NewSchemaField("avatar_url"), HTMLURL: kallax.NewSchemaField("htmlurl"), GravatarID: kallax.NewSchemaField("gravatar_id"), Name: kallax.NewSchemaField("name"), Company: kallax.NewSchemaField("company"), Blog: kallax.NewSchemaField("blog"), Location: kallax.NewSchemaField("location"), Email: kallax.NewSchemaField("email"), Hireable: kallax.NewSchemaField("hireable"), Bio: kallax.NewSchemaField("bio"), PublicRepos: kallax.NewSchemaField("public_repos"), PublicGists: kallax.NewSchemaField("public_gists"), Followers: kallax.NewSchemaField("followers"), Following: kallax.NewSchemaField("following"), CreatedAt: kallax.NewSchemaField("created_at"), UpdatedAt: kallax.NewSchemaField("updated_at"), SuspendedAt: kallax.NewSchemaField("suspended_at"), Type: kallax.NewSchemaField("type"), SiteAdmin: kallax.NewSchemaField("site_admin"), TotalPrivateRepos: kallax.NewSchemaField("total_private_repos"), OwnedPrivateRepos: kallax.NewSchemaField("owned_private_repos"), PrivateGists: kallax.NewSchemaField("private_gists"), DiskUsage: kallax.NewSchemaField("disk_usage"), Collaborators: kallax.NewSchemaField("collaborators"), TwoFactorAuthentication: kallax.NewSchemaField("two_factor_authentication"), }, }
Functions ¶
This section is empty.
Types ¶
type Issue ¶
type Issue struct { kallax.Model `` /* 233-byte string literal not displayed */ github.Issue // int64 replacement for Issue.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` RepositoryOwner string `kallax:"repository_owner"` RepositoryName string `kallax:"repository_name"` LabelList []string `kallax:"labels"` UserID int64 `kallax:"user_id"` UserLogin string `kallax:"user_login"` AssigneeID int64 `kallax:"assignee_id"` AssigneeLogin string `kallax:"assignee_login"` AssigneesList []*UserReference `kallax:"assignees"` ClosedByID int64 `kallax:"closed_by_id"` ClosedByLogin string `kallax:"closed_by_login"` MilestoneID int64 `kallax:"milestone_id"` MilestoneTitle string `kallax:"milestone_title"` }
func (*Issue) BeforeSave ¶
func (*Issue) ColumnAddress ¶
ColumnAddress returns the pointer to the value of the given column.
func (*Issue) GetID ¶
func (r *Issue) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*Issue) NewRelationshipRecord ¶
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*Issue) SetRelationship ¶
SetRelationship sets the given relationship in the given field.
type IssueComment ¶
type IssueComment struct { kallax.Model `table:"issue_comments" pk:"kallax_id" ignored:"User,URL,IssueURL"` github.IssueComment UserID int64 `kallax:"user_id"` UserLogin string `kallax:"user_login"` IssueNumber int `kallax:"issue_number"` RepositoryOwner string `kallax:"repository_owner"` RepositoryName string `kallax:"repository_name"` // int64 replacement for IssueComment.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` }
func NewIssueComment ¶
func NewIssueComment() (record *IssueComment)
NewIssueComment returns a new instance of IssueComment.
func (*IssueComment) BeforeSave ¶
func (i *IssueComment) BeforeSave() error
func (*IssueComment) ColumnAddress ¶
func (r *IssueComment) ColumnAddress(col string) (interface{}, error)
ColumnAddress returns the pointer to the value of the given column.
func (*IssueComment) GetID ¶
func (r *IssueComment) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*IssueComment) NewRelationshipRecord ¶
func (r *IssueComment) NewRelationshipRecord(field string) (kallax.Record, error)
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*IssueComment) SetRelationship ¶
func (r *IssueComment) SetRelationship(field string, rel interface{}) error
SetRelationship sets the given relationship in the given field.
func (*IssueComment) Value ¶
func (r *IssueComment) Value(col string) (interface{}, error)
Value returns the value of the given column.
type IssueCommentQuery ¶
type IssueCommentQuery struct {
*kallax.BaseQuery
}
IssueCommentQuery is the object used to create queries for the IssueComment entity.
func NewIssueCommentQuery ¶
func NewIssueCommentQuery() *IssueCommentQuery
NewIssueCommentQuery returns a new instance of IssueCommentQuery.
func (*IssueCommentQuery) BatchSize ¶
func (q *IssueCommentQuery) BatchSize(size uint64) *IssueCommentQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*IssueCommentQuery) Copy ¶
func (q *IssueCommentQuery) Copy() *IssueCommentQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*IssueCommentQuery) FindByCreatedAt ¶
func (q *IssueCommentQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *IssueCommentQuery
FindByCreatedAt adds a new filter to the query that will require that the CreatedAt property is equal to the passed value.
func (*IssueCommentQuery) FindByIssueNumber ¶
func (q *IssueCommentQuery) FindByIssueNumber(cond kallax.ScalarCond, v int) *IssueCommentQuery
FindByIssueNumber adds a new filter to the query that will require that the IssueNumber property is equal to the passed value.
func (*IssueCommentQuery) FindByKallaxID ¶
func (q *IssueCommentQuery) FindByKallaxID(v ...int64) *IssueCommentQuery
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*IssueCommentQuery) FindByRepositoryName ¶
func (q *IssueCommentQuery) FindByRepositoryName(v string) *IssueCommentQuery
FindByRepositoryName adds a new filter to the query that will require that the RepositoryName property is equal to the passed value.
func (*IssueCommentQuery) FindByRepositoryOwner ¶
func (q *IssueCommentQuery) FindByRepositoryOwner(v string) *IssueCommentQuery
FindByRepositoryOwner adds a new filter to the query that will require that the RepositoryOwner property is equal to the passed value.
func (*IssueCommentQuery) FindByUpdatedAt ¶
func (q *IssueCommentQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *IssueCommentQuery
FindByUpdatedAt adds a new filter to the query that will require that the UpdatedAt property is equal to the passed value.
func (*IssueCommentQuery) FindByUserID ¶
func (q *IssueCommentQuery) FindByUserID(cond kallax.ScalarCond, v int64) *IssueCommentQuery
FindByUserID adds a new filter to the query that will require that the UserID property is equal to the passed value.
func (*IssueCommentQuery) FindByUserLogin ¶
func (q *IssueCommentQuery) FindByUserLogin(v string) *IssueCommentQuery
FindByUserLogin adds a new filter to the query that will require that the UserLogin property is equal to the passed value.
func (*IssueCommentQuery) Limit ¶
func (q *IssueCommentQuery) Limit(n uint64) *IssueCommentQuery
Limit sets the max number of items to retrieve.
func (*IssueCommentQuery) Offset ¶
func (q *IssueCommentQuery) Offset(n uint64) *IssueCommentQuery
Offset sets the number of items to skip from the result set of items.
func (*IssueCommentQuery) Order ¶
func (q *IssueCommentQuery) Order(cols ...kallax.ColumnOrder) *IssueCommentQuery
Order adds order clauses to the query for the given columns.
func (*IssueCommentQuery) Select ¶
func (q *IssueCommentQuery) Select(columns ...kallax.SchemaField) *IssueCommentQuery
Select adds columns to select in the query.
func (*IssueCommentQuery) SelectNot ¶
func (q *IssueCommentQuery) SelectNot(columns ...kallax.SchemaField) *IssueCommentQuery
SelectNot excludes columns from being selected in the query.
func (*IssueCommentQuery) Where ¶
func (q *IssueCommentQuery) Where(cond kallax.Condition) *IssueCommentQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type IssueCommentResultSet ¶
type IssueCommentResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
IssueCommentResultSet is the set of results returned by a query to the database.
func NewIssueCommentResultSet ¶
func NewIssueCommentResultSet(rs kallax.ResultSet) *IssueCommentResultSet
NewIssueCommentResultSet creates a new result set for rows of the type IssueComment.
func (*IssueCommentResultSet) All ¶
func (rs *IssueCommentResultSet) All() ([]*IssueComment, error)
All returns all records on the result set and closes the result set.
func (*IssueCommentResultSet) Close ¶
func (rs *IssueCommentResultSet) Close() error
Close closes the result set.
func (*IssueCommentResultSet) Err ¶
func (rs *IssueCommentResultSet) Err() error
Err returns the last error occurred.
func (*IssueCommentResultSet) ForEach ¶
func (rs *IssueCommentResultSet) ForEach(fn func(*IssueComment) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*IssueCommentResultSet) Get ¶
func (rs *IssueCommentResultSet) Get() (*IssueComment, error)
Get retrieves the last fetched item from the result set and the last error.
func (*IssueCommentResultSet) Next ¶
func (rs *IssueCommentResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*IssueCommentResultSet) One ¶
func (rs *IssueCommentResultSet) One() (*IssueComment, error)
One returns the first record on the result set and closes the result set.
type IssueCommentStore ¶
type IssueCommentStore struct {
*kallax.Store
}
IssueCommentStore is the entity to access the records of the type IssueComment in the database.
func NewIssueCommentStore ¶
func NewIssueCommentStore(db *sql.DB) *IssueCommentStore
NewIssueCommentStore creates a new instance of IssueCommentStore using a SQL database.
func (*IssueCommentStore) Count ¶
func (s *IssueCommentStore) Count(q *IssueCommentQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*IssueCommentStore) Debug ¶
func (s *IssueCommentStore) Debug() *IssueCommentStore
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*IssueCommentStore) DebugWith ¶
func (s *IssueCommentStore) DebugWith(logger kallax.LoggerFunc) *IssueCommentStore
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*IssueCommentStore) Delete ¶
func (s *IssueCommentStore) Delete(record *IssueComment) error
Delete removes the given record from the database.
func (*IssueCommentStore) DisableCacher ¶
func (s *IssueCommentStore) DisableCacher() *IssueCommentStore
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*IssueCommentStore) Find ¶
func (s *IssueCommentStore) Find(q *IssueCommentQuery) (*IssueCommentResultSet, error)
Find returns the set of results for the given query.
func (*IssueCommentStore) FindAll ¶
func (s *IssueCommentStore) FindAll(q *IssueCommentQuery) ([]*IssueComment, error)
FindAll returns a list of all the rows returned by the given query.
func (*IssueCommentStore) FindOne ¶
func (s *IssueCommentStore) FindOne(q *IssueCommentQuery) (*IssueComment, error)
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*IssueCommentStore) GenericStore ¶
func (s *IssueCommentStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*IssueCommentStore) Insert ¶
func (s *IssueCommentStore) Insert(record *IssueComment) error
Insert inserts a IssueComment in the database. A non-persisted object is required for this operation.
func (*IssueCommentStore) MustCount ¶
func (s *IssueCommentStore) MustCount(q *IssueCommentQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*IssueCommentStore) MustFind ¶
func (s *IssueCommentStore) MustFind(q *IssueCommentQuery) *IssueCommentResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*IssueCommentStore) MustFindOne ¶
func (s *IssueCommentStore) MustFindOne(q *IssueCommentQuery) *IssueComment
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*IssueCommentStore) Reload ¶
func (s *IssueCommentStore) Reload(record *IssueComment) error
Reload refreshes the IssueComment with the data in the database and makes it writable.
func (*IssueCommentStore) Save ¶
func (s *IssueCommentStore) Save(record *IssueComment) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*IssueCommentStore) SetGenericStore ¶
func (s *IssueCommentStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*IssueCommentStore) Transaction ¶
func (s *IssueCommentStore) Transaction(callback func(*IssueCommentStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*IssueCommentStore) Update ¶
func (s *IssueCommentStore) Update(record *IssueComment, cols ...kallax.SchemaField) (updated int64, err error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type IssueQuery ¶
type IssueQuery struct {
*kallax.BaseQuery
}
IssueQuery is the object used to create queries for the Issue entity.
func NewIssueQuery ¶
func NewIssueQuery() *IssueQuery
NewIssueQuery returns a new instance of IssueQuery.
func (*IssueQuery) BatchSize ¶
func (q *IssueQuery) BatchSize(size uint64) *IssueQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*IssueQuery) Copy ¶
func (q *IssueQuery) Copy() *IssueQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*IssueQuery) FindByAssigneeID ¶
func (q *IssueQuery) FindByAssigneeID(cond kallax.ScalarCond, v int64) *IssueQuery
FindByAssigneeID adds a new filter to the query that will require that the AssigneeID property is equal to the passed value.
func (*IssueQuery) FindByAssigneeLogin ¶
func (q *IssueQuery) FindByAssigneeLogin(v string) *IssueQuery
FindByAssigneeLogin adds a new filter to the query that will require that the AssigneeLogin property is equal to the passed value.
func (*IssueQuery) FindByClosedAt ¶
func (q *IssueQuery) FindByClosedAt(cond kallax.ScalarCond, v time.Time) *IssueQuery
FindByClosedAt adds a new filter to the query that will require that the ClosedAt property is equal to the passed value.
func (*IssueQuery) FindByClosedByID ¶
func (q *IssueQuery) FindByClosedByID(cond kallax.ScalarCond, v int64) *IssueQuery
FindByClosedByID adds a new filter to the query that will require that the ClosedByID property is equal to the passed value.
func (*IssueQuery) FindByClosedByLogin ¶
func (q *IssueQuery) FindByClosedByLogin(v string) *IssueQuery
FindByClosedByLogin adds a new filter to the query that will require that the ClosedByLogin property is equal to the passed value.
func (*IssueQuery) FindByCreatedAt ¶
func (q *IssueQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *IssueQuery
FindByCreatedAt adds a new filter to the query that will require that the CreatedAt property is equal to the passed value.
func (*IssueQuery) FindByKallaxID ¶
func (q *IssueQuery) FindByKallaxID(v ...int64) *IssueQuery
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*IssueQuery) FindByLabelList ¶
func (q *IssueQuery) FindByLabelList(v ...string) *IssueQuery
FindByLabelList adds a new filter to the query that will require that the LabelList property contains all the passed values; if no passed values, it will do nothing.
func (*IssueQuery) FindByMilestoneID ¶
func (q *IssueQuery) FindByMilestoneID(cond kallax.ScalarCond, v int64) *IssueQuery
FindByMilestoneID adds a new filter to the query that will require that the MilestoneID property is equal to the passed value.
func (*IssueQuery) FindByMilestoneTitle ¶
func (q *IssueQuery) FindByMilestoneTitle(v string) *IssueQuery
FindByMilestoneTitle adds a new filter to the query that will require that the MilestoneTitle property is equal to the passed value.
func (*IssueQuery) FindByRepositoryName ¶
func (q *IssueQuery) FindByRepositoryName(v string) *IssueQuery
FindByRepositoryName adds a new filter to the query that will require that the RepositoryName property is equal to the passed value.
func (*IssueQuery) FindByRepositoryOwner ¶
func (q *IssueQuery) FindByRepositoryOwner(v string) *IssueQuery
FindByRepositoryOwner adds a new filter to the query that will require that the RepositoryOwner property is equal to the passed value.
func (*IssueQuery) FindByUpdatedAt ¶
func (q *IssueQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *IssueQuery
FindByUpdatedAt adds a new filter to the query that will require that the UpdatedAt property is equal to the passed value.
func (*IssueQuery) FindByUserID ¶
func (q *IssueQuery) FindByUserID(cond kallax.ScalarCond, v int64) *IssueQuery
FindByUserID adds a new filter to the query that will require that the UserID property is equal to the passed value.
func (*IssueQuery) FindByUserLogin ¶
func (q *IssueQuery) FindByUserLogin(v string) *IssueQuery
FindByUserLogin adds a new filter to the query that will require that the UserLogin property is equal to the passed value.
func (*IssueQuery) Limit ¶
func (q *IssueQuery) Limit(n uint64) *IssueQuery
Limit sets the max number of items to retrieve.
func (*IssueQuery) Offset ¶
func (q *IssueQuery) Offset(n uint64) *IssueQuery
Offset sets the number of items to skip from the result set of items.
func (*IssueQuery) Order ¶
func (q *IssueQuery) Order(cols ...kallax.ColumnOrder) *IssueQuery
Order adds order clauses to the query for the given columns.
func (*IssueQuery) Select ¶
func (q *IssueQuery) Select(columns ...kallax.SchemaField) *IssueQuery
Select adds columns to select in the query.
func (*IssueQuery) SelectNot ¶
func (q *IssueQuery) SelectNot(columns ...kallax.SchemaField) *IssueQuery
SelectNot excludes columns from being selected in the query.
func (*IssueQuery) Where ¶
func (q *IssueQuery) Where(cond kallax.Condition) *IssueQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type IssueResultSet ¶
type IssueResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
IssueResultSet is the set of results returned by a query to the database.
func NewIssueResultSet ¶
func NewIssueResultSet(rs kallax.ResultSet) *IssueResultSet
NewIssueResultSet creates a new result set for rows of the type Issue.
func (*IssueResultSet) All ¶
func (rs *IssueResultSet) All() ([]*Issue, error)
All returns all records on the result set and closes the result set.
func (*IssueResultSet) Err ¶
func (rs *IssueResultSet) Err() error
Err returns the last error occurred.
func (*IssueResultSet) ForEach ¶
func (rs *IssueResultSet) ForEach(fn func(*Issue) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*IssueResultSet) Get ¶
func (rs *IssueResultSet) Get() (*Issue, error)
Get retrieves the last fetched item from the result set and the last error.
func (*IssueResultSet) Next ¶
func (rs *IssueResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*IssueResultSet) One ¶
func (rs *IssueResultSet) One() (*Issue, error)
One returns the first record on the result set and closes the result set.
type IssueStore ¶
type IssueStore struct {
*kallax.Store
}
IssueStore is the entity to access the records of the type Issue in the database.
func NewIssueStore ¶
func NewIssueStore(db *sql.DB) *IssueStore
NewIssueStore creates a new instance of IssueStore using a SQL database.
func (*IssueStore) Count ¶
func (s *IssueStore) Count(q *IssueQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*IssueStore) Debug ¶
func (s *IssueStore) Debug() *IssueStore
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*IssueStore) DebugWith ¶
func (s *IssueStore) DebugWith(logger kallax.LoggerFunc) *IssueStore
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*IssueStore) Delete ¶
func (s *IssueStore) Delete(record *Issue) error
Delete removes the given record from the database.
func (*IssueStore) DisableCacher ¶
func (s *IssueStore) DisableCacher() *IssueStore
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*IssueStore) Find ¶
func (s *IssueStore) Find(q *IssueQuery) (*IssueResultSet, error)
Find returns the set of results for the given query.
func (*IssueStore) FindAll ¶
func (s *IssueStore) FindAll(q *IssueQuery) ([]*Issue, error)
FindAll returns a list of all the rows returned by the given query.
func (*IssueStore) FindOne ¶
func (s *IssueStore) FindOne(q *IssueQuery) (*Issue, error)
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*IssueStore) GenericStore ¶
func (s *IssueStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*IssueStore) Insert ¶
func (s *IssueStore) Insert(record *Issue) error
Insert inserts a Issue in the database. A non-persisted object is required for this operation.
func (*IssueStore) MustCount ¶
func (s *IssueStore) MustCount(q *IssueQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*IssueStore) MustFind ¶
func (s *IssueStore) MustFind(q *IssueQuery) *IssueResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*IssueStore) MustFindOne ¶
func (s *IssueStore) MustFindOne(q *IssueQuery) *Issue
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*IssueStore) Reload ¶
func (s *IssueStore) Reload(record *Issue) error
Reload refreshes the Issue with the data in the database and makes it writable.
func (*IssueStore) Save ¶
func (s *IssueStore) Save(record *Issue) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*IssueStore) SetGenericStore ¶
func (s *IssueStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*IssueStore) Transaction ¶
func (s *IssueStore) Transaction(callback func(*IssueStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*IssueStore) Update ¶
func (s *IssueStore) Update(record *Issue, cols ...kallax.SchemaField) (updated int64, err error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type Organization ¶
type Organization struct { kallax.Model `` /* 185-byte string literal not displayed */ github.Organization // int64 replacement for Organization.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` }
func NewOrganization ¶
func NewOrganization() (record *Organization)
NewOrganization returns a new instance of Organization.
func (*Organization) BeforeSave ¶
func (o *Organization) BeforeSave() error
func (*Organization) ColumnAddress ¶
func (r *Organization) ColumnAddress(col string) (interface{}, error)
ColumnAddress returns the pointer to the value of the given column.
func (*Organization) GetID ¶
func (r *Organization) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*Organization) NewRelationshipRecord ¶
func (r *Organization) NewRelationshipRecord(field string) (kallax.Record, error)
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*Organization) SetRelationship ¶
func (r *Organization) SetRelationship(field string, rel interface{}) error
SetRelationship sets the given relationship in the given field.
func (*Organization) Value ¶
func (r *Organization) Value(col string) (interface{}, error)
Value returns the value of the given column.
type OrganizationQuery ¶
type OrganizationQuery struct {
*kallax.BaseQuery
}
OrganizationQuery is the object used to create queries for the Organization entity.
func NewOrganizationQuery ¶
func NewOrganizationQuery() *OrganizationQuery
NewOrganizationQuery returns a new instance of OrganizationQuery.
func (*OrganizationQuery) BatchSize ¶
func (q *OrganizationQuery) BatchSize(size uint64) *OrganizationQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*OrganizationQuery) Copy ¶
func (q *OrganizationQuery) Copy() *OrganizationQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*OrganizationQuery) FindByCreatedAt ¶
func (q *OrganizationQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *OrganizationQuery
FindByCreatedAt adds a new filter to the query that will require that the CreatedAt property is equal to the passed value.
func (*OrganizationQuery) FindByKallaxID ¶
func (q *OrganizationQuery) FindByKallaxID(v ...int64) *OrganizationQuery
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*OrganizationQuery) FindByUpdatedAt ¶
func (q *OrganizationQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *OrganizationQuery
FindByUpdatedAt adds a new filter to the query that will require that the UpdatedAt property is equal to the passed value.
func (*OrganizationQuery) Limit ¶
func (q *OrganizationQuery) Limit(n uint64) *OrganizationQuery
Limit sets the max number of items to retrieve.
func (*OrganizationQuery) Offset ¶
func (q *OrganizationQuery) Offset(n uint64) *OrganizationQuery
Offset sets the number of items to skip from the result set of items.
func (*OrganizationQuery) Order ¶
func (q *OrganizationQuery) Order(cols ...kallax.ColumnOrder) *OrganizationQuery
Order adds order clauses to the query for the given columns.
func (*OrganizationQuery) Select ¶
func (q *OrganizationQuery) Select(columns ...kallax.SchemaField) *OrganizationQuery
Select adds columns to select in the query.
func (*OrganizationQuery) SelectNot ¶
func (q *OrganizationQuery) SelectNot(columns ...kallax.SchemaField) *OrganizationQuery
SelectNot excludes columns from being selected in the query.
func (*OrganizationQuery) Where ¶
func (q *OrganizationQuery) Where(cond kallax.Condition) *OrganizationQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type OrganizationResultSet ¶
type OrganizationResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
OrganizationResultSet is the set of results returned by a query to the database.
func NewOrganizationResultSet ¶
func NewOrganizationResultSet(rs kallax.ResultSet) *OrganizationResultSet
NewOrganizationResultSet creates a new result set for rows of the type Organization.
func (*OrganizationResultSet) All ¶
func (rs *OrganizationResultSet) All() ([]*Organization, error)
All returns all records on the result set and closes the result set.
func (*OrganizationResultSet) Close ¶
func (rs *OrganizationResultSet) Close() error
Close closes the result set.
func (*OrganizationResultSet) Err ¶
func (rs *OrganizationResultSet) Err() error
Err returns the last error occurred.
func (*OrganizationResultSet) ForEach ¶
func (rs *OrganizationResultSet) ForEach(fn func(*Organization) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*OrganizationResultSet) Get ¶
func (rs *OrganizationResultSet) Get() (*Organization, error)
Get retrieves the last fetched item from the result set and the last error.
func (*OrganizationResultSet) Next ¶
func (rs *OrganizationResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*OrganizationResultSet) One ¶
func (rs *OrganizationResultSet) One() (*Organization, error)
One returns the first record on the result set and closes the result set.
type OrganizationStore ¶
type OrganizationStore struct {
*kallax.Store
}
OrganizationStore is the entity to access the records of the type Organization in the database.
func NewOrganizationStore ¶
func NewOrganizationStore(db *sql.DB) *OrganizationStore
NewOrganizationStore creates a new instance of OrganizationStore using a SQL database.
func (*OrganizationStore) Count ¶
func (s *OrganizationStore) Count(q *OrganizationQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*OrganizationStore) Debug ¶
func (s *OrganizationStore) Debug() *OrganizationStore
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*OrganizationStore) DebugWith ¶
func (s *OrganizationStore) DebugWith(logger kallax.LoggerFunc) *OrganizationStore
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*OrganizationStore) Delete ¶
func (s *OrganizationStore) Delete(record *Organization) error
Delete removes the given record from the database.
func (*OrganizationStore) DisableCacher ¶
func (s *OrganizationStore) DisableCacher() *OrganizationStore
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*OrganizationStore) Find ¶
func (s *OrganizationStore) Find(q *OrganizationQuery) (*OrganizationResultSet, error)
Find returns the set of results for the given query.
func (*OrganizationStore) FindAll ¶
func (s *OrganizationStore) FindAll(q *OrganizationQuery) ([]*Organization, error)
FindAll returns a list of all the rows returned by the given query.
func (*OrganizationStore) FindOne ¶
func (s *OrganizationStore) FindOne(q *OrganizationQuery) (*Organization, error)
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*OrganizationStore) GenericStore ¶
func (s *OrganizationStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*OrganizationStore) Insert ¶
func (s *OrganizationStore) Insert(record *Organization) error
Insert inserts a Organization in the database. A non-persisted object is required for this operation.
func (*OrganizationStore) MustCount ¶
func (s *OrganizationStore) MustCount(q *OrganizationQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*OrganizationStore) MustFind ¶
func (s *OrganizationStore) MustFind(q *OrganizationQuery) *OrganizationResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*OrganizationStore) MustFindOne ¶
func (s *OrganizationStore) MustFindOne(q *OrganizationQuery) *Organization
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*OrganizationStore) Reload ¶
func (s *OrganizationStore) Reload(record *Organization) error
Reload refreshes the Organization with the data in the database and makes it writable.
func (*OrganizationStore) Save ¶
func (s *OrganizationStore) Save(record *Organization) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*OrganizationStore) SetGenericStore ¶
func (s *OrganizationStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*OrganizationStore) Transaction ¶
func (s *OrganizationStore) Transaction(callback func(*OrganizationStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*OrganizationStore) Update ¶
func (s *OrganizationStore) Update(record *Organization, cols ...kallax.SchemaField) (updated int64, err error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type PullRequest ¶
type PullRequest struct { kallax.Model `` /* 275-byte string literal not displayed */ github.PullRequest // int64 replacement for PullRequest.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` RepositoryOwner string `kallax:"repository_owner"` RepositoryName string `kallax:"repository_name"` LabelList []string `kallax:"labels"` UserID int64 `kallax:"user_id"` UserLogin string `kallax:"user_login"` MergedByID int64 `kallax:"merged_by_id"` MergedByLogin string `kallax:"merged_by_login"` AssigneeID int64 `kallax:"assignee_id"` AssigneeLogin string `kallax:"assignee_login"` AssigneesList []*UserReference `kallax:"assignees"` RequestedReviewersList []*UserReference `kallax:"requested_reviewers"` MilestoneID int64 `kallax:"milestone_id"` MilestoneTitle string `kallax:"milestone_title"` HeadSHA string `kallax:"head_sha"` HeadRef string `kallax:"head_ref"` HeadLabel string `kallax:"head_label"` HeadUser string `kallax:"head_user"` HeadRepositoryOwner string `kallax:"head_repository_owner"` HeadRepositoryName string `kallax:"head_repository_name"` BaseSHA string `kallax:"base_sha"` BaseRef string `kallax:"base_ref"` BaseLabel string `kallax:"base_label"` BaseUser string `kallax:"base_user"` BaseRepositoryOwner string `kallax:"base_repository_owner"` BaseRepositoryName string `kallax:"base_repository_name"` }
func NewPullRequest ¶
func NewPullRequest() (record *PullRequest)
NewPullRequest returns a new instance of PullRequest.
func (*PullRequest) BeforeSave ¶
func (i *PullRequest) BeforeSave() error
func (*PullRequest) ColumnAddress ¶
func (r *PullRequest) ColumnAddress(col string) (interface{}, error)
ColumnAddress returns the pointer to the value of the given column.
func (*PullRequest) GetID ¶
func (r *PullRequest) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*PullRequest) NewRelationshipRecord ¶
func (r *PullRequest) NewRelationshipRecord(field string) (kallax.Record, error)
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*PullRequest) SetRelationship ¶
func (r *PullRequest) SetRelationship(field string, rel interface{}) error
SetRelationship sets the given relationship in the given field.
func (*PullRequest) Value ¶
func (r *PullRequest) Value(col string) (interface{}, error)
Value returns the value of the given column.
type PullRequestComment ¶
type PullRequestComment struct { kallax.Model `table:"pull_request_comments" pk:"kallax_id" ignored:"User,URL,PullRequestURL"` github.PullRequestComment // int64 replacement for PullRequestComment.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` UserID int64 `kallax:"user_id"` UserLogin string `kallax:"user_login"` PullRequestNumber int `kallax:"pull_request_number"` RepositoryOwner string `kallax:"repository_owner"` RepositoryName string `kallax:"repository_name"` }
func NewPullRequestComment ¶
func NewPullRequestComment() (record *PullRequestComment)
NewPullRequestComment returns a new instance of PullRequestComment.
func (*PullRequestComment) BeforeSave ¶
func (i *PullRequestComment) BeforeSave() error
func (*PullRequestComment) ColumnAddress ¶
func (r *PullRequestComment) ColumnAddress(col string) (interface{}, error)
ColumnAddress returns the pointer to the value of the given column.
func (*PullRequestComment) GetID ¶
func (r *PullRequestComment) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*PullRequestComment) NewRelationshipRecord ¶
func (r *PullRequestComment) NewRelationshipRecord(field string) (kallax.Record, error)
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*PullRequestComment) SetRelationship ¶
func (r *PullRequestComment) SetRelationship(field string, rel interface{}) error
SetRelationship sets the given relationship in the given field.
func (*PullRequestComment) Value ¶
func (r *PullRequestComment) Value(col string) (interface{}, error)
Value returns the value of the given column.
type PullRequestCommentQuery ¶
type PullRequestCommentQuery struct {
*kallax.BaseQuery
}
PullRequestCommentQuery is the object used to create queries for the PullRequestComment entity.
func NewPullRequestCommentQuery ¶
func NewPullRequestCommentQuery() *PullRequestCommentQuery
NewPullRequestCommentQuery returns a new instance of PullRequestCommentQuery.
func (*PullRequestCommentQuery) BatchSize ¶
func (q *PullRequestCommentQuery) BatchSize(size uint64) *PullRequestCommentQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*PullRequestCommentQuery) Copy ¶
func (q *PullRequestCommentQuery) Copy() *PullRequestCommentQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*PullRequestCommentQuery) FindByCreatedAt ¶
func (q *PullRequestCommentQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestCommentQuery
FindByCreatedAt adds a new filter to the query that will require that the CreatedAt property is equal to the passed value.
func (*PullRequestCommentQuery) FindByKallaxID ¶
func (q *PullRequestCommentQuery) FindByKallaxID(v ...int64) *PullRequestCommentQuery
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*PullRequestCommentQuery) FindByPullRequestNumber ¶
func (q *PullRequestCommentQuery) FindByPullRequestNumber(cond kallax.ScalarCond, v int) *PullRequestCommentQuery
FindByPullRequestNumber adds a new filter to the query that will require that the PullRequestNumber property is equal to the passed value.
func (*PullRequestCommentQuery) FindByRepositoryName ¶
func (q *PullRequestCommentQuery) FindByRepositoryName(v string) *PullRequestCommentQuery
FindByRepositoryName adds a new filter to the query that will require that the RepositoryName property is equal to the passed value.
func (*PullRequestCommentQuery) FindByRepositoryOwner ¶
func (q *PullRequestCommentQuery) FindByRepositoryOwner(v string) *PullRequestCommentQuery
FindByRepositoryOwner adds a new filter to the query that will require that the RepositoryOwner property is equal to the passed value.
func (*PullRequestCommentQuery) FindByUpdatedAt ¶
func (q *PullRequestCommentQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestCommentQuery
FindByUpdatedAt adds a new filter to the query that will require that the UpdatedAt property is equal to the passed value.
func (*PullRequestCommentQuery) FindByUserID ¶
func (q *PullRequestCommentQuery) FindByUserID(cond kallax.ScalarCond, v int64) *PullRequestCommentQuery
FindByUserID adds a new filter to the query that will require that the UserID property is equal to the passed value.
func (*PullRequestCommentQuery) FindByUserLogin ¶
func (q *PullRequestCommentQuery) FindByUserLogin(v string) *PullRequestCommentQuery
FindByUserLogin adds a new filter to the query that will require that the UserLogin property is equal to the passed value.
func (*PullRequestCommentQuery) Limit ¶
func (q *PullRequestCommentQuery) Limit(n uint64) *PullRequestCommentQuery
Limit sets the max number of items to retrieve.
func (*PullRequestCommentQuery) Offset ¶
func (q *PullRequestCommentQuery) Offset(n uint64) *PullRequestCommentQuery
Offset sets the number of items to skip from the result set of items.
func (*PullRequestCommentQuery) Order ¶
func (q *PullRequestCommentQuery) Order(cols ...kallax.ColumnOrder) *PullRequestCommentQuery
Order adds order clauses to the query for the given columns.
func (*PullRequestCommentQuery) Select ¶
func (q *PullRequestCommentQuery) Select(columns ...kallax.SchemaField) *PullRequestCommentQuery
Select adds columns to select in the query.
func (*PullRequestCommentQuery) SelectNot ¶
func (q *PullRequestCommentQuery) SelectNot(columns ...kallax.SchemaField) *PullRequestCommentQuery
SelectNot excludes columns from being selected in the query.
func (*PullRequestCommentQuery) Where ¶
func (q *PullRequestCommentQuery) Where(cond kallax.Condition) *PullRequestCommentQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type PullRequestCommentResultSet ¶
type PullRequestCommentResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
PullRequestCommentResultSet is the set of results returned by a query to the database.
func NewPullRequestCommentResultSet ¶
func NewPullRequestCommentResultSet(rs kallax.ResultSet) *PullRequestCommentResultSet
NewPullRequestCommentResultSet creates a new result set for rows of the type PullRequestComment.
func (*PullRequestCommentResultSet) All ¶
func (rs *PullRequestCommentResultSet) All() ([]*PullRequestComment, error)
All returns all records on the result set and closes the result set.
func (*PullRequestCommentResultSet) Close ¶
func (rs *PullRequestCommentResultSet) Close() error
Close closes the result set.
func (*PullRequestCommentResultSet) Err ¶
func (rs *PullRequestCommentResultSet) Err() error
Err returns the last error occurred.
func (*PullRequestCommentResultSet) ForEach ¶
func (rs *PullRequestCommentResultSet) ForEach(fn func(*PullRequestComment) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*PullRequestCommentResultSet) Get ¶
func (rs *PullRequestCommentResultSet) Get() (*PullRequestComment, error)
Get retrieves the last fetched item from the result set and the last error.
func (*PullRequestCommentResultSet) Next ¶
func (rs *PullRequestCommentResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*PullRequestCommentResultSet) One ¶
func (rs *PullRequestCommentResultSet) One() (*PullRequestComment, error)
One returns the first record on the result set and closes the result set.
type PullRequestCommentStore ¶
type PullRequestCommentStore struct {
*kallax.Store
}
PullRequestCommentStore is the entity to access the records of the type PullRequestComment in the database.
func NewPullRequestCommentStore ¶
func NewPullRequestCommentStore(db *sql.DB) *PullRequestCommentStore
NewPullRequestCommentStore creates a new instance of PullRequestCommentStore using a SQL database.
func (*PullRequestCommentStore) Count ¶
func (s *PullRequestCommentStore) Count(q *PullRequestCommentQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*PullRequestCommentStore) Debug ¶
func (s *PullRequestCommentStore) Debug() *PullRequestCommentStore
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*PullRequestCommentStore) DebugWith ¶
func (s *PullRequestCommentStore) DebugWith(logger kallax.LoggerFunc) *PullRequestCommentStore
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*PullRequestCommentStore) Delete ¶
func (s *PullRequestCommentStore) Delete(record *PullRequestComment) error
Delete removes the given record from the database.
func (*PullRequestCommentStore) DisableCacher ¶
func (s *PullRequestCommentStore) DisableCacher() *PullRequestCommentStore
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*PullRequestCommentStore) Find ¶
func (s *PullRequestCommentStore) Find(q *PullRequestCommentQuery) (*PullRequestCommentResultSet, error)
Find returns the set of results for the given query.
func (*PullRequestCommentStore) FindAll ¶
func (s *PullRequestCommentStore) FindAll(q *PullRequestCommentQuery) ([]*PullRequestComment, error)
FindAll returns a list of all the rows returned by the given query.
func (*PullRequestCommentStore) FindOne ¶
func (s *PullRequestCommentStore) FindOne(q *PullRequestCommentQuery) (*PullRequestComment, error)
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*PullRequestCommentStore) GenericStore ¶
func (s *PullRequestCommentStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*PullRequestCommentStore) Insert ¶
func (s *PullRequestCommentStore) Insert(record *PullRequestComment) error
Insert inserts a PullRequestComment in the database. A non-persisted object is required for this operation.
func (*PullRequestCommentStore) MustCount ¶
func (s *PullRequestCommentStore) MustCount(q *PullRequestCommentQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*PullRequestCommentStore) MustFind ¶
func (s *PullRequestCommentStore) MustFind(q *PullRequestCommentQuery) *PullRequestCommentResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*PullRequestCommentStore) MustFindOne ¶
func (s *PullRequestCommentStore) MustFindOne(q *PullRequestCommentQuery) *PullRequestComment
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*PullRequestCommentStore) Reload ¶
func (s *PullRequestCommentStore) Reload(record *PullRequestComment) error
Reload refreshes the PullRequestComment with the data in the database and makes it writable.
func (*PullRequestCommentStore) Save ¶
func (s *PullRequestCommentStore) Save(record *PullRequestComment) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*PullRequestCommentStore) SetGenericStore ¶
func (s *PullRequestCommentStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*PullRequestCommentStore) Transaction ¶
func (s *PullRequestCommentStore) Transaction(callback func(*PullRequestCommentStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*PullRequestCommentStore) Update ¶
func (s *PullRequestCommentStore) Update(record *PullRequestComment, cols ...kallax.SchemaField) (updated int64, err error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type PullRequestQuery ¶
type PullRequestQuery struct {
*kallax.BaseQuery
}
PullRequestQuery is the object used to create queries for the PullRequest entity.
func NewPullRequestQuery ¶
func NewPullRequestQuery() *PullRequestQuery
NewPullRequestQuery returns a new instance of PullRequestQuery.
func (*PullRequestQuery) BatchSize ¶
func (q *PullRequestQuery) BatchSize(size uint64) *PullRequestQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*PullRequestQuery) Copy ¶
func (q *PullRequestQuery) Copy() *PullRequestQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*PullRequestQuery) FindByAssigneeID ¶
func (q *PullRequestQuery) FindByAssigneeID(cond kallax.ScalarCond, v int64) *PullRequestQuery
FindByAssigneeID adds a new filter to the query that will require that the AssigneeID property is equal to the passed value.
func (*PullRequestQuery) FindByAssigneeLogin ¶
func (q *PullRequestQuery) FindByAssigneeLogin(v string) *PullRequestQuery
FindByAssigneeLogin adds a new filter to the query that will require that the AssigneeLogin property is equal to the passed value.
func (*PullRequestQuery) FindByBaseLabel ¶
func (q *PullRequestQuery) FindByBaseLabel(v string) *PullRequestQuery
FindByBaseLabel adds a new filter to the query that will require that the BaseLabel property is equal to the passed value.
func (*PullRequestQuery) FindByBaseRef ¶
func (q *PullRequestQuery) FindByBaseRef(v string) *PullRequestQuery
FindByBaseRef adds a new filter to the query that will require that the BaseRef property is equal to the passed value.
func (*PullRequestQuery) FindByBaseRepositoryName ¶
func (q *PullRequestQuery) FindByBaseRepositoryName(v string) *PullRequestQuery
FindByBaseRepositoryName adds a new filter to the query that will require that the BaseRepositoryName property is equal to the passed value.
func (*PullRequestQuery) FindByBaseRepositoryOwner ¶
func (q *PullRequestQuery) FindByBaseRepositoryOwner(v string) *PullRequestQuery
FindByBaseRepositoryOwner adds a new filter to the query that will require that the BaseRepositoryOwner property is equal to the passed value.
func (*PullRequestQuery) FindByBaseSHA ¶
func (q *PullRequestQuery) FindByBaseSHA(v string) *PullRequestQuery
FindByBaseSHA adds a new filter to the query that will require that the BaseSHA property is equal to the passed value.
func (*PullRequestQuery) FindByBaseUser ¶
func (q *PullRequestQuery) FindByBaseUser(v string) *PullRequestQuery
FindByBaseUser adds a new filter to the query that will require that the BaseUser property is equal to the passed value.
func (*PullRequestQuery) FindByClosedAt ¶
func (q *PullRequestQuery) FindByClosedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
FindByClosedAt adds a new filter to the query that will require that the ClosedAt property is equal to the passed value.
func (*PullRequestQuery) FindByCreatedAt ¶
func (q *PullRequestQuery) FindByCreatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
FindByCreatedAt adds a new filter to the query that will require that the CreatedAt property is equal to the passed value.
func (*PullRequestQuery) FindByHeadLabel ¶
func (q *PullRequestQuery) FindByHeadLabel(v string) *PullRequestQuery
FindByHeadLabel adds a new filter to the query that will require that the HeadLabel property is equal to the passed value.
func (*PullRequestQuery) FindByHeadRef ¶
func (q *PullRequestQuery) FindByHeadRef(v string) *PullRequestQuery
FindByHeadRef adds a new filter to the query that will require that the HeadRef property is equal to the passed value.
func (*PullRequestQuery) FindByHeadRepositoryName ¶
func (q *PullRequestQuery) FindByHeadRepositoryName(v string) *PullRequestQuery
FindByHeadRepositoryName adds a new filter to the query that will require that the HeadRepositoryName property is equal to the passed value.
func (*PullRequestQuery) FindByHeadRepositoryOwner ¶
func (q *PullRequestQuery) FindByHeadRepositoryOwner(v string) *PullRequestQuery
FindByHeadRepositoryOwner adds a new filter to the query that will require that the HeadRepositoryOwner property is equal to the passed value.
func (*PullRequestQuery) FindByHeadSHA ¶
func (q *PullRequestQuery) FindByHeadSHA(v string) *PullRequestQuery
FindByHeadSHA adds a new filter to the query that will require that the HeadSHA property is equal to the passed value.
func (*PullRequestQuery) FindByHeadUser ¶
func (q *PullRequestQuery) FindByHeadUser(v string) *PullRequestQuery
FindByHeadUser adds a new filter to the query that will require that the HeadUser property is equal to the passed value.
func (*PullRequestQuery) FindByKallaxID ¶
func (q *PullRequestQuery) FindByKallaxID(v ...int64) *PullRequestQuery
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*PullRequestQuery) FindByLabelList ¶
func (q *PullRequestQuery) FindByLabelList(v ...string) *PullRequestQuery
FindByLabelList adds a new filter to the query that will require that the LabelList property contains all the passed values; if no passed values, it will do nothing.
func (*PullRequestQuery) FindByMergedAt ¶
func (q *PullRequestQuery) FindByMergedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
FindByMergedAt adds a new filter to the query that will require that the MergedAt property is equal to the passed value.
func (*PullRequestQuery) FindByMergedByID ¶
func (q *PullRequestQuery) FindByMergedByID(cond kallax.ScalarCond, v int64) *PullRequestQuery
FindByMergedByID adds a new filter to the query that will require that the MergedByID property is equal to the passed value.
func (*PullRequestQuery) FindByMergedByLogin ¶
func (q *PullRequestQuery) FindByMergedByLogin(v string) *PullRequestQuery
FindByMergedByLogin adds a new filter to the query that will require that the MergedByLogin property is equal to the passed value.
func (*PullRequestQuery) FindByMilestoneID ¶
func (q *PullRequestQuery) FindByMilestoneID(cond kallax.ScalarCond, v int64) *PullRequestQuery
FindByMilestoneID adds a new filter to the query that will require that the MilestoneID property is equal to the passed value.
func (*PullRequestQuery) FindByMilestoneTitle ¶
func (q *PullRequestQuery) FindByMilestoneTitle(v string) *PullRequestQuery
FindByMilestoneTitle adds a new filter to the query that will require that the MilestoneTitle property is equal to the passed value.
func (*PullRequestQuery) FindByRepositoryName ¶
func (q *PullRequestQuery) FindByRepositoryName(v string) *PullRequestQuery
FindByRepositoryName adds a new filter to the query that will require that the RepositoryName property is equal to the passed value.
func (*PullRequestQuery) FindByRepositoryOwner ¶
func (q *PullRequestQuery) FindByRepositoryOwner(v string) *PullRequestQuery
FindByRepositoryOwner adds a new filter to the query that will require that the RepositoryOwner property is equal to the passed value.
func (*PullRequestQuery) FindByUpdatedAt ¶
func (q *PullRequestQuery) FindByUpdatedAt(cond kallax.ScalarCond, v time.Time) *PullRequestQuery
FindByUpdatedAt adds a new filter to the query that will require that the UpdatedAt property is equal to the passed value.
func (*PullRequestQuery) FindByUserID ¶
func (q *PullRequestQuery) FindByUserID(cond kallax.ScalarCond, v int64) *PullRequestQuery
FindByUserID adds a new filter to the query that will require that the UserID property is equal to the passed value.
func (*PullRequestQuery) FindByUserLogin ¶
func (q *PullRequestQuery) FindByUserLogin(v string) *PullRequestQuery
FindByUserLogin adds a new filter to the query that will require that the UserLogin property is equal to the passed value.
func (*PullRequestQuery) Limit ¶
func (q *PullRequestQuery) Limit(n uint64) *PullRequestQuery
Limit sets the max number of items to retrieve.
func (*PullRequestQuery) Offset ¶
func (q *PullRequestQuery) Offset(n uint64) *PullRequestQuery
Offset sets the number of items to skip from the result set of items.
func (*PullRequestQuery) Order ¶
func (q *PullRequestQuery) Order(cols ...kallax.ColumnOrder) *PullRequestQuery
Order adds order clauses to the query for the given columns.
func (*PullRequestQuery) Select ¶
func (q *PullRequestQuery) Select(columns ...kallax.SchemaField) *PullRequestQuery
Select adds columns to select in the query.
func (*PullRequestQuery) SelectNot ¶
func (q *PullRequestQuery) SelectNot(columns ...kallax.SchemaField) *PullRequestQuery
SelectNot excludes columns from being selected in the query.
func (*PullRequestQuery) Where ¶
func (q *PullRequestQuery) Where(cond kallax.Condition) *PullRequestQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type PullRequestResultSet ¶
type PullRequestResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
PullRequestResultSet is the set of results returned by a query to the database.
func NewPullRequestResultSet ¶
func NewPullRequestResultSet(rs kallax.ResultSet) *PullRequestResultSet
NewPullRequestResultSet creates a new result set for rows of the type PullRequest.
func (*PullRequestResultSet) All ¶
func (rs *PullRequestResultSet) All() ([]*PullRequest, error)
All returns all records on the result set and closes the result set.
func (*PullRequestResultSet) Close ¶
func (rs *PullRequestResultSet) Close() error
Close closes the result set.
func (*PullRequestResultSet) Err ¶
func (rs *PullRequestResultSet) Err() error
Err returns the last error occurred.
func (*PullRequestResultSet) ForEach ¶
func (rs *PullRequestResultSet) ForEach(fn func(*PullRequest) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*PullRequestResultSet) Get ¶
func (rs *PullRequestResultSet) Get() (*PullRequest, error)
Get retrieves the last fetched item from the result set and the last error.
func (*PullRequestResultSet) Next ¶
func (rs *PullRequestResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*PullRequestResultSet) One ¶
func (rs *PullRequestResultSet) One() (*PullRequest, error)
One returns the first record on the result set and closes the result set.
type PullRequestReview ¶
type PullRequestReview struct { kallax.Model `table:"pull_request_reviews" pk:"kallax_id" ignored:"User,PullRequestURL"` github.PullRequestReview // int64 replacement for PullRequestReview.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` UserID int64 `kallax:"user_id"` UserLogin string `kallax:"user_login"` PullRequestNumber int `kallax:"pull_request_number"` RepositoryOwner string `kallax:"repository_owner"` RepositoryName string `kallax:"repository_name"` }
func NewPullRequestReview ¶
func NewPullRequestReview() (record *PullRequestReview)
NewPullRequestReview returns a new instance of PullRequestReview.
func (*PullRequestReview) BeforeSave ¶
func (i *PullRequestReview) BeforeSave() error
func (*PullRequestReview) ColumnAddress ¶
func (r *PullRequestReview) ColumnAddress(col string) (interface{}, error)
ColumnAddress returns the pointer to the value of the given column.
func (*PullRequestReview) GetID ¶
func (r *PullRequestReview) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*PullRequestReview) NewRelationshipRecord ¶
func (r *PullRequestReview) NewRelationshipRecord(field string) (kallax.Record, error)
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*PullRequestReview) SetRelationship ¶
func (r *PullRequestReview) SetRelationship(field string, rel interface{}) error
SetRelationship sets the given relationship in the given field.
func (*PullRequestReview) Value ¶
func (r *PullRequestReview) Value(col string) (interface{}, error)
Value returns the value of the given column.
type PullRequestReviewQuery ¶
type PullRequestReviewQuery struct {
*kallax.BaseQuery
}
PullRequestReviewQuery is the object used to create queries for the PullRequestReview entity.
func NewPullRequestReviewQuery ¶
func NewPullRequestReviewQuery() *PullRequestReviewQuery
NewPullRequestReviewQuery returns a new instance of PullRequestReviewQuery.
func (*PullRequestReviewQuery) BatchSize ¶
func (q *PullRequestReviewQuery) BatchSize(size uint64) *PullRequestReviewQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*PullRequestReviewQuery) Copy ¶
func (q *PullRequestReviewQuery) Copy() *PullRequestReviewQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*PullRequestReviewQuery) FindByKallaxID ¶
func (q *PullRequestReviewQuery) FindByKallaxID(v ...int64) *PullRequestReviewQuery
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*PullRequestReviewQuery) FindByPullRequestNumber ¶
func (q *PullRequestReviewQuery) FindByPullRequestNumber(cond kallax.ScalarCond, v int) *PullRequestReviewQuery
FindByPullRequestNumber adds a new filter to the query that will require that the PullRequestNumber property is equal to the passed value.
func (*PullRequestReviewQuery) FindByRepositoryName ¶
func (q *PullRequestReviewQuery) FindByRepositoryName(v string) *PullRequestReviewQuery
FindByRepositoryName adds a new filter to the query that will require that the RepositoryName property is equal to the passed value.
func (*PullRequestReviewQuery) FindByRepositoryOwner ¶
func (q *PullRequestReviewQuery) FindByRepositoryOwner(v string) *PullRequestReviewQuery
FindByRepositoryOwner adds a new filter to the query that will require that the RepositoryOwner property is equal to the passed value.
func (*PullRequestReviewQuery) FindBySubmittedAt ¶
func (q *PullRequestReviewQuery) FindBySubmittedAt(cond kallax.ScalarCond, v time.Time) *PullRequestReviewQuery
FindBySubmittedAt adds a new filter to the query that will require that the SubmittedAt property is equal to the passed value.
func (*PullRequestReviewQuery) FindByUserID ¶
func (q *PullRequestReviewQuery) FindByUserID(cond kallax.ScalarCond, v int64) *PullRequestReviewQuery
FindByUserID adds a new filter to the query that will require that the UserID property is equal to the passed value.
func (*PullRequestReviewQuery) FindByUserLogin ¶
func (q *PullRequestReviewQuery) FindByUserLogin(v string) *PullRequestReviewQuery
FindByUserLogin adds a new filter to the query that will require that the UserLogin property is equal to the passed value.
func (*PullRequestReviewQuery) Limit ¶
func (q *PullRequestReviewQuery) Limit(n uint64) *PullRequestReviewQuery
Limit sets the max number of items to retrieve.
func (*PullRequestReviewQuery) Offset ¶
func (q *PullRequestReviewQuery) Offset(n uint64) *PullRequestReviewQuery
Offset sets the number of items to skip from the result set of items.
func (*PullRequestReviewQuery) Order ¶
func (q *PullRequestReviewQuery) Order(cols ...kallax.ColumnOrder) *PullRequestReviewQuery
Order adds order clauses to the query for the given columns.
func (*PullRequestReviewQuery) Select ¶
func (q *PullRequestReviewQuery) Select(columns ...kallax.SchemaField) *PullRequestReviewQuery
Select adds columns to select in the query.
func (*PullRequestReviewQuery) SelectNot ¶
func (q *PullRequestReviewQuery) SelectNot(columns ...kallax.SchemaField) *PullRequestReviewQuery
SelectNot excludes columns from being selected in the query.
func (*PullRequestReviewQuery) Where ¶
func (q *PullRequestReviewQuery) Where(cond kallax.Condition) *PullRequestReviewQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type PullRequestReviewResultSet ¶
type PullRequestReviewResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
PullRequestReviewResultSet is the set of results returned by a query to the database.
func NewPullRequestReviewResultSet ¶
func NewPullRequestReviewResultSet(rs kallax.ResultSet) *PullRequestReviewResultSet
NewPullRequestReviewResultSet creates a new result set for rows of the type PullRequestReview.
func (*PullRequestReviewResultSet) All ¶
func (rs *PullRequestReviewResultSet) All() ([]*PullRequestReview, error)
All returns all records on the result set and closes the result set.
func (*PullRequestReviewResultSet) Close ¶
func (rs *PullRequestReviewResultSet) Close() error
Close closes the result set.
func (*PullRequestReviewResultSet) Err ¶
func (rs *PullRequestReviewResultSet) Err() error
Err returns the last error occurred.
func (*PullRequestReviewResultSet) ForEach ¶
func (rs *PullRequestReviewResultSet) ForEach(fn func(*PullRequestReview) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*PullRequestReviewResultSet) Get ¶
func (rs *PullRequestReviewResultSet) Get() (*PullRequestReview, error)
Get retrieves the last fetched item from the result set and the last error.
func (*PullRequestReviewResultSet) Next ¶
func (rs *PullRequestReviewResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*PullRequestReviewResultSet) One ¶
func (rs *PullRequestReviewResultSet) One() (*PullRequestReview, error)
One returns the first record on the result set and closes the result set.
type PullRequestReviewStore ¶
type PullRequestReviewStore struct {
*kallax.Store
}
PullRequestReviewStore is the entity to access the records of the type PullRequestReview in the database.
func NewPullRequestReviewStore ¶
func NewPullRequestReviewStore(db *sql.DB) *PullRequestReviewStore
NewPullRequestReviewStore creates a new instance of PullRequestReviewStore using a SQL database.
func (*PullRequestReviewStore) Count ¶
func (s *PullRequestReviewStore) Count(q *PullRequestReviewQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*PullRequestReviewStore) Debug ¶
func (s *PullRequestReviewStore) Debug() *PullRequestReviewStore
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*PullRequestReviewStore) DebugWith ¶
func (s *PullRequestReviewStore) DebugWith(logger kallax.LoggerFunc) *PullRequestReviewStore
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*PullRequestReviewStore) Delete ¶
func (s *PullRequestReviewStore) Delete(record *PullRequestReview) error
Delete removes the given record from the database.
func (*PullRequestReviewStore) DisableCacher ¶
func (s *PullRequestReviewStore) DisableCacher() *PullRequestReviewStore
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*PullRequestReviewStore) Find ¶
func (s *PullRequestReviewStore) Find(q *PullRequestReviewQuery) (*PullRequestReviewResultSet, error)
Find returns the set of results for the given query.
func (*PullRequestReviewStore) FindAll ¶
func (s *PullRequestReviewStore) FindAll(q *PullRequestReviewQuery) ([]*PullRequestReview, error)
FindAll returns a list of all the rows returned by the given query.
func (*PullRequestReviewStore) FindOne ¶
func (s *PullRequestReviewStore) FindOne(q *PullRequestReviewQuery) (*PullRequestReview, error)
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*PullRequestReviewStore) GenericStore ¶
func (s *PullRequestReviewStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*PullRequestReviewStore) Insert ¶
func (s *PullRequestReviewStore) Insert(record *PullRequestReview) error
Insert inserts a PullRequestReview in the database. A non-persisted object is required for this operation.
func (*PullRequestReviewStore) MustCount ¶
func (s *PullRequestReviewStore) MustCount(q *PullRequestReviewQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*PullRequestReviewStore) MustFind ¶
func (s *PullRequestReviewStore) MustFind(q *PullRequestReviewQuery) *PullRequestReviewResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*PullRequestReviewStore) MustFindOne ¶
func (s *PullRequestReviewStore) MustFindOne(q *PullRequestReviewQuery) *PullRequestReview
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*PullRequestReviewStore) Reload ¶
func (s *PullRequestReviewStore) Reload(record *PullRequestReview) error
Reload refreshes the PullRequestReview with the data in the database and makes it writable.
func (*PullRequestReviewStore) Save ¶
func (s *PullRequestReviewStore) Save(record *PullRequestReview) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*PullRequestReviewStore) SetGenericStore ¶
func (s *PullRequestReviewStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*PullRequestReviewStore) Transaction ¶
func (s *PullRequestReviewStore) Transaction(callback func(*PullRequestReviewStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*PullRequestReviewStore) Update ¶
func (s *PullRequestReviewStore) Update(record *PullRequestReview, cols ...kallax.SchemaField) (updated int64, err error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type PullRequestStore ¶
type PullRequestStore struct {
*kallax.Store
}
PullRequestStore is the entity to access the records of the type PullRequest in the database.
func NewPullRequestStore ¶
func NewPullRequestStore(db *sql.DB) *PullRequestStore
NewPullRequestStore creates a new instance of PullRequestStore using a SQL database.
func (*PullRequestStore) Count ¶
func (s *PullRequestStore) Count(q *PullRequestQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*PullRequestStore) Debug ¶
func (s *PullRequestStore) Debug() *PullRequestStore
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*PullRequestStore) DebugWith ¶
func (s *PullRequestStore) DebugWith(logger kallax.LoggerFunc) *PullRequestStore
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*PullRequestStore) Delete ¶
func (s *PullRequestStore) Delete(record *PullRequest) error
Delete removes the given record from the database.
func (*PullRequestStore) DisableCacher ¶
func (s *PullRequestStore) DisableCacher() *PullRequestStore
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*PullRequestStore) Find ¶
func (s *PullRequestStore) Find(q *PullRequestQuery) (*PullRequestResultSet, error)
Find returns the set of results for the given query.
func (*PullRequestStore) FindAll ¶
func (s *PullRequestStore) FindAll(q *PullRequestQuery) ([]*PullRequest, error)
FindAll returns a list of all the rows returned by the given query.
func (*PullRequestStore) FindOne ¶
func (s *PullRequestStore) FindOne(q *PullRequestQuery) (*PullRequest, error)
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*PullRequestStore) GenericStore ¶
func (s *PullRequestStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*PullRequestStore) Insert ¶
func (s *PullRequestStore) Insert(record *PullRequest) error
Insert inserts a PullRequest in the database. A non-persisted object is required for this operation.
func (*PullRequestStore) MustCount ¶
func (s *PullRequestStore) MustCount(q *PullRequestQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*PullRequestStore) MustFind ¶
func (s *PullRequestStore) MustFind(q *PullRequestQuery) *PullRequestResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*PullRequestStore) MustFindOne ¶
func (s *PullRequestStore) MustFindOne(q *PullRequestQuery) *PullRequest
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*PullRequestStore) Reload ¶
func (s *PullRequestStore) Reload(record *PullRequest) error
Reload refreshes the PullRequest with the data in the database and makes it writable.
func (*PullRequestStore) Save ¶
func (s *PullRequestStore) Save(record *PullRequest) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*PullRequestStore) SetGenericStore ¶
func (s *PullRequestStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*PullRequestStore) Transaction ¶
func (s *PullRequestStore) Transaction(callback func(*PullRequestStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*PullRequestStore) Update ¶
func (s *PullRequestStore) Update(record *PullRequest, cols ...kallax.SchemaField) (updated int64, err error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type Repository ¶
type Repository struct { kallax.Model `` /* 527-byte string literal not displayed */ github.Repository // int64 replacement for Repository.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` ParentRepository *RepositoryReference `kallax:"parent"` SourceRepository *RepositoryReference `kallax:"source"` OwnerID int64 `kallax:"owner_id"` OwnerType string `kallax:"owner_type"` OwnerLogin string `kallax:"owner_login"` OrganizationID int64 `kallax:"organization_id"` OrganizationName string `kallax:"organization_name"` }
func NewRepository ¶
func NewRepository() (record *Repository)
NewRepository returns a new instance of Repository.
func (*Repository) BeforeSave ¶
func (r *Repository) BeforeSave() error
func (*Repository) ColumnAddress ¶
func (r *Repository) ColumnAddress(col string) (interface{}, error)
ColumnAddress returns the pointer to the value of the given column.
func (*Repository) GetID ¶
func (r *Repository) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*Repository) NewRelationshipRecord ¶
func (r *Repository) NewRelationshipRecord(field string) (kallax.Record, error)
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*Repository) SetRelationship ¶
func (r *Repository) SetRelationship(field string, rel interface{}) error
SetRelationship sets the given relationship in the given field.
func (*Repository) Value ¶
func (r *Repository) Value(col string) (interface{}, error)
Value returns the value of the given column.
type RepositoryQuery ¶
type RepositoryQuery struct {
*kallax.BaseQuery
}
RepositoryQuery is the object used to create queries for the Repository entity.
func NewRepositoryQuery ¶
func NewRepositoryQuery() *RepositoryQuery
NewRepositoryQuery returns a new instance of RepositoryQuery.
func (*RepositoryQuery) BatchSize ¶
func (q *RepositoryQuery) BatchSize(size uint64) *RepositoryQuery
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*RepositoryQuery) Copy ¶
func (q *RepositoryQuery) Copy() *RepositoryQuery
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*RepositoryQuery) FindByCreatedAt ¶
func (q *RepositoryQuery) FindByCreatedAt(cond kallax.ScalarCond, v github.Timestamp) *RepositoryQuery
FindByCreatedAt adds a new filter to the query that will require that the CreatedAt property is equal to the passed value.
func (*RepositoryQuery) FindByKallaxID ¶
func (q *RepositoryQuery) FindByKallaxID(v ...int64) *RepositoryQuery
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*RepositoryQuery) FindByOrganizationID ¶
func (q *RepositoryQuery) FindByOrganizationID(cond kallax.ScalarCond, v int64) *RepositoryQuery
FindByOrganizationID adds a new filter to the query that will require that the OrganizationID property is equal to the passed value.
func (*RepositoryQuery) FindByOrganizationName ¶
func (q *RepositoryQuery) FindByOrganizationName(v string) *RepositoryQuery
FindByOrganizationName adds a new filter to the query that will require that the OrganizationName property is equal to the passed value.
func (*RepositoryQuery) FindByOwnerID ¶
func (q *RepositoryQuery) FindByOwnerID(cond kallax.ScalarCond, v int64) *RepositoryQuery
FindByOwnerID adds a new filter to the query that will require that the OwnerID property is equal to the passed value.
func (*RepositoryQuery) FindByOwnerLogin ¶
func (q *RepositoryQuery) FindByOwnerLogin(v string) *RepositoryQuery
FindByOwnerLogin adds a new filter to the query that will require that the OwnerLogin property is equal to the passed value.
func (*RepositoryQuery) FindByOwnerType ¶
func (q *RepositoryQuery) FindByOwnerType(v string) *RepositoryQuery
FindByOwnerType adds a new filter to the query that will require that the OwnerType property is equal to the passed value.
func (*RepositoryQuery) FindByPushedAt ¶
func (q *RepositoryQuery) FindByPushedAt(cond kallax.ScalarCond, v github.Timestamp) *RepositoryQuery
FindByPushedAt adds a new filter to the query that will require that the PushedAt property is equal to the passed value.
func (*RepositoryQuery) FindByTopics ¶
func (q *RepositoryQuery) FindByTopics(v ...string) *RepositoryQuery
FindByTopics adds a new filter to the query that will require that the Topics property contains all the passed values; if no passed values, it will do nothing.
func (*RepositoryQuery) FindByUpdatedAt ¶
func (q *RepositoryQuery) FindByUpdatedAt(cond kallax.ScalarCond, v github.Timestamp) *RepositoryQuery
FindByUpdatedAt adds a new filter to the query that will require that the UpdatedAt property is equal to the passed value.
func (*RepositoryQuery) Limit ¶
func (q *RepositoryQuery) Limit(n uint64) *RepositoryQuery
Limit sets the max number of items to retrieve.
func (*RepositoryQuery) Offset ¶
func (q *RepositoryQuery) Offset(n uint64) *RepositoryQuery
Offset sets the number of items to skip from the result set of items.
func (*RepositoryQuery) Order ¶
func (q *RepositoryQuery) Order(cols ...kallax.ColumnOrder) *RepositoryQuery
Order adds order clauses to the query for the given columns.
func (*RepositoryQuery) Select ¶
func (q *RepositoryQuery) Select(columns ...kallax.SchemaField) *RepositoryQuery
Select adds columns to select in the query.
func (*RepositoryQuery) SelectNot ¶
func (q *RepositoryQuery) SelectNot(columns ...kallax.SchemaField) *RepositoryQuery
SelectNot excludes columns from being selected in the query.
func (*RepositoryQuery) Where ¶
func (q *RepositoryQuery) Where(cond kallax.Condition) *RepositoryQuery
Where adds a condition to the query. All conditions added are concatenated using a logical AND.
type RepositoryReference ¶
type RepositoryReference struct { ID int64 `json:"id"` Name string `json:"name"` Fork bool `json:"fork"` Size int `json:"size"` OwnerLogin string `json:"owner_login"` OwnerType string `json:"owner_type"` OwnerID int64 `json:"owner_id"` }
func NewRepositoryReference ¶
func NewRepositoryReference(r *github.Repository) *RepositoryReference
type RepositoryResultSet ¶
type RepositoryResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
RepositoryResultSet is the set of results returned by a query to the database.
func NewRepositoryResultSet ¶
func NewRepositoryResultSet(rs kallax.ResultSet) *RepositoryResultSet
NewRepositoryResultSet creates a new result set for rows of the type Repository.
func (*RepositoryResultSet) All ¶
func (rs *RepositoryResultSet) All() ([]*Repository, error)
All returns all records on the result set and closes the result set.
func (*RepositoryResultSet) Close ¶
func (rs *RepositoryResultSet) Close() error
Close closes the result set.
func (*RepositoryResultSet) Err ¶
func (rs *RepositoryResultSet) Err() error
Err returns the last error occurred.
func (*RepositoryResultSet) ForEach ¶
func (rs *RepositoryResultSet) ForEach(fn func(*Repository) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*RepositoryResultSet) Get ¶
func (rs *RepositoryResultSet) Get() (*Repository, error)
Get retrieves the last fetched item from the result set and the last error.
func (*RepositoryResultSet) Next ¶
func (rs *RepositoryResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*RepositoryResultSet) One ¶
func (rs *RepositoryResultSet) One() (*Repository, error)
One returns the first record on the result set and closes the result set.
type RepositoryStore ¶
type RepositoryStore struct {
*kallax.Store
}
RepositoryStore is the entity to access the records of the type Repository in the database.
func NewRepositoryStore ¶
func NewRepositoryStore(db *sql.DB) *RepositoryStore
NewRepositoryStore creates a new instance of RepositoryStore using a SQL database.
func (*RepositoryStore) Count ¶
func (s *RepositoryStore) Count(q *RepositoryQuery) (int64, error)
Count returns the number of rows that would be retrieved with the given query.
func (*RepositoryStore) Debug ¶
func (s *RepositoryStore) Debug() *RepositoryStore
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*RepositoryStore) DebugWith ¶
func (s *RepositoryStore) DebugWith(logger kallax.LoggerFunc) *RepositoryStore
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*RepositoryStore) Delete ¶
func (s *RepositoryStore) Delete(record *Repository) error
Delete removes the given record from the database.
func (*RepositoryStore) DisableCacher ¶
func (s *RepositoryStore) DisableCacher() *RepositoryStore
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*RepositoryStore) Find ¶
func (s *RepositoryStore) Find(q *RepositoryQuery) (*RepositoryResultSet, error)
Find returns the set of results for the given query.
func (*RepositoryStore) FindAll ¶
func (s *RepositoryStore) FindAll(q *RepositoryQuery) ([]*Repository, error)
FindAll returns a list of all the rows returned by the given query.
func (*RepositoryStore) FindOne ¶
func (s *RepositoryStore) FindOne(q *RepositoryQuery) (*Repository, error)
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*RepositoryStore) GenericStore ¶
func (s *RepositoryStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*RepositoryStore) Insert ¶
func (s *RepositoryStore) Insert(record *Repository) error
Insert inserts a Repository in the database. A non-persisted object is required for this operation.
func (*RepositoryStore) MustCount ¶
func (s *RepositoryStore) MustCount(q *RepositoryQuery) int64
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*RepositoryStore) MustFind ¶
func (s *RepositoryStore) MustFind(q *RepositoryQuery) *RepositoryResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*RepositoryStore) MustFindOne ¶
func (s *RepositoryStore) MustFindOne(q *RepositoryQuery) *Repository
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*RepositoryStore) Reload ¶
func (s *RepositoryStore) Reload(record *Repository) error
Reload refreshes the Repository with the data in the database and makes it writable.
func (*RepositoryStore) Save ¶
func (s *RepositoryStore) Save(record *Repository) (updated bool, err error)
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*RepositoryStore) SetGenericStore ¶
func (s *RepositoryStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*RepositoryStore) Transaction ¶
func (s *RepositoryStore) Transaction(callback func(*RepositoryStore) error) error
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*RepositoryStore) Update ¶
func (s *RepositoryStore) Update(record *Repository, cols ...kallax.SchemaField) (updated int64, err error)
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.
type User ¶
type User struct { kallax.Model `` /* 189-byte string literal not displayed */ github.User // int64 replacement for User.ID *int64, to be used as primary key KallaxID int64 `kallax:"kallax_id"` }
func (*User) BeforeSave ¶
func (*User) ColumnAddress ¶
ColumnAddress returns the pointer to the value of the given column.
func (*User) GetID ¶
func (r *User) GetID() kallax.Identifier
GetID returns the primary key of the model.
func (*User) NewRelationshipRecord ¶
NewRelationshipRecord returns a new record for the relatiobship in the given field.
func (*User) SetRelationship ¶
SetRelationship sets the given relationship in the given field.
type UserQuery ¶
type UserQuery struct {
*kallax.BaseQuery
}
UserQuery is the object used to create queries for the User entity.
func NewUserQuery ¶
func NewUserQuery() *UserQuery
NewUserQuery returns a new instance of UserQuery.
func (*UserQuery) BatchSize ¶
BatchSize sets the number of items to fetch per batch when there are 1:N relationships selected in the query.
func (*UserQuery) Copy ¶
Copy returns a new identical copy of the query. Remember queries are mutable so make a copy any time you need to reuse them.
func (*UserQuery) FindByCreatedAt ¶
FindByCreatedAt adds a new filter to the query that will require that the CreatedAt property is equal to the passed value.
func (*UserQuery) FindByKallaxID ¶
FindByKallaxID adds a new filter to the query that will require that the KallaxID property is equal to one of the passed values; if no passed values, it will do nothing.
func (*UserQuery) FindBySuspendedAt ¶
FindBySuspendedAt adds a new filter to the query that will require that the SuspendedAt property is equal to the passed value.
func (*UserQuery) FindByUpdatedAt ¶
FindByUpdatedAt adds a new filter to the query that will require that the UpdatedAt property is equal to the passed value.
type UserReference ¶
func NewUserRefernceList ¶
func NewUserRefernceList(users []*github.User) []*UserReference
type UserResultSet ¶
type UserResultSet struct { ResultSet kallax.ResultSet // contains filtered or unexported fields }
UserResultSet is the set of results returned by a query to the database.
func NewUserResultSet ¶
func NewUserResultSet(rs kallax.ResultSet) *UserResultSet
NewUserResultSet creates a new result set for rows of the type User.
func (*UserResultSet) All ¶
func (rs *UserResultSet) All() ([]*User, error)
All returns all records on the result set and closes the result set.
func (*UserResultSet) Err ¶
func (rs *UserResultSet) Err() error
Err returns the last error occurred.
func (*UserResultSet) ForEach ¶
func (rs *UserResultSet) ForEach(fn func(*User) error) error
ForEach iterates over the complete result set passing every record found to the given callback. It is possible to stop the iteration by returning `kallax.ErrStop` in the callback. Result set is always closed at the end.
func (*UserResultSet) Get ¶
func (rs *UserResultSet) Get() (*User, error)
Get retrieves the last fetched item from the result set and the last error.
func (*UserResultSet) Next ¶
func (rs *UserResultSet) Next() bool
Next fetches the next item in the result set and returns true if there is a next item. The result set is closed automatically when there are no more items.
func (*UserResultSet) One ¶
func (rs *UserResultSet) One() (*User, error)
One returns the first record on the result set and closes the result set.
type UserStore ¶
type UserStore struct {
*kallax.Store
}
UserStore is the entity to access the records of the type User in the database.
func NewUserStore ¶
NewUserStore creates a new instance of UserStore using a SQL database.
func (*UserStore) Count ¶
Count returns the number of rows that would be retrieved with the given query.
func (*UserStore) Debug ¶
Debug returns a new store that will print all SQL statements to stdout using the log.Printf function.
func (*UserStore) DebugWith ¶
DebugWith returns a new store that will print all SQL statements using the given logger function.
func (*UserStore) DisableCacher ¶
DisableCacher turns off prepared statements, which can be useful in some scenarios.
func (*UserStore) Find ¶
func (s *UserStore) Find(q *UserQuery) (*UserResultSet, error)
Find returns the set of results for the given query.
func (*UserStore) FindOne ¶
FindOne returns the first row returned by the given query. `ErrNotFound` is returned if there are no results.
func (*UserStore) GenericStore ¶
func (s *UserStore) GenericStore() *kallax.Store
GenericStore returns the generic store of this store.
func (*UserStore) Insert ¶
Insert inserts a User in the database. A non-persisted object is required for this operation.
func (*UserStore) MustCount ¶
MustCount returns the number of rows that would be retrieved with the given query, but panics if there is an error.
func (*UserStore) MustFind ¶
func (s *UserStore) MustFind(q *UserQuery) *UserResultSet
MustFind returns the set of results for the given query, but panics if there is any error.
func (*UserStore) MustFindOne ¶
MustFindOne returns the first row retrieved by the given query. It panics if there is an error or if there are no rows.
func (*UserStore) Reload ¶
Reload refreshes the User with the data in the database and makes it writable.
func (*UserStore) Save ¶
Save inserts the object if the record is not persisted, otherwise it updates it. Same rules of Update and Insert apply depending on the case.
func (*UserStore) SetGenericStore ¶
func (s *UserStore) SetGenericStore(store *kallax.Store)
SetGenericStore changes the generic store of this store.
func (*UserStore) Transaction ¶
Transaction executes the given callback in a transaction and rollbacks if an error is returned. The transaction is only open in the store passed as a parameter to the callback.
func (*UserStore) Update ¶
Update updates the given record on the database. If the columns are given, only these columns will be updated. Otherwise all of them will be. Be very careful with this, as you will have a potentially different object in memory but not on the database. Only writable records can be updated. Writable objects are those that have been just inserted or retrieved using a query with no custom select fields.