Documentation ¶
Index ¶
- func NewProjection(options ...SQLBuilderOption) (string, error)
- type DTO
- type DocumentDBCollection
- func (m *DocumentDBCollection) FindOne(ctx context.Context, destination interface{}, query *DocumentDBQuery) error
- func (m *DocumentDBCollection) InsertOne(ctx context.Context, subject interface{}) (string, error)
- func (m *DocumentDBCollection) UpdateOne(ctx context.Context, subject interface{}, query *DocumentDBQuery) error
- type DocumentDBQuery
- type DocumentDBQueryBuilderOption
- type DocumentPersister
- type DocumentQuerier
- type DraftResultDTO
- type DraftResultRepository
- type EntryDTO
- type EntryRepository
- type EntrySubmitTrxRepository
- type Queryer
- type QueueWriter
- type ResultDTO
- type ResultRepository
- type SQLBuilderOption
- func From(tables ...string) SQLBuilderOption
- func Join(fmtExpresion string, tables ...interface{}) SQLBuilderOption
- func LeftJoin(fmtExpresion string, tables ...interface{}) SQLBuilderOption
- func Limit(limit int) SQLBuilderOption
- func Offset(offset int) SQLBuilderOption
- func OrderBy(columns ...string) SQLBuilderOption
- func Select(columns ...string) SQLBuilderOption
- func Where(expression string) SQLBuilderOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProjection ¶
func NewProjection(options ...SQLBuilderOption) (string, error)
NewProjection generates a SQL string based on the given SQLBuilderOption
Types ¶
type DocumentDBCollection ¶
type DocumentDBCollection struct {
// contains filtered or unexported fields
}
func (*DocumentDBCollection) FindOne ¶
func (m *DocumentDBCollection) FindOne(ctx context.Context, destination interface{}, query *DocumentDBQuery) error
func (*DocumentDBCollection) InsertOne ¶
func (m *DocumentDBCollection) InsertOne(ctx context.Context, subject interface{}) (string, error)
func (*DocumentDBCollection) UpdateOne ¶
func (m *DocumentDBCollection) UpdateOne(ctx context.Context, subject interface{}, query *DocumentDBQuery) error
type DocumentDBQuery ¶
type DocumentDBQuery struct {
// contains filtered or unexported fields
}
func NewDocumentDBQuery ¶
func NewDocumentDBQuery(options ...DocumentDBQueryBuilderOption) (*DocumentDBQuery, error)
type DocumentDBQueryBuilderOption ¶
type DocumentDBQueryBuilderOption func(b *DocumentDBQuery) error
func Field ¶
func Field(name string, value interface{}) DocumentDBQueryBuilderOption
func ID ¶
func ID(id string) DocumentDBQueryBuilderOption
type DocumentPersister ¶
type DocumentQuerier ¶
type DocumentQuerier interface {
FindOne(ctx context.Context, destination interface{}, query *DocumentDBQuery) error
}
type DraftResultDTO ¶
type DraftResultRepository ¶
type DraftResultRepository interface { FindByID(entryID, datasetID int) (*model.DraftResult, error) FindBy(dto DraftResultDTO) ([]model.DraftResult, error) }
func NewDraftResultRepository ¶
func NewDraftResultRepository(db Queryer) DraftResultRepository
type EntryRepository ¶
type EntryRepository interface { FindByID(int) (*model.Entry, error) FindBy(EntryDTO) ([]model.Entry, error) }
func NewEntryDraftRepository ¶
func NewEntryDraftRepository(dbx Queryer) EntryRepository
NewEntryDraftRepository returns a EntryRepository for Entry Draft (CMS user_test) entity
func NewEntryRepository ¶
func NewEntryRepository(dbx Queryer) EntryRepository
NewEntryDraftRepository returns a EntryRepository for Entry (CMS submittion) entity
type EntrySubmitTrxRepository ¶
type EntrySubmitTrxRepository interface { FindByID(ctx context.Context, id string) (*model.EntrySubmitTrx, error) Save(ctx context.Context, trx *model.EntrySubmitTrx) (string, error) }
func NewDraftSubmitTrxRepository ¶
func NewDraftSubmitTrxRepository(db *mongo.Database) EntrySubmitTrxRepository
func NewEntrySubmitTrxRepository ¶
func NewEntrySubmitTrxRepository(db *mongo.Database) EntrySubmitTrxRepository
type Queryer ¶
type Queryer interface { Select(destination interface{}, query string, args ...interface{}) error Get(destination interface{}, query string, args ...interface{}) error }
Queryer allows sqlx.DB binding
type QueueWriter ¶
func NewQueueWriter ¶
func NewQueueWriter(db *mongo.Database, queueName string) QueueWriter
type ResultRepository ¶
type ResultRepository interface { FindByID(entryID, datasetID int) (*model.Result, error) FindBy(dto ResultDTO) ([]model.Result, error) }
func NewResultRepository ¶
func NewResultRepository(db Queryer) ResultRepository
type SQLBuilderOption ¶
type SQLBuilderOption func(b *projectionBuilder)
SQLBuilderOption functional option wrapper for SQL builder
func From ¶
func From(tables ...string) SQLBuilderOption
func Join ¶
func Join(fmtExpresion string, tables ...interface{}) SQLBuilderOption
func LeftJoin ¶
func LeftJoin(fmtExpresion string, tables ...interface{}) SQLBuilderOption
func Limit ¶
func Limit(limit int) SQLBuilderOption
func Offset ¶
func Offset(offset int) SQLBuilderOption
func OrderBy ¶
func OrderBy(columns ...string) SQLBuilderOption
func Select ¶
func Select(columns ...string) SQLBuilderOption
func Where ¶
func Where(expression string) SQLBuilderOption
Click to show internal directories.
Click to hide internal directories.