File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 6
6
7
7
package mapper
8
8
9
+ import "context"
10
+
9
11
type BaseMapper [T any ] interface {
10
- Insert (entity T ) int64
12
+ Insert (ctx context. Context , entity T ) int64
11
13
12
- InsertBatch (entities ... T ) (int64 , int64 )
14
+ InsertBatch (ctx context. Context , entities ... T ) (int64 , int64 )
13
15
14
- DeleteById (id any ) int64
16
+ DeleteById (ctx context. Context , id any ) int64
15
17
16
- DeleteBatchIds (ids []any ) int64
18
+ DeleteBatchIds (ctx context. Context , ids []any ) int64
17
19
18
- UpdateById (entity T ) int64
20
+ UpdateById (ctx context. Context , entity T ) int64
19
21
20
- SelectById (id any ) T
22
+ SelectById (ctx context. Context , id any ) T
21
23
22
- SelectBatchIds (ids []any ) []T
24
+ SelectBatchIds (ctx context. Context , ids []any ) []T
23
25
24
- SelectOne (entity T ) T
26
+ SelectOne (ctx context. Context , entity T ) T
25
27
26
- SelectCount (entity T ) int64
28
+ SelectCount (ctx context. Context , entity T ) int64
27
29
}
You can’t perform that action at this time.
0 commit comments