Beispiel #1
0
        /// <summary>
        /// Build the PreparedStatement
        /// </summary>
        /// <param name="session"></param>
        /// <param name="sqlStatement"></param>
        public void BuildPreparedStatement(ISqlMapSession session, string sqlStatement)
        {
            RequestScope request = new RequestScope( _dataExchangeFactory, session, _statement);

            PreparedStatementFactory factory = new PreparedStatementFactory( session, request, _statement, sqlStatement);
            _preparedStatement = factory.Prepare();
        }
Beispiel #2
0
 /// <summary>
 /// Build the PreparedStatement
 /// </summary>
 /// <param name="session"></param>
 /// <param name="commandText"></param>
 /// <param name="request"></param>
 public PreparedStatement BuildPreparedStatement(ISqlMapSession session, RequestScope request, string commandText)
 {
     if ( _preparedStatement == null )
     {
         lock(_synRoot)
         {
             if (_preparedStatement==null)
             {
                 PreparedStatementFactory factory = new PreparedStatementFactory( session, request, _statement, commandText);
                 _preparedStatement = factory.Prepare();
             }
         }
     }
     return _preparedStatement;
 }
Beispiel #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="session"></param>
 /// <param name="request"></param>
 /// <param name="sqlStatement"></param>
 /// <returns></returns>
 private PreparedStatement BuildPreparedStatement(ISqlMapSession session, RequestScope request, string sqlStatement)
 {
     PreparedStatementFactory factory = new PreparedStatementFactory( session, request, _statement, sqlStatement);
     return factory.Prepare();
 }