Documentation ¶
Index ¶
- func BindCommonParamsToSelectBuilder(builder squirrel.SelectBuilder, params contexts.CommonParamsForFetch) squirrel.SelectBuilder
- func GetColumnsAndValuesFromStruct(ctx context.Context, st interface{}, callOpts ...CallOptionMapValues) ([]string, []interface{})
- func GetMapValuesFromStruct(ctx context.Context, st interface{}, callOpts ...CallOptionMapValues) map[string]interface{}
- func NewMock() (*sql.DB, sqlmock.Sqlmock)
- func NewPSQLStatementBuilder(db *sqlx.DB) squirrel.StatementBuilderType
- func ParseColumnsForSelect(cols []string) []string
- func ParseColumnsForSelectWithAlias(cols []string, alias string) []string
- type CallOptionMapValues
- type CommonRepository
- type SqlxTransaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindCommonParamsToSelectBuilder ¶
func BindCommonParamsToSelectBuilder(builder squirrel.SelectBuilder, params contexts.CommonParamsForFetch) squirrel.SelectBuilder
func GetColumnsAndValuesFromStruct ¶
func GetColumnsAndValuesFromStruct(ctx context.Context, st interface{}, callOpts ...CallOptionMapValues) ([]string, []interface{})
func GetMapValuesFromStruct ¶
func GetMapValuesFromStruct(ctx context.Context, st interface{}, callOpts ...CallOptionMapValues) map[string]interface{}
GetMapValuesFromStruct For INSERT or UPDATE queries
func NewPSQLStatementBuilder ¶
func NewPSQLStatementBuilder(db *sqlx.DB) squirrel.StatementBuilderType
func ParseColumnsForSelect ¶
Types ¶
type CallOptionMapValues ¶
type CallOptionMapValues struct {
// contains filtered or unexported fields
}
func WithMapValuesAutoDateTimeFields ¶
func WithMapValuesAutoDateTimeFields(fields []string) CallOptionMapValues
func WithMapValuesIgnoreFields ¶
func WithMapValuesIgnoreFields(fields []string) CallOptionMapValues
func WithMapValuesSelectFields ¶
func WithMapValuesSelectFields(fields []string) CallOptionMapValues
type CommonRepository ¶
type CommonRepository interface {
Close()
}
type SqlxTransaction ¶
type SqlxTransaction struct {
// contains filtered or unexported fields
}
func NewSqlxTransaction ¶
func NewSqlxTransaction(mdbi *datastore.MasterDbInstance) *SqlxTransaction
Click to show internal directories.
Click to hide internal directories.