Email: support@essaywriterpros.com
Call Us: US - +1 845 478 5244 | UK - +44 20 7193 7850 | AUS - +61 2 8005 4826

Choice of DBMS | Economic factors

Query Language

Overview

This section will provide a detailed reference and examples for the Pilosa Query Language (PQL). All PQL queries operate on a single index and are passed to Pilosa through the /index/INDEX_NAME/query endpoint. You may pass multiple PQL queries in a single request by simply concatenating the queries together – a space is not needed. The results format is always:

{"results":[...]}

There will be one item in the results array for each PQL query in the request. The type of each item in the array will depend on the type of query – each query in the reference below lists its result type.

Conventions

  • Angle Brackets <> denote required arguments
  • Square Brackets [] denote optional arguments
  • UPPER_CASE denotes a descriptor that will need to be filled in with a concrete value (e.g. ATTR_NAMESTRING)
Examples

Before running any of the example queries below, follow the instructions in the Getting Started section to set up an index and fields, and to populate them with some data.

The examples just show the PQL quer(ies) needed – to run the query Set(10, stargazer=1) against a server using curl, you would:

curl localhost:10101/index/repository/query \
     -X POST \
     -d 'Set(10, stargazer=1)'
{"results":[true]}

Arguments and Types

  • field The field specifies on which Pilosa field the query will operate. Valid field names are lower case strings; they start with an alphanumeric character, and contain only alphanumeric characters and _-. They must be 64 characters or less in length.
  • TIMESTAMP This is a timestamp in the following format YYYY-MM-DDTHH:MM (e.g. 2006-01-02T15:04)
  • UINT An unsigned integer (e.g. 42839)
  • BOOL A boolean value, true or false
  • ATTR_NAME Must be a valid identifier [A-Za-z][A-Za-z0-9._-]*
  • ATTR_VALUE Can be a string, float, integer, or bool.
  • CALL Any query
  • ROW_CALL Any query which returns a row, such as RowUnionDifferenceXorIntersectNot
  • []ATTR_VALUE Denotes an array of ATTR_VALUEs. (e.g. ["a", "b", "c"]