This abstract class defines the highest level functionality that all database
connections supported by CH provide. Inputs and outputs are specified as
POJOs, but they are all Construct compatible, and can easily be converted
with the static methods in Construct.
Note to subclasses: If prepared queries are more efficiently handled
directly in the particular implementation, this method can be overridden,
and raw_query and sanitize will not be used. This method should return a
java.util.Set if it is a select or other query that returns a result set,
or an Integer if it was an update query, which specifies the number of
results affected, or an int if it was an insert query with an
Performs a query to the database, using the specified connection. The
query should be a prepared query, that is, parameters to be filled in
should be question marks, and the objects in the params array will be
filled in to the question marks.
Looks through the query and escapes the parameters. The sanitize function
is used to actually create the sanitized parameter, but this function
handles the replacement. The returned string is the fully prepared query,
and is safe to run raw.