Documentation ¶
Index ¶
- func Begin(ctx context.Context, options ...databases.TransactionOption) (err error)
- func Commit(ctx context.Context) (err error)
- func Dialect(ctx context.Context) (dialect string, err error)
- func Disuse(ctx context.Context) context.Context
- func Execute(ctx context.Context, query []byte, arguments ...interface{}) (result databases.Result, err error)
- func FAG() []modules.FnAnnotationCodeWriter
- func ForceDialect(ctx context.Context, dialect string) context.Context
- func New(options ...Option) (v services.Service)
- func Readonly() databases.TransactionOption
- func Rollback(ctx context.Context)
- func Use(ctx context.Context, endpointName []byte) context.Context
- func WithIsolation(isolation databases.Isolation) databases.TransactionOption
- func WithTransactionId(id string) databases.TransactionOption
- type Argument
- type Arguments
- type Column
- func (c *Column) Bool() (v bool, err error)
- func (c *Column) Byte() (v byte, err error)
- func (c *Column) Bytes() (v []byte, err error)
- func (c *Column) Date() (v times.Date, err error)
- func (c *Column) Datetime() (v time.Time, err error)
- func (c *Column) Float() (v float64, err error)
- func (c *Column) Int() (v int64, err error)
- func (c *Column) Reset()
- func (c *Column) Scan(src any) (err error)
- func (c *Column) String() (v string, err error)
- func (c *Column) Time() (v times.Time, err error)
- type ColumnType
- type Columns
- type Config
- type NullBool
- type NullByte
- type NullBytes
- type NullDate
- type NullDatetime
- type NullFloat64
- type NullInt16
- type NullInt32
- type NullInt64
- type NullJson
- type NullString
- type NullTime
- type Option
- type Options
- type RegisterTLSFunc
- type Row
- type Rows
- func (rows *Rows) Close() error
- func (rows *Rows) Columns() []ColumnType
- func (rows Rows) MarshalAvro() (p []byte, err error)
- func (rows Rows) MarshalJSON() (p []byte, err error)
- func (rows *Rows) Next() (ok bool)
- func (rows *Rows) Scan(dst ...any) (err error)
- func (rows *Rows) UnmarshalAvro(p []byte) (err error)
- func (rows *Rows) UnmarshalJSON(p []byte) (err error)
- type SSLConfig
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Begin ¶ added in v1.2.1
func Begin(ctx context.Context, options ...databases.TransactionOption) (err error)
func FAG ¶ added in v1.2.1
func FAG() []modules.FnAnnotationCodeWriter
func ForceDialect ¶ added in v1.2.1
func Readonly ¶ added in v1.2.1
func Readonly() databases.TransactionOption
func WithIsolation ¶ added in v1.2.1
func WithIsolation(isolation databases.Isolation) databases.TransactionOption
func WithTransactionId ¶ added in v1.3.0
func WithTransactionId(id string) databases.TransactionOption
Types ¶
type Argument ¶ added in v1.2.1
type Argument struct { Name string `json:"name" avro:"name"` Nil bool `json:"nil" avro:"nil"` Type string `json:"type" avro:"type"` Value avro.RawMessage `json:"value" avro:"value"` }
func NewArgument ¶ added in v1.2.1
type Arguments ¶ added in v1.0.0
type Arguments []any
func (Arguments) MarshalAvro ¶ added in v1.2.41
func (Arguments) MarshalJSON ¶ added in v1.0.0
func (*Arguments) UnmarshalAvro ¶ added in v1.2.41
func (*Arguments) UnmarshalJSON ¶ added in v1.0.0
type Column ¶
type Column struct { Valid bool `json:"valid" avro:"valid"` Value avro.RawMessage `json:"value" avro:"value"` }
type ColumnType ¶
type ColumnType struct { Name string `json:"name" avro:"name"` DatabaseType string `json:"databaseType" avro:"databaseType"` Type string `json:"type" avro:"type"` }
func NewColumnType ¶ added in v1.2.1
func NewColumnType(name string, databaseType string, scanType reflect.Type) (v ColumnType)
func (ColumnType) ScanValue ¶ added in v1.2.1
func (ct ColumnType) ScanValue() (sv any)
type NullBool ¶ added in v1.2.1
func NewNullBool ¶ added in v1.2.1
func (NullBool) MarshalJSON ¶ added in v1.2.1
func (*NullBool) UnmarshalJSON ¶ added in v1.2.1
type NullByte ¶ added in v1.2.1
func NewNullByte ¶ added in v1.2.1
func (NullByte) MarshalJSON ¶ added in v1.2.1
func (*NullByte) UnmarshalJSON ¶ added in v1.2.1
type NullBytes ¶ added in v1.2.1
func NewNullBytes ¶ added in v1.2.1
func (NullBytes) MarshalJSON ¶ added in v1.2.1
func (*NullBytes) UnmarshalJSON ¶ added in v1.2.1
type NullDate ¶ added in v1.0.0
func NewNullDate ¶ added in v1.2.1
func (NullDate) MarshalJSON ¶ added in v1.2.1
func (*NullDate) UnmarshalJSON ¶ added in v1.2.1
type NullDatetime ¶ added in v1.2.1
func NewNullDatetime ¶ added in v1.2.1
func NewNullDatetime(t time.Time) NullDatetime
func (NullDatetime) MarshalJSON ¶ added in v1.2.1
func (n NullDatetime) MarshalJSON() (p []byte, err error)
func (*NullDatetime) UnmarshalJSON ¶ added in v1.2.1
func (n *NullDatetime) UnmarshalJSON(p []byte) error
type NullFloat64 ¶ added in v1.2.1
type NullFloat64 struct {
sql.NullFloat64
}
func NewNullFloat64 ¶ added in v1.2.1
func NewNullFloat64(n float64) NullFloat64
func (NullFloat64) MarshalJSON ¶ added in v1.2.1
func (n NullFloat64) MarshalJSON() (p []byte, err error)
func (*NullFloat64) UnmarshalJSON ¶ added in v1.2.1
func (n *NullFloat64) UnmarshalJSON(p []byte) error
type NullInt16 ¶ added in v1.2.1
func NewNullInt16 ¶ added in v1.2.1
func (NullInt16) MarshalJSON ¶ added in v1.2.1
func (*NullInt16) UnmarshalJSON ¶ added in v1.2.1
type NullInt32 ¶ added in v1.2.1
func NewNullInt32 ¶ added in v1.2.1
func (NullInt32) MarshalJSON ¶ added in v1.2.1
func (*NullInt32) UnmarshalJSON ¶ added in v1.2.1
type NullInt64 ¶ added in v1.2.1
func NewNullInt64 ¶ added in v1.2.1
func (NullInt64) MarshalJSON ¶ added in v1.2.1
func (*NullInt64) UnmarshalJSON ¶ added in v1.2.1
type NullJson ¶
func NewNullJson ¶ added in v1.2.1
func (NullJson[E]) MarshalJSON ¶ added in v1.2.1
func (*NullJson[E]) UnmarshalJSON ¶ added in v1.2.1
type NullString ¶ added in v1.2.1
type NullString struct {
sql.NullString
}
func NewNullString ¶ added in v1.2.1
func NewNullString(s string) NullString
func (NullString) MarshalJSON ¶ added in v1.2.1
func (n NullString) MarshalJSON() (p []byte, err error)
func (*NullString) UnmarshalJSON ¶ added in v1.2.1
func (n *NullString) UnmarshalJSON(p []byte) error
type NullTime ¶ added in v1.0.0
func NewNullTime ¶ added in v1.2.1
func (NullTime) MarshalJSON ¶ added in v1.2.1
func (*NullTime) UnmarshalJSON ¶ added in v1.2.1
type Option ¶ added in v1.2.1
type Option func(options *Options)
func WithDatabase ¶ added in v1.2.1
func WithDialect ¶ added in v1.2.1
func WithTLS ¶ added in v1.2.11
func WithTLS(fn RegisterTLSFunc) Option
type RegisterTLSFunc ¶ added in v1.2.11
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
func (*Rows) Columns ¶ added in v1.2.1
func (rows *Rows) Columns() []ColumnType
func (Rows) MarshalAvro ¶ added in v1.2.41
func (Rows) MarshalJSON ¶ added in v0.9.6
func (*Rows) Scan ¶
Scan element of dst must be scanned. in dac case, when field is json kind and type does not implement sql.NullJson, then wrap field value by sql.NullJson
func (*Rows) UnmarshalAvro ¶ added in v1.2.41
func (*Rows) UnmarshalJSON ¶ added in v0.9.6
Source Files ¶
Click to show internal directories.
Click to hide internal directories.