Skip to content

Commit

Permalink
Delete prepared query using WriteOptions (#2417)
Browse files Browse the repository at this point in the history
  • Loading branch information
moofish32 authored and kyhavlov committed Nov 3, 2016
1 parent c06a107 commit cbf2874
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions api/prepared_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,18 @@ func (c *PreparedQuery) Get(queryID string, q *QueryOptions) ([]*PreparedQueryDe
}

// Delete is used to delete a specific prepared query.
func (c *PreparedQuery) Delete(queryID string, q *QueryOptions) (*QueryMeta, error) {
func (c *PreparedQuery) Delete(queryID string, q *WriteOptions) (*WriteMeta, error) {
r := c.c.newRequest("DELETE", "/v1/query/"+queryID)
r.setQueryOptions(q)
r.setWriteOptions(q)
rtt, resp, err := requireOK(c.c.doRequest(r))
if err != nil {
return nil, err
}
defer resp.Body.Close()

qm := &QueryMeta{}
parseQueryMeta(resp, qm)
qm.RequestTime = rtt
return qm, nil
wm := &WriteMeta{}
wm.RequestTime = rtt
return wm, nil
}

// Execute is used to execute a specific prepared query. You can execute using
Expand Down

0 comments on commit cbf2874

Please sign in to comment.