Documentation ¶
Index ¶
- Constants
- func ProcessUpdateQuery(queryStrings *[]string, allParams *[]table.ParameterOption, ...) error
- func ProcessUpsertQuery(queryStrings *[]string, allParams *[]table.ParameterOption, ...) error
- type FormatQueryResult
- type OrderSpec
- type PageSpec
- type QueryFilter
- type ReadTableQuery
- type ReadTableQueryImpl
- func (d *ReadTableQueryImpl) AddTableQueryParam(paramValue table_types.Value) string
- func (d *ReadTableQueryImpl) FormatOrder() *string
- func (d *ReadTableQueryImpl) FormatPage() *string
- func (d *ReadTableQueryImpl) FormatQuery(ctx context.Context) (*FormatQueryResult, error)
- func (d *ReadTableQueryImpl) MakeFilterString() string
- type ReadTableQueryOption
- func WithOrderBy(spec OrderSpec) ReadTableQueryOption
- func WithPageSpec(spec PageSpec) ReadTableQueryOption
- func WithParameters(params ...table.ParameterOption) ReadTableQueryOption
- func WithQueryFilters(filters ...QueryFilter) ReadTableQueryOption
- func WithRawQuery(rawQuery string) ReadTableQueryOption
- func WithTableName(tableName string) ReadTableQueryOption
- type WriteQueryBulderFactory
- type WriteSingleTableQueryImpl
- func BuildCreateBackupQuery(b types.Backup, index int) WriteSingleTableQueryImpl
- func BuildCreateBackupScheduleQuery(schedule types.BackupSchedule, index int) WriteSingleTableQueryImpl
- func BuildCreateOperationQuery(operation types.Operation, index int) WriteSingleTableQueryImpl
- func BuildUpdateBackupQuery(backup types.Backup, index int) WriteSingleTableQueryImpl
- func BuildUpdateBackupScheduleQuery(schedule types.BackupSchedule, index int) WriteSingleTableQueryImpl
- func BuildUpdateOperationQuery(operation types.Operation, index int) WriteSingleTableQueryImpl
- type WriteTableQuery
- type WriteTableQueryImpl
- func (d *WriteTableQueryImpl) FormatQuery(ctx context.Context) (*FormatQueryResult, error)
- func (d *WriteTableQueryImpl) WithCreateBackup(backup types.Backup) WriteTableQuery
- func (d *WriteTableQueryImpl) WithCreateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
- func (d *WriteTableQueryImpl) WithCreateOperation(operation types.Operation) WriteTableQuery
- func (d *WriteTableQueryImpl) WithUpdateBackup(backup types.Backup) WriteTableQuery
- func (d *WriteTableQueryImpl) WithUpdateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
- func (d *WriteTableQueryImpl) WithUpdateOperation(operation types.Operation) WriteTableQuery
- type WriteTableQueryImplOption
- type WriteTableQueryMock
- func (w *WriteTableQueryMock) FormatQuery(_ context.Context) (*FormatQueryResult, error)
- func (w *WriteTableQueryMock) WithCreateBackup(backup types.Backup) WriteTableQuery
- func (w *WriteTableQueryMock) WithCreateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
- func (w *WriteTableQueryMock) WithCreateOperation(operation types.Operation) WriteTableQuery
- func (w *WriteTableQueryMock) WithUpdateBackup(backup types.Backup) WriteTableQuery
- func (w *WriteTableQueryMock) WithUpdateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
- func (w *WriteTableQueryMock) WithUpdateOperation(operation types.Operation) WriteTableQuery
- type WriteTableQueryMockOption
Constants ¶
View Source
const (
DEFAULT_PAGE_SIZE = 50
)
Variables ¶
This section is empty.
Functions ¶
func ProcessUpdateQuery ¶
func ProcessUpdateQuery( queryStrings *[]string, allParams *[]table.ParameterOption, t *WriteSingleTableQueryImpl, ) error
func ProcessUpsertQuery ¶
func ProcessUpsertQuery( queryStrings *[]string, allParams *[]table.ParameterOption, t *WriteSingleTableQueryImpl, ) error
Types ¶
type FormatQueryResult ¶
type FormatQueryResult struct { QueryText string QueryParams *table.QueryParameters }
type OrderSpec ¶
func NewOrderSpec ¶
func NewOrderSpec(order *pb.ListBackupsOrder) (*OrderSpec, error)
type QueryFilter ¶
type QueryFilter struct { Field string Values []table_types.Value IsLike bool }
type ReadTableQuery ¶
type ReadTableQuery interface { MakeFilterString() string FormatQuery(ctx context.Context) (*FormatQueryResult, error) }
type ReadTableQueryImpl ¶
type ReadTableQueryImpl struct {
// contains filtered or unexported fields
}
func NewReadTableQuery ¶
func NewReadTableQuery(options ...ReadTableQueryOption) *ReadTableQueryImpl
func (*ReadTableQueryImpl) AddTableQueryParam ¶
func (d *ReadTableQueryImpl) AddTableQueryParam(paramValue table_types.Value) string
func (*ReadTableQueryImpl) FormatOrder ¶
func (d *ReadTableQueryImpl) FormatOrder() *string
func (*ReadTableQueryImpl) FormatPage ¶
func (d *ReadTableQueryImpl) FormatPage() *string
func (*ReadTableQueryImpl) FormatQuery ¶
func (d *ReadTableQueryImpl) FormatQuery(ctx context.Context) (*FormatQueryResult, error)
func (*ReadTableQueryImpl) MakeFilterString ¶
func (d *ReadTableQueryImpl) MakeFilterString() string
type ReadTableQueryOption ¶
type ReadTableQueryOption func(*ReadTableQueryImpl)
func WithOrderBy ¶
func WithOrderBy(spec OrderSpec) ReadTableQueryOption
func WithPageSpec ¶
func WithPageSpec(spec PageSpec) ReadTableQueryOption
func WithParameters ¶
func WithParameters(params ...table.ParameterOption) ReadTableQueryOption
func WithQueryFilters ¶
func WithQueryFilters(filters ...QueryFilter) ReadTableQueryOption
func WithRawQuery ¶
func WithRawQuery(rawQuery string) ReadTableQueryOption
func WithTableName ¶
func WithTableName(tableName string) ReadTableQueryOption
type WriteQueryBulderFactory ¶
type WriteQueryBulderFactory func() WriteTableQuery
type WriteSingleTableQueryImpl ¶
type WriteSingleTableQueryImpl struct {
// contains filtered or unexported fields
}
func BuildCreateBackupQuery ¶
func BuildCreateBackupQuery(b types.Backup, index int) WriteSingleTableQueryImpl
func BuildCreateBackupScheduleQuery ¶
func BuildCreateBackupScheduleQuery(schedule types.BackupSchedule, index int) WriteSingleTableQueryImpl
func BuildCreateOperationQuery ¶
func BuildCreateOperationQuery(operation types.Operation, index int) WriteSingleTableQueryImpl
func BuildUpdateBackupQuery ¶
func BuildUpdateBackupQuery(backup types.Backup, index int) WriteSingleTableQueryImpl
func BuildUpdateBackupScheduleQuery ¶
func BuildUpdateBackupScheduleQuery(schedule types.BackupSchedule, index int) WriteSingleTableQueryImpl
func BuildUpdateOperationQuery ¶
func BuildUpdateOperationQuery(operation types.Operation, index int) WriteSingleTableQueryImpl
func (*WriteSingleTableQueryImpl) AddUpdateId ¶
func (d *WriteSingleTableQueryImpl) AddUpdateId(value table_types.Value)
func (*WriteSingleTableQueryImpl) AddValueParam ¶
func (d *WriteSingleTableQueryImpl) AddValueParam(name string, value table_types.Value)
func (*WriteSingleTableQueryImpl) GetParamNames ¶
func (d *WriteSingleTableQueryImpl) GetParamNames() []string
type WriteTableQuery ¶
type WriteTableQuery interface { FormatQuery(ctx context.Context) (*FormatQueryResult, error) WithCreateBackup(backup types.Backup) WriteTableQuery WithCreateOperation(operation types.Operation) WriteTableQuery WithCreateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery WithUpdateBackup(backup types.Backup) WriteTableQuery WithUpdateOperation(operation types.Operation) WriteTableQuery WithUpdateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery }
func NewWriteTableQuery ¶
func NewWriteTableQuery() WriteTableQuery
func NewWriteTableQueryMock ¶
func NewWriteTableQueryMock() WriteTableQuery
type WriteTableQueryImpl ¶
type WriteTableQueryImpl struct {
// contains filtered or unexported fields
}
func (*WriteTableQueryImpl) FormatQuery ¶
func (d *WriteTableQueryImpl) FormatQuery(ctx context.Context) (*FormatQueryResult, error)
func (*WriteTableQueryImpl) WithCreateBackup ¶
func (d *WriteTableQueryImpl) WithCreateBackup(backup types.Backup) WriteTableQuery
func (*WriteTableQueryImpl) WithCreateBackupSchedule ¶
func (d *WriteTableQueryImpl) WithCreateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
func (*WriteTableQueryImpl) WithCreateOperation ¶
func (d *WriteTableQueryImpl) WithCreateOperation(operation types.Operation) WriteTableQuery
func (*WriteTableQueryImpl) WithUpdateBackup ¶
func (d *WriteTableQueryImpl) WithUpdateBackup(backup types.Backup) WriteTableQuery
func (*WriteTableQueryImpl) WithUpdateBackupSchedule ¶
func (d *WriteTableQueryImpl) WithUpdateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
func (*WriteTableQueryImpl) WithUpdateOperation ¶
func (d *WriteTableQueryImpl) WithUpdateOperation(operation types.Operation) WriteTableQuery
type WriteTableQueryImplOption ¶
type WriteTableQueryImplOption func(*WriteTableQueryImpl)
type WriteTableQueryMock ¶
type WriteTableQueryMock struct { Operation types.Operation Backup types.Backup BackupSchedule types.BackupSchedule }
func (*WriteTableQueryMock) FormatQuery ¶
func (w *WriteTableQueryMock) FormatQuery(_ context.Context) (*FormatQueryResult, error)
func (*WriteTableQueryMock) WithCreateBackup ¶
func (w *WriteTableQueryMock) WithCreateBackup(backup types.Backup) WriteTableQuery
func (*WriteTableQueryMock) WithCreateBackupSchedule ¶
func (w *WriteTableQueryMock) WithCreateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
func (*WriteTableQueryMock) WithCreateOperation ¶
func (w *WriteTableQueryMock) WithCreateOperation(operation types.Operation) WriteTableQuery
func (*WriteTableQueryMock) WithUpdateBackup ¶
func (w *WriteTableQueryMock) WithUpdateBackup(backup types.Backup) WriteTableQuery
func (*WriteTableQueryMock) WithUpdateBackupSchedule ¶
func (w *WriteTableQueryMock) WithUpdateBackupSchedule(schedule types.BackupSchedule) WriteTableQuery
func (*WriteTableQueryMock) WithUpdateOperation ¶
func (w *WriteTableQueryMock) WithUpdateOperation(operation types.Operation) WriteTableQuery
type WriteTableQueryMockOption ¶
type WriteTableQueryMockOption func(*WriteTableQueryMock)
Click to show internal directories.
Click to hide internal directories.