Documentation
¶
Index ¶
- type CRUD
- func (r *CRUD[T, I]) Create(ctx context.Context, e *T) (sql.Result, error)
- func (r *CRUD[T, I]) Delete(ctx context.Context, id I) (sql.Result, error)
- func (r *CRUD[T, I]) DeleteAll(ctx context.Context) (sql.Result, error)
- func (r *CRUD[T, I]) GetAll(ctx context.Context) ([]T, error)
- func (r *CRUD[T, I]) GetByID(ctx context.Context, id I) (T, error)
- func (r *CRUD[T, I]) GetByIDs(ctx context.Context, ids []I) ([]T, error)
- func (r *CRUD[T, I]) Update(ctx context.Context, id I, e *T) (sql.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRUD ¶
type CRUD[T any, I comparable] struct { // contains filtered or unexported fields }
func NewCRUD ¶
func NewCRUD[T any, I comparable](table table.Info, executor api.SQLExecutor, driver string, ) *CRUD[T, I]
Click to show internal directories.
Click to hide internal directories.