Ejemplo n.º 1
0
        /**
         * Execute query.
         *
         * @return result set list
         * @throws SQLException SQL exception
         */
        public List <IStreamDataReader> ExecuteQuery()
        {
            var isExceptionThrown = ExecutorExceptionHandler.IsThrowException();
            SqlExecuteCallback <IStreamDataReader> executeCallback = new SqlExecuteCallback <IStreamDataReader>(DatabaseType, isExceptionThrown);

            executeCallback.OnSqlExecute += GetQueryEnumerator;
            return(ExecuteCallback(executeCallback));
        }
Ejemplo n.º 2
0
        public int ExecuteNonQuery()
        {
            bool isExceptionThrown = ExecutorExceptionHandler.IsThrowException();
            var  executeCallback   = new SqlExecuteCallback <int>(DatabaseType, isExceptionThrown);

            executeCallback.OnSqlExecute += DoExecuteNonQuery;
            var callback = ExecuteCallback(executeCallback);

            return(callback.Sum());
        }