src/DB/impls.php
/**
     *
     * @param Context $context
     * @param $exceOnError boolean whether throw exceptions
     * @return ExecResult
     * @throws DBException|\Exception
     */
@param Context $context
@param $exceOnError boolean whether throw exceptions
@return ExecResult
@throws DBException|\Exception
@param Context $context @param $exceOnError boolean whether throw exceptions @return ExecResult @throws DBException| \ Exception
static public function exec($context) {
        try{
            $st = $context->connection->prepare($context->sql);
            $success = $st->execute($context->params);
            return new ExecResult($success, $context->connection, $st);
        }catch (\Exception $e){
            \PhpBoot\abort(new DBException($context, $e->getMessage(),$e->getCode()), ['sql'=>$context->sql, 'params'=>$context->params] );
            return null;
        }
    }
static public function exec ( $ context ) { try { $ st = $ context -> connection -> prepare ( $ context -> sql ) ; $ success = $ st -> execute ( $ context -> params ) ; return new ExecResult ( $ success , $ context -> connection , $ st ) ; } catch ( \ Exception $ e ) { \ PhpBoot \ abort ( new DBException ( $ context , $ e -> getMessage ( ) , $ e -> getCode ( ) ) , [ 'sql' => $ context -> sql , 'params' => $ context -> params ] ) ; return null ; } }
@param Context $context
 @param $exceOnError boolean whether throw exceptions
 @return ExecResult
 @throws DBException|\Exception
@param Context $context @param $exceOnError boolean whether throw exceptions @return ExecResult @throws DBException| \ Exception