Libraries anvil sql query

object query(string poolName, string querystring, [ object parameters, ... ] )
Executes a query in a given connection which is acquired from configured pool named 'poolName'. 'poolName' may also contains database catalog, separated with colon from the name of pool. For instance, "mypool:mycatalog".

'querystring' is parsed so that given parameters are embedded to placeholders in string.

Placeholders:
? Embeds next parameter according to its type (i.e. strings are escaped and quoted)
$ Embeds next parameter as it is (result of tostring())
Parameters poolName -  Name of connection pool, may contain database catalog
querystring -  query string
parameters -  to be embedded
Returns null if error occurred, ResultSet if 'querystring' was an select query (or similar), otherwise returns update count as integer.
Throws AcquireError -  If connection could not be retrieved
SQLError -  If SQL error occured