Documentation ¶
Index ¶
- Constants
- type AutoMigrateBatchRequest
- type AutoMigrateItem
- type AutoMigrateRequest
- type Client
- type ColumnCompare
- type CommonCountEventRequest
- type CommonCountRequest
- type CommonEventQueryRequest
- type CommonQueryRequest
- type CountEventByKeysRequest
- type CountWhereRequest
- type DeleteBatchRequest
- type DeleteItem
- type DeleteRequest
- type DeleteTableRowItem
- type EventInfo
- type EventQueryByKeysRequest
- type InsertBatchRequest
- type InsertItem
- type InsertRequest
- type InsertTableRowItem
- type QueryByKeysRequest
- type QueryByWhereAndOrderByRequest
- type ReplayRequest
- type TableModelDescribe
- type TableModelField
- type Transaction
- type TransactionFunc
- type UpdateRequest
Constants ¶
View Source
const ( DBRecordHasExist = "记录已存在" DBRecordNotExist = "记录不存在" )
View Source
const ( CompareEqual = "equal" CompareLike = "like" CompareNot = "not" CompareIn = "in" CompareNotIn = "notin" CompareLessThan = "lt" CompareGreaterThan = "gt" CompareLessThanAndEqual = "lte" CompareGreaterThanAndEqual = "gte" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoMigrateBatchRequest ¶
type AutoMigrateBatchRequest struct {
Items []AutoMigrateItem
}
type AutoMigrateItem ¶
type AutoMigrateItem struct { TablePrefixWithSchema string Version string TableModelDescribe TableModelDescribe }
type AutoMigrateRequest ¶
type AutoMigrateRequest struct {
AutoMigrateItem
}
type Client ¶
type Client interface { AutoMigrate(request *AutoMigrateRequest) error AutoMigrateBatch(request *AutoMigrateBatchRequest) error Transaction(txFunc TransactionFunc) error Insert(request *InsertRequest) (string, error) InsertBatch(request *InsertBatchRequest) (string, error) Delete(request *DeleteRequest) (string, error) DeleteBatch(request *DeleteBatchRequest) (string, error) Update(request *UpdateRequest) (string, error) Replay(request *ReplayRequest) (string, error) QueryByWhereAndOrderBy(request *QueryByWhereAndOrderByRequest) (string, []map[string]any, int64, error) CommonQuery(request *CommonQueryRequest) (string, []map[string]any, int64, error) QueryByKeys(request *QueryByKeysRequest) (string, map[string]any, 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) 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) CountEventHistoryByKeys(request *CountEventByKeysRequest) (string, int64, error) CommonCountEventHistory(request *CommonCountEventRequest) (string, int64, error) }
type ColumnCompare ¶
type CommonCountEventRequest ¶
type CommonCountRequest ¶
type CommonCountRequest struct { TablePrefixWithSchema string Version string Where []ColumnCompare Or []ColumnCompare GroupBy []string Join string Having []ColumnCompare }
type CommonEventQueryRequest ¶
type CommonQueryRequest ¶
type CommonQueryRequest struct { TablePrefixWithSchema string Version string Select string Where []ColumnCompare OrderBy []string Or []ColumnCompare GroupBy []string Join string Having []ColumnCompare PageNo int PageSize int }
type CountEventByKeysRequest ¶
type CountWhereRequest ¶
type CountWhereRequest struct { TablePrefixWithSchema string Version string Where []ColumnCompare }
type DeleteBatchRequest ¶
type DeleteBatchRequest struct { Items []*DeleteTableRowItem UserID string }
type DeleteItem ¶
type DeleteRequest ¶
type DeleteTableRowItem ¶
type DeleteTableRowItem struct { TablePrefixWithSchema string Version string Items []*DeleteItem }
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 InsertItem ¶
type InsertRequest ¶
type InsertTableRowItem ¶
type InsertTableRowItem struct { TablePrefixWithSchema string Version string Items []*InsertItem }
type QueryByKeysRequest ¶
type ReplayRequest ¶
type TableModelDescribe ¶
type TableModelDescribe struct {
Fields []TableModelField `json:"fields"`
}
type TableModelField ¶
type Transaction ¶
type Transaction interface { InsertTx(request *InsertRequest) (string, error) InsertBatchTx(request *InsertBatchRequest) (string, error) DeleteTx(request *DeleteRequest) (string, error) DeleteBatchTx(request *DeleteBatchRequest) (string, error) UpdateTx(request *UpdateRequest) (string, error) End() error }
type TransactionFunc ¶
type TransactionFunc func(tx Transaction) error
Click to show internal directories.
Click to hide internal directories.