Get returns one instruction (with installs) by id.
(ctx context.Context, id int64)
| 160 | |
| 161 | // Get returns one instruction (with installs) by id. |
| 162 | func (s *Store) Get(ctx context.Context, id int64) (Instruction, error) { |
| 163 | if err := s.Init(ctx); err != nil { |
| 164 | return Instruction{}, err |
| 165 | } |
| 166 | db, err := s.open() |
| 167 | if err != nil { |
| 168 | return Instruction{}, err |
| 169 | } |
| 170 | defer db.Close() |
| 171 | return getTx(ctx, db, id) |
| 172 | } |
| 173 | |
| 174 | func getTx(ctx context.Context, q queryer, id int64) (Instruction, error) { |
| 175 | var in Instruction |