Documentation ¶
Index ¶
- func ColumnCreateUserID(tableRow *TableRow) string
- func ColumnCreatedTime(tableRow *TableRow) time.Time
- func ColumnLastEventTime(tableRow *TableRow) time.Time
- func ColumnLastUpdateUserID(tableRow *TableRow) string
- func FormatColumnCreatedTime(tableRow *TableRow, format string) string
- func FormatColumnLastEventTime(tableRow *TableRow, format string) string
- func IsErrorDBRecordHasExist(err error) bool
- func IsErrorDBRecordNotExist(err error) bool
- type AutoMigrateItem
- type AutoMigrateRequest
- type Clause
- func (clause *Clause) Common(query string, args ...any) *Clause
- func (clause *Clause) Equal(columnName string, value any) *Clause
- func (clause *Clause) GreaterThan(columnName string, value any) *Clause
- func (clause *Clause) GreaterThanAndEqual(columnName string, value any) *Clause
- func (clause *Clause) In(columnName string, value any) *Clause
- func (clause *Clause) LessThan(columnName string, value any) *Clause
- func (clause *Clause) LessThanAndEqual(columnName string, value any) *Clause
- func (clause *Clause) Like(columnName string, value any) *Clause
- func (clause *Clause) Not(columnName string, value any) *Clause
- func (clause *Clause) NotIn(columnName string, value any) *Clause
- func (clause *Clause) ToJson() ([]byte, error)
- type Client
- type CommonCountEventRequest
- type CommonCountRequest
- type CommonEventQueryRequest
- type CommonQueryRequest
- type CountEventByKeysRequest
- type CountWhereRequest
- type DeleteRequest
- type DeleteWhereRequest
- type EventInfo
- type EventQueryByKeysRequest
- type InsertBatchRequest
- type InsertRequest
- type InsertTableRowItem
- type KeyValue
- type QueryByKeysRequest
- type QueryByWhereAndOrderByRequest
- type ReplayRequest
- type TableRow
- func (tableRow *TableRow) AddColumnValueBool(columnName string, value bool) *TableRow
- func (tableRow *TableRow) AddColumnValueFloat32(columnName string, value float32) *TableRow
- func (tableRow *TableRow) AddColumnValueFloat64(columnName string, value float64) *TableRow
- func (tableRow *TableRow) AddColumnValueInt(columnName string, value int) *TableRow
- func (tableRow *TableRow) AddColumnValueInt16(columnName string, value int16) *TableRow
- func (tableRow *TableRow) AddColumnValueInt32(columnName string, value int32) *TableRow
- func (tableRow *TableRow) AddColumnValueInt64(columnName string, value int64) *TableRow
- func (tableRow *TableRow) AddColumnValueInt8(columnName string, value int8) *TableRow
- func (tableRow *TableRow) AddColumnValueString(columnName string, value string) *TableRow
- func (tableRow *TableRow) AddColumnValueTime(columnName string, value time.Time) *TableRow
- func (tableRow *TableRow) AddColumnValueUint(columnName string, value uint) *TableRow
- func (tableRow *TableRow) AddColumnValueUint16(columnName string, value uint16) *TableRow
- func (tableRow *TableRow) AddColumnValueUint32(columnName string, value uint32) *TableRow
- func (tableRow *TableRow) AddColumnValueUint64(columnName string, value uint64) *TableRow
- func (tableRow *TableRow) AddColumnValueUint8(columnName string, value uint8) *TableRow
- func (tableRow *TableRow) ColumnValueBool(columnName string) bool
- func (tableRow *TableRow) ColumnValueFloat32(columnName string) float32
- func (tableRow *TableRow) ColumnValueFloat64(columnName string) float64
- func (tableRow *TableRow) ColumnValueInt(columnName string) int
- func (tableRow *TableRow) ColumnValueInt16(columnName string) int16
- func (tableRow *TableRow) ColumnValueInt32(columnName string) int32
- func (tableRow *TableRow) ColumnValueInt64(columnName string) int64
- func (tableRow *TableRow) ColumnValueInt8(columnName string) int8
- func (tableRow *TableRow) ColumnValueString(columnName string) string
- func (tableRow *TableRow) ColumnValueTime(columnName string) time.Time
- func (tableRow *TableRow) ColumnValueUint(columnName string) uint
- func (tableRow *TableRow) ColumnValueUint16(columnName string) uint16
- func (tableRow *TableRow) ColumnValueUint32(columnName string) uint32
- func (tableRow *TableRow) ColumnValueUint64(columnName string) uint64
- func (tableRow *TableRow) ColumnValueUint8(columnName string) uint8
- func (tableRow *TableRow) FromDSPInfoData(infoData *response.InfoData) error
- func (tableRow *TableRow) SnapshotColumnValue(prefix string, version string, columnName string) any
- func (tableRow *TableRow) ToDPSTableRow() (*request.TableRow, error)
- func (tableRow *TableRow) ToMap() map[string]any
- type Transaction
- type TransactionFunc
- type UpdateRequest
- type UpdateWhereRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnCreateUserID ¶ added in v1.6.1
func ColumnCreatedTime ¶ added in v1.6.1
func ColumnLastEventTime ¶ added in v1.6.1
func ColumnLastUpdateUserID ¶ added in v1.6.1
func FormatColumnCreatedTime ¶ added in v1.6.1
func FormatColumnLastEventTime ¶ added in v1.6.1
func IsErrorDBRecordHasExist ¶
func IsErrorDBRecordNotExist ¶
Types ¶
type AutoMigrateItem ¶
type AutoMigrateRequest ¶
type AutoMigrateRequest struct {
Items []AutoMigrateItem
}
type Clause ¶ added in v1.6.0
type Clause struct {
// contains filtered or unexported fields
}
func (*Clause) GreaterThan ¶ added in v1.6.0
func (*Clause) GreaterThanAndEqual ¶ added in v1.6.0
func (*Clause) LessThanAndEqual ¶ added in v1.6.0
type Client ¶
type Client interface { AutoMigrate(request *AutoMigrateRequest) error Transaction(txFunc TransactionFunc) error Insert(request *InsertRequest) (string, error) InsertBatch(request *InsertBatchRequest) (string, error) Delete(request *DeleteRequest) (string, error) DeleteWhere(request *DeleteWhereRequest) (string, error) Update(request *UpdateRequest) (string, error) UpdateWhere(request *UpdateWhereRequest) (string, error) Replay(request *ReplayRequest) (string, error) QueryByWhereAndOrderBy(request *QueryByWhereAndOrderByRequest) (string, []TableRow, int64, error) CommonQuery(request *CommonQueryRequest) (string, []TableRow, int64, error) QueryOnlyByWhereAndOrderBy(request *QueryByWhereAndOrderByRequest) (string, []TableRow, error) CommonQueryOnly(request *CommonQueryRequest) (string, []TableRow, error) QueryByKeys(request *QueryByKeysRequest) (string, *TableRow, error) CountWhere(request *CountWhereRequest) (string, int64, error) CommonCount(request *CommonCountRequest) (string, int64, error) EventQueryByKeys(request *EventQueryByKeysRequest) (string, []EventInfo, int64, error) CommonEventQuery(request *CommonEventQueryRequest) (string, []EventInfo, int64, error) EventQueryOnlyByKeys(request *EventQueryByKeysRequest) (string, []EventInfo, error) CommonEventQueryOnly(request *CommonEventQueryRequest) (string, []EventInfo, error) CountEventByKeys(request *CountEventByKeysRequest) (string, int64, error) CommonCountEvent(request *CommonCountEventRequest) (string, int64, error) EventHistoryQueryByKeys(request *EventQueryByKeysRequest) (string, []EventInfo, int64, error) CommonEventHistoryQuery(request *CommonEventQueryRequest) (string, []EventInfo, int64, error) EventHistoryQueryOnlyByKeys(request *EventQueryByKeysRequest) (string, []EventInfo, error) CommonEventHistoryQueryOnly(request *CommonEventQueryRequest) (string, []EventInfo, error) CountEventHistoryByKeys(request *CountEventByKeysRequest) (string, int64, error) CommonCountEventHistory(request *CommonCountEventRequest) (string, int64, error) }
type CommonCountEventRequest ¶
type CommonCountRequest ¶
type CommonEventQueryRequest ¶
type CommonQueryRequest ¶
type CountEventByKeysRequest ¶
type CountWhereRequest ¶
type DeleteRequest ¶
type DeleteWhereRequest ¶ added in v1.6.6
type EventInfo ¶
type EventInfo struct { Key string Version string Operation string Value string CreatorID string CreateTime time.Time }
func FormEventInfo ¶
func FormEventInfoBatch ¶
type EventQueryByKeysRequest ¶
type InsertBatchRequest ¶
type InsertBatchRequest struct { Items []InsertTableRowItem UserID string }
type InsertRequest ¶
type InsertTableRowItem ¶
type KeyValue ¶ added in v1.8.0
type KeyValue struct {
// contains filtered or unexported fields
}
func NewKeyValue ¶ added in v1.8.0
func NewKeyValue() *KeyValue
type QueryByKeysRequest ¶
type ReplayRequest ¶
type TableRow ¶ added in v1.6.0
type TableRow struct {
// contains filtered or unexported fields
}
func FromDSPInfosData ¶ added in v1.6.0
func NewTableRow ¶ added in v1.6.0
func NewTableRow() *TableRow
func (*TableRow) AddColumnValueBool ¶ added in v1.6.0
func (*TableRow) AddColumnValueFloat32 ¶ added in v1.6.0
func (*TableRow) AddColumnValueFloat64 ¶ added in v1.6.0
func (*TableRow) AddColumnValueInt ¶ added in v1.6.0
func (*TableRow) AddColumnValueInt16 ¶ added in v1.6.0
func (*TableRow) AddColumnValueInt32 ¶ added in v1.6.0
func (*TableRow) AddColumnValueInt64 ¶ added in v1.6.0
func (*TableRow) AddColumnValueInt8 ¶ added in v1.6.0
func (*TableRow) AddColumnValueString ¶ added in v1.6.0
func (*TableRow) AddColumnValueTime ¶ added in v1.6.0
func (*TableRow) AddColumnValueUint ¶ added in v1.6.0
func (*TableRow) AddColumnValueUint16 ¶ added in v1.6.0
func (*TableRow) AddColumnValueUint32 ¶ added in v1.6.0
func (*TableRow) AddColumnValueUint64 ¶ added in v1.6.0
func (*TableRow) AddColumnValueUint8 ¶ added in v1.6.0
func (*TableRow) ColumnValueBool ¶ added in v1.6.0
func (*TableRow) ColumnValueFloat32 ¶ added in v1.6.0
func (*TableRow) ColumnValueFloat64 ¶ added in v1.6.0
func (*TableRow) ColumnValueInt ¶ added in v1.6.0
func (*TableRow) ColumnValueInt16 ¶ added in v1.6.0
func (*TableRow) ColumnValueInt32 ¶ added in v1.6.0
func (*TableRow) ColumnValueInt64 ¶ added in v1.6.0
func (*TableRow) ColumnValueInt8 ¶ added in v1.6.0
func (*TableRow) ColumnValueString ¶ added in v1.6.0
func (*TableRow) ColumnValueTime ¶ added in v1.6.0
func (*TableRow) ColumnValueUint ¶ added in v1.6.0
func (*TableRow) ColumnValueUint16 ¶ added in v1.6.0
func (*TableRow) ColumnValueUint32 ¶ added in v1.6.0
func (*TableRow) ColumnValueUint64 ¶ added in v1.6.0
func (*TableRow) ColumnValueUint8 ¶ added in v1.6.0
func (*TableRow) FromDSPInfoData ¶ added in v1.6.0
func (*TableRow) SnapshotColumnValue ¶ added in v1.9.2
func (*TableRow) ToDPSTableRow ¶ added in v1.6.0
type Transaction ¶
type Transaction interface { InsertTx(request *InsertRequest) (string, error) InsertBatchTx(request *InsertBatchRequest) (string, error) DeleteTx(request *DeleteRequest) (string, error) DeleteWhereTx(request *DeleteWhereRequest) (string, error) UpdateTx(request *UpdateRequest) (string, error) UpdateWhereTx(request *UpdateWhereRequest) (string, error) }
type TransactionFunc ¶
type TransactionFunc func(tx Transaction) error
type UpdateRequest ¶
Click to show internal directories.
Click to hide internal directories.