Documentation
¶
Index ¶
- func BeginTransaction(ctx context.Context) (err errors.CodeError)
- func CommitTransaction(ctx context.Context) (err errors.CodeError)
- func Dialect(ctx context.Context) (dialect string, err errors.CodeError)
- func Execute(ctx context.Context, query string, args ...interface{}) (affected int64, lastInsertId int64, err errors.CodeError)
- func RegisterType(vt ValueType)
- func RollbackTransaction(ctx context.Context) (err errors.CodeError)
- func Service(databases ...string) service.Service
- func WithOptions(ctx context.Context, options ...ProxyOption) context.Context
- type Arguments
- func (t *Arguments) Append(values ...interface{}) *Arguments
- func (t *Arguments) MarshalJSON() (p []byte, err error)
- func (t *Arguments) Merge(v *Arguments) *Arguments
- func (t *Arguments) Size() (n int)
- func (t *Arguments) UnmarshalJSON(p []byte) (err error)
- func (t *Arguments) Values() (args []interface{})
- type Column
- type Date
- type NullDate
- type NullJson
- type NullRawBytes
- type NullTime
- type ProxyOption
- type ProxyOptions
- type Row
- type Rows
- type Time
- type ValueScanner
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginTransaction ¶ added in v0.8.1
func CommitTransaction ¶ added in v0.8.1
func RegisterType ¶ added in v1.0.0
func RegisterType(vt ValueType)
func RollbackTransaction ¶ added in v0.8.1
func WithOptions ¶ added in v1.0.0
func WithOptions(ctx context.Context, options ...ProxyOption) context.Context
Types ¶
type Arguments ¶ added in v1.0.0
type Arguments struct {
// contains filtered or unexported fields
}
func NewArguments ¶ added in v1.0.0
func NewArguments() *Arguments
func (*Arguments) MarshalJSON ¶ added in v1.0.0
func (*Arguments) UnmarshalJSON ¶ added in v1.0.0
type Date ¶ added in v1.0.0
func NewDateFromJsonDate ¶ added in v1.0.0
func NewDateFromTime ¶ added in v1.0.0
func NewTimeFromTime ¶ added in v1.0.0
func (*Date) MarshalJSON ¶ added in v1.0.0
func (*Date) UnmarshalJSON ¶ added in v1.0.0
type NullJson ¶
type NullJson struct {
Json json.RawMessage
Valid bool
}
type NullRawBytes ¶ added in v1.0.0
func (*NullRawBytes) Scan ¶ added in v1.0.0
func (v *NullRawBytes) Scan(src interface{}) error
type ProxyOption ¶ added in v1.0.0
type ProxyOption func(*ProxyOptions)
func Database ¶ added in v1.0.0
func Database(name string) ProxyOption
type ProxyOptions ¶ added in v1.0.0
type ProxyOptions struct {
// contains filtered or unexported fields
}
type Rows ¶
type Time ¶ added in v1.0.0
func (*Time) MarshalJSON ¶ added in v1.0.0
func (*Time) UnmarshalJSON ¶ added in v1.0.0
type ValueScanner ¶ added in v1.0.0
type ValueType ¶ added in v1.0.0
type ValueType interface {
Type() (typ reflect.Type)
ColumnType() (ct string)
DatabaseTypes() (types []string)
Scanner() (scanner ValueScanner)
Encode(src any) (p []byte, err error)
Decode(p []byte) (v any, err error)
}
func BoolValueType ¶ added in v1.0.0
func BoolValueType() ValueType
func BytesValueType ¶ added in v1.0.0
func BytesValueType() ValueType
func DateValueType ¶ added in v1.0.0
func DateValueType() ValueType
func DatetimeValueType ¶ added in v1.0.0
func DatetimeValueType() ValueType
func FloatValueType ¶ added in v1.0.0
func FloatValueType() ValueType
func IntValueType ¶ added in v1.0.0
func IntValueType() ValueType
func JsonValueType ¶ added in v1.0.0
func JsonValueType() ValueType
func StringValueType ¶ added in v1.0.0
func StringValueType() ValueType
func TimeValueType ¶ added in v1.0.0
func TimeValueType() ValueType
Source Files
¶
Click to show internal directories.
Click to hide internal directories.