(ctx context.Context)
| 272 | ` |
| 273 | |
| 274 | func (q *Queries) Graphs(ctx context.Context) ([]Graph, error) { |
| 275 | rows, err := q.db.QueryContext(ctx, graphs) |
| 276 | if err != nil { |
| 277 | return nil, err |
| 278 | } |
| 279 | defer rows.Close() |
| 280 | var items []Graph |
| 281 | for rows.Next() { |
| 282 | var i Graph |
| 283 | if err := rows.Scan(&i.ID, &i.Name, &i.CurrentTx); err != nil { |
| 284 | return nil, err |
| 285 | } |
| 286 | items = append(items, i) |
| 287 | } |
| 288 | if err := rows.Close(); err != nil { |
| 289 | return nil, err |
| 290 | } |
| 291 | if err := rows.Err(); err != nil { |
| 292 | return nil, err |
| 293 | } |
| 294 | return items, nil |
| 295 | } |
| 296 | |
| 297 | const incrementTx = `-- name: IncrementTx :one |
| 298 | UPDATE graphs |
nothing calls this directly
no test coverage detected