Loggest thy stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
998 B

  1. // Code generated by sqlc. DO NOT EDIT.
  2. // versions:
  3. // sqlc v1.13.0
  4. // source: project.sql
  5. package mysqlcore
  6. import (
  7. "context"
  8. )
  9. const listProjectEntries = `-- name: ListProjectEntries :many
  10. SELECT id, name, status FROM project
  11. WHERE scope_id = ?
  12. ORDER BY status, created_time
  13. `
  14. type ListProjectEntriesRow struct {
  15. ID int `json:"id"`
  16. Name string `json:"name"`
  17. Status int `json:"status"`
  18. }
  19. func (q *Queries) ListProjectEntries(ctx context.Context, scopeID int) ([]ListProjectEntriesRow, error) {
  20. rows, err := q.query(ctx, q.listProjectEntriesStmt, listProjectEntries, scopeID)
  21. if err != nil {
  22. return nil, err
  23. }
  24. defer rows.Close()
  25. items := []ListProjectEntriesRow{}
  26. for rows.Next() {
  27. var i ListProjectEntriesRow
  28. if err := rows.Scan(&i.ID, &i.Name, &i.Status); err != nil {
  29. return nil, err
  30. }
  31. items = append(items, i)
  32. }
  33. if err := rows.Close(); err != nil {
  34. return nil, err
  35. }
  36. if err := rows.Err(); err != nil {
  37. return nil, err
  38. }
  39. return items, nil
  40. }