12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- package client
- import (
- "time"
- )
- const (
- columnCreateUserID = "create_user_id"
- columnLastUpdateUserID = "last_update_user_id"
- columnCreatedTime = "created_time"
- columnLastEventTime = "last_event_time"
- )
- func ColumnCreateUserID(tableRow *TableRow) string {
- return tableRow.ColumnValueString(columnCreateUserID)
- }
- func ColumnLastUpdateUserID(tableRow *TableRow) string {
- return tableRow.ColumnValueString(columnLastUpdateUserID)
- }
- func ColumnCreatedTime(tableRow *TableRow) time.Time {
- return tableRow.ColumnValueTime(columnCreatedTime)
- }
- func ColumnLastEventTime(tableRow *TableRow) time.Time {
- return tableRow.ColumnValueTime(columnLastEventTime)
- }
- func FormatColumnCreatedTime(tableRow *TableRow, format string) string {
- return tableRow.ColumnValueTime(columnCreatedTime).Format(format)
- }
- func FormatColumnLastEventTime(tableRow *TableRow, format string) string {
- return tableRow.ColumnValueTime(columnLastEventTime).Format(format)
- }
- 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)
- }
|