Documentation ¶
Index ¶
- func FormatDatetime(datetime time.Time) string
- func FormatTimespan(duration time.Duration) string
- func NormalizeName(name string) string
- func QuoteString(value string, hidden bool) string
- func RequiresQuoting(value string) bool
- func ShouldBeEscaped(c int32) bool
- type Builder
- func (b *Builder) AddBool(value bool) *Builder
- func (b *Builder) AddColumn(column string) *Builder
- func (b *Builder) AddDatabase(database string) *Builder
- func (b *Builder) AddDateTime(value time.Time) *Builder
- func (b *Builder) AddDecimal(value decimal.Decimal) *Builder
- func (b *Builder) AddDynamic(value interface{}) *Builder
- func (b *Builder) AddFunction(function string) *Builder
- func (b *Builder) AddGUID(value uuid.UUID) *Builder
- func (b *Builder) AddInt(value int32) *Builder
- func (b *Builder) AddKeyword(keyword string) *Builder
- func (b *Builder) AddLiteral(value stringConstant) *Builder
- func (b *Builder) AddLong(value int64) *Builder
- func (b *Builder) AddReal(value float64) *Builder
- func (b *Builder) AddString(value string) *Builder
- func (b *Builder) AddTable(table string) *Builder
- func (b *Builder) AddTimespan(value time.Duration) *Builder
- func (b *Builder) AddUnsafe(value string) *Builder
- func (b *Builder) GetParameters() (map[string]string, error)
- func (b *Builder) Reset()
- func (b *Builder) String() string
- func (b *Builder) SupportsInlineParameters() bool
- type Parameters
- func (q *Parameters) AddBool(key string, value bool) *Parameters
- func (q *Parameters) AddDateTime(key string, value time.Time) *Parameters
- func (q *Parameters) AddDecimal(key string, value decimal.Decimal) *Parameters
- func (q *Parameters) AddDynamic(key string, value interface{}) *Parameters
- func (q *Parameters) AddGUID(key string, value uuid.UUID) *Parameters
- func (q *Parameters) AddInt(key string, value int32) *Parameters
- func (q *Parameters) AddLong(key string, value int64) *Parameters
- func (q *Parameters) AddReal(key string, value float64) *Parameters
- func (q *Parameters) AddString(key string, value string) *Parameters
- func (q *Parameters) AddTimespan(key string, value time.Duration) *Parameters
- func (q *Parameters) Count() int
- func (q *Parameters) Reset()
- func (q *Parameters) ToDeclarationString() string
- func (q *Parameters) ToParameterCollection() map[string]string
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDatetime ¶
func FormatTimespan ¶
func NormalizeName ¶
NormalizeName normalizes a string in order to be used safely in the engine - given "query" will produce [\"query\"].
func QuoteString ¶
func RequiresQuoting ¶
RequiresQuoting checks whether a given string is an identifier
func ShouldBeEscaped ¶
ShouldBeEscaped Checks whether a rune should be escaped or not based on it's type.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func FromBuilder ¶
func (*Builder) AddDatabase ¶
func (*Builder) AddDynamic ¶
func (*Builder) AddFunction ¶
func (*Builder) AddKeyword ¶
func (*Builder) AddLiteral ¶
func (*Builder) AddUnsafe ¶
AddUnsafe enables unsafe actions on a Builder - adds a string as is, no validation checking or escaping. This turns off safety features that could allow a service client to compromise your data store. USE AT YOUR OWN RISK!
func (*Builder) SupportsInlineParameters ¶
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
func NewParameters ¶
func NewParameters() *Parameters
func (*Parameters) AddBool ¶
func (q *Parameters) AddBool(key string, value bool) *Parameters
func (*Parameters) AddDateTime ¶
func (q *Parameters) AddDateTime(key string, value time.Time) *Parameters
func (*Parameters) AddDecimal ¶
func (q *Parameters) AddDecimal(key string, value decimal.Decimal) *Parameters
func (*Parameters) AddDynamic ¶
func (q *Parameters) AddDynamic(key string, value interface{}) *Parameters
func (*Parameters) AddGUID ¶
func (q *Parameters) AddGUID(key string, value uuid.UUID) *Parameters
func (*Parameters) AddInt ¶
func (q *Parameters) AddInt(key string, value int32) *Parameters
func (*Parameters) AddLong ¶
func (q *Parameters) AddLong(key string, value int64) *Parameters
func (*Parameters) AddReal ¶
func (q *Parameters) AddReal(key string, value float64) *Parameters
func (*Parameters) AddString ¶
func (q *Parameters) AddString(key string, value string) *Parameters
func (*Parameters) AddTimespan ¶
func (q *Parameters) AddTimespan(key string, value time.Duration) *Parameters
func (*Parameters) Count ¶
func (q *Parameters) Count() int
func (*Parameters) ToDeclarationString ¶
func (q *Parameters) ToDeclarationString() string
func (*Parameters) ToParameterCollection ¶
func (q *Parameters) ToParameterCollection() map[string]string
Click to show internal directories.
Click to hide internal directories.