Skip to content

Add result lookup api #22

@zfarrell

Description

@zfarrell

Enhance the query api to include a result identifier which can be used to retrieve the original query and result:

Submit query

POST /query
{
 "sql": "select * from Users limit 1"
}

Query result

200 OK

{
  "result_id": "abc-123",     --- the new "result id"
  "columns": [
    "id",
    "name"
  ],
  "rows": [
    [ 1, "John Smith"]
  ],
  "row_count": 1,
  "execution_time_ms": 1
}

Retrieve result

GET /query/result/abc-123
{
   "sql": "select * from Users limit 1"
   "result": {
      "result_id": "abc-123", 
        "columns": [
          "id",
          "name"
        ],
        "rows": [
          [ 1, "John Smith"]
        ],
        "row_count": 1,
        "execution_time_ms": 1
      }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions