Query returns a query builder for Entity.
()
| 720 | |
| 721 | // Query returns a query builder for Entity. |
| 722 | func (c *EntityClient) Query() *EntityQuery { |
| 723 | return &EntityQuery{ |
| 724 | config: c.config, |
| 725 | ctx: &QueryContext{Type: TypeEntity}, |
| 726 | inters: c.Interceptors(), |
| 727 | } |
| 728 | } |
| 729 | |
| 730 | // Get returns a Entity entity by its id. |
| 731 | func (c *EntityClient) Get(ctx context.Context, id int) (*Entity, error) { |