prepare abstract method
Prepares a reusable statement from a query
.
query
must either be a String or a Sql object with types for
parameters already set. If the types for parameters are already known from
the query, a direct list of values can be passed for parameters
.
Otherwise, the type of parameter types must be made explicit. This can be
done by passing TypedValue objects in a list, or (if a string or
Sql.named value is passed for query
), via the names of declared
statements.
When the returned future completes, the statement must eventually be freed using Statement.dispose to avoid resource leaks.
Implementation
Future<Statement> prepare(Object /* String | Sql */ query);