Description Usage Arguments Details Value Author(s) See Also Examples
The Where function creates a WHERE clause that can be added to Query or FocalPointQuery objects.
1 |
variable |
A string matching the name of a Causata variable,
or a string representing a SQL WHERE clause, like |
operation |
An operator of class |
There are three basic usage patterns. These are all equivalent:
Where("variable.`variable-name` <> 'string value'")
Where("variable-name", "<> 'string value'")
Where("variable-name", NotEqualTo("string value")
The first form is a raw SQL WHERE clause, when using this form, you must correctly reference and escape the variable name, and the value for the operator you choose. The second form is (variable.name, operation). Using this form the variable name will be correctly referenced and escaped. However, the right hand side (the operation) must still be correctly escaped by you. The third form is (variable.name, operation.object). Using this form the variable name and operation are both correctly escaped. The allowable operations in the third form are as follows:
Operation | Arguments |
BeginningWith | Single value |
EqualTo | Single value |
NotEqualTo | Single value |
GreaterThan | Single value |
GreaterThanOrEqualTo | Single value |
LessThan | Single value |
LessThanOrEqualTo | Single value |
Like | Single value |
In | One or more comma-separated values |
An object of class Where used for building queries.
David Barker (support@causata.com)
1 2 3 4 | q <- FocalPointQuery("page-view") + Where("page-view-count", GreaterThan(10))
q <- FocalPointQuery("page-view") +
Where("total-spend", LessThanOrEqualTo(100)) +
Where("total-spend", GreaterThan(1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.