MCPcopy Create free account
hub / github.com/devfullcycle/goexpert / CreateCourse

Method CreateCourse

17-SQLC/internal/db/query.sql.go:42–51  ·  view source on GitHub ↗
(ctx context.Context, arg CreateCourseParams)

Source from the content-addressed store, hash-verified

40}
41
42func (q *Queries) CreateCourse(ctx context.Context, arg CreateCourseParams) error {
43 _, err := q.db.ExecContext(ctx, createCourse,
44 arg.ID,
45 arg.Name,
46 arg.Description,
47 arg.CategoryID,
48 arg.Price,
49 )
50 return err
51}
52
53const deleteCategory = `-- name: DeleteCategory :exec
54DELETE FROM categories WHERE id = ?

Callers

nothing calls this directly

Calls 1

ExecContextMethod · 0.65

Tested by

no test coverage detected