public static function applyUnnamedParameters(statement:SQLStatement, ... parameters):void
Provides a mechanism allowing automated substitution of unnamed parameters
specified in a SQLStatement.text
value, with an arbitrary list
of parameters.
Parameters
| statement:SQLStatement — SQLStatement from which unnamed parameters are to be replaced
|
|
| ... parameters — arbitrary values to replace unnamed parameters
|
Example
The following example demonstrates a typical implementation
of
by which the unnamed parameters:
?, ?, ? are substituted with the values 'foo', 'bar', 100
var statement:SQLStatement = new SQLStatement();
statement.text = "INSERT INTO foo VALUES(?, ?) WHERE id = ?";;
SQLStatementHelper.applyUnnamedParameters( statement, "foo","bar", 100 );
// INSERT INTO 'foo' VALUES('foo', 'bar') WHERE id=100