Queries
The queries
table contains data about complex queries, saved wall chart queries, and cached queries in the organization.
This table can be used to determine what complex and saved queries exist and which campaigns they are in, as well as metadata about the query such as when it was created.
Columns
Column Name | Description | Type | Nullable |
---|---|---|---|
id | The numerical identifier of the object. | INT8 | No |
user_id | The numerical identifier of the user that created this query. Relates to the id column in the users table. |
INT8 | No |
campaign_id | The numerical identifier of the campaign this query is in. Relates to the id column in the campaigns table. |
INT8 | No |
name | The name of this query. Represents the name of the query as entered by the user if the query is a complex query or a saved wall chart query, system generated otherwise. | VARCHAR | No |
body | A JSON representation of the query parameters. | JSON | No |
created_at | The UTC timestamp when this object was created. | TIMESTAMP | No |
updated_at | The UTC timestamp when this object was last updated. | TIMESTAMP | No |
temporary | Whether this is a temporary, cached query or a saved wall chart or complex query. | BOOL | Yes |
public | Whether a saved or complex query is available to other users in the campaign or not. | BOOL | Yes |
query_type | The type of query. 0 for simple (ie. saved wall chart), 1 for complex. |
INT4 | Yes |
default_query | Whether the query is the default one for the campaign or not. | BOOL | Yes |