123456789101112131415 |
- package database
- import (
- "context"
- )
- type Database[T any, B any] interface {
- String() string
- Close() error
- Ping(ctx context.Context) error
- Exec(ctx context.Context, query string, args ...any) error
- Query(ctx context.Context, query string, args ...any) (T, error)
- Batch(ctx context.Context, table string, release bool) (B, error)
- }
|