( ctx context.Context, req *protos.TableColumnsRequest, )
| 186 | } |
| 187 | |
| 188 | func (h *FlowRequestHandler) GetColumns( |
| 189 | ctx context.Context, |
| 190 | req *protos.TableColumnsRequest, |
| 191 | ) (*protos.TableColumnsResponse, APIError) { |
| 192 | conn, connClose, err := connectors.GetByNameAs[connectors.GetSchemaConnector](ctx, nil, h.pool, req.PeerName) |
| 193 | if err != nil { |
| 194 | return nil, NewFailedPreconditionApiError(fmt.Errorf("failed to get schema connector: %w", err)) |
| 195 | } |
| 196 | defer connClose(ctx) |
| 197 | internalVersion, err := internal.PeerDBForceInternalVersion(ctx, nil) |
| 198 | if err != nil { |
| 199 | return nil, NewInternalApiError(fmt.Errorf("failed to get internal version: %w", err)) |
| 200 | } |
| 201 | return wrapErrorAsFailedPrecondition(conn.GetColumns(ctx, internalVersion, req.SchemaName, req.TableName)) |
| 202 | } |
| 203 | |
| 204 | func (h *FlowRequestHandler) GetColumnsTypeConversion( |
| 205 | ctx context.Context, |
nothing calls this directly
no test coverage detected