(ctx context.Context)
| 89 | } |
| 90 | |
| 91 | func (d *DB) Graphs(ctx context.Context) ([]*db.Graph, error) { |
| 92 | gs, err := d.q.Graphs(ctx) |
| 93 | if err != nil { |
| 94 | return nil, fmt.Errorf("failed to load graphs: %w", err) |
| 95 | } |
| 96 | return convSlice(gs, toGraph), nil |
| 97 | } |
| 98 | func (d *DB) CreateGraph(ctx context.Context, name string) (db.GraphID, db.Tx, error) { |
| 99 | id := uuid.NewString() |
| 100 | tx, err := d.q.CreateGraph(ctx, sqlitedb.CreateGraphParams{ |