12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- package operations
- type DBOperations interface {
- BeginTransaction() TransactionDBOperations
-
- BaseDBOperations
- }
- type TransactionDBOperations interface {
- BaseDBOperations
- RollbackTransaction()
- CommitTransaction()
- }
- type EventDBOperations interface {
- RollbackEvent()
- CommitEvent()
-
- EventRows(table string, keys []string, pageSize int, pageNo string)
- Replay(table string, keys []string)
- }
- type BaseDBOperations interface {
-
- Table(name string, args ...any) DBOperations
-
- NewSession() DBOperations
-
-
-
-
- Raw(sql string, values ...any) DBOperations
-
- Select(query string, args ...any) DBOperations
- Joins(query string, args ...any) DBOperations
- Where(conditions *Conditions) DBOperations
- Or(conditions *Conditions) DBOperations
- Having(conditions *Conditions) DBOperations
- GroupBy(groupBy string) DBOperations
- OrderBy(orderBy string) DBOperations
- Paging(pageNo int, pageSize int) DBOperations
-
- Create(tableRow *TableRow) error
- CreateBatch(tableRows []TableRow) error
- Delete() error
- Updates(newTableRow *TableRow) error
- UpdatesWithRowsAffected(newTableRow *TableRow) (int64, error)
-
- Rows(pageNo int, pageSize int) ([]TableRow, error)
- Row() (*TableRow, error)
-
- Count(count *int64) error
- CheckExist() (bool, error)
- CheckHasOnlyOne() (bool, error)
- }
|