1 2 3 4 | buildWhere( config = list(a='foo', b=20, c=c('one','two','three'), d = 1:9) )
buildWhere( config = list(a='foo', b=20, c=c('one','two','three'), d = 1:9),
other_clause = '(name = "jimmy" or name = "johnny")',
suffix='limit 100' )
|
config |
List of named values to be included in the where clause. Supports caracter and numeric classes, using in() syntax for those that are length > 1. |
other_clause |
An arbitrary clause that is prepended to the list of clauses that are 'AND'ed together to form the where statement |
suffix |
Arbitrary text that is appended to the where clause after it has been generated. For example 'limit 100' or 'order by id' |
buildWhere
is a utility function builds up a where clause using a passes list with named values.
Values of different types require different handling with respect to quotation marks and valus that are arrays
are turned into in( ... ) clauses. In the corner case where nothing is passed in, it returns empty string,
so it should be friendly to concatenation to a select statement regardless of whether there are values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.