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

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.13.0
// source: project.sql
package mysqlcore
import (
"context"
)
const listProjectEntries = `-- name: ListProjectEntries :many
SELECT id, name, status FROM project
WHERE scope_id = ?
ORDER BY status, created_time
`
type ListProjectEntriesRow struct {
ID int `json:"id"`
Name string `json:"name"`
Status int `json:"status"`
}
func (q *Queries) ListProjectEntries(ctx context.Context, scopeID int) ([]ListProjectEntriesRow, error) {
rows, err := q.query(ctx, q.listProjectEntriesStmt, listProjectEntries, scopeID)
if err != nil {
return nil, err
}
defer rows.Close()
items := []ListProjectEntriesRow{}
for rows.Next() {
var i ListProjectEntriesRow
if err := rows.Scan(&i.ID, &i.Name, &i.Status); err != nil {
return nil, err
}
items = append(items, i)
}
if err := rows.Close(); err != nil {
return nil, err
}
if err := rows.Err(); err != nil {
return nil, err
}
return items, nil
}