NewJSONQueryResponseWriter creates a new JSONQueryResponseWriter.
(nQueries int)
| 315 | |
| 316 | // NewJSONQueryResponseWriter creates a new JSONQueryResponseWriter. |
| 317 | func NewJSONQueryResponseWriter(nQueries int) QueryResponseWriter { |
| 318 | return &JSONQueryResponseWriter{ |
| 319 | response: queryCom.AQLResponse{ |
| 320 | Results: make([]queryCom.AQLQueryResult, nQueries), |
| 321 | }, |
| 322 | statusCode: http.StatusOK, |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | // ReportError writes the error of the query to the response. |
| 327 | func (w *JSONQueryResponseWriter) ReportError(queryIndex int, table string, err error, statusCode int) { |
no outgoing calls
no test coverage detected