Packagecom.ericfeminella.sql.utils
Classpublic final class SQLStatementHelper

SQLStatementHelper is an all static utility class which provides a mechanism for substituting unnamed tokens specified in a raw statement with an arbitrary length of values.



Public Methods
 MethodDefined by
  
applyUnnamedParameters(statement:SQLStatement, ... parameters):void
[static] Provides a mechanism allowing automated substitution of unnamed parameters specified in a SQLStatement.text value, with an arbitrary list of parameters.
SQLStatementHelper
Method detail
applyUnnamedParameters()method
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:SQLStatementSQLStatement 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