Get returns a Lock entity by its id.
(ctx context.Context, id int)
| 1442 | |
| 1443 | // Get returns a Lock entity by its id. |
| 1444 | func (c *LockClient) Get(ctx context.Context, id int) (*Lock, error) { |
| 1445 | return c.Query().Where(lock.ID(id)).Only(ctx) |
| 1446 | } |
| 1447 | |
| 1448 | // GetX is like Get, but panics if an error occurs. |
| 1449 | func (c *LockClient) GetX(ctx context.Context, id int) *Lock { |