Commit 3d442582 authored by jan.koester's avatar jan.koester
Browse files

it's better now

parent 22d15f12
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -48,11 +48,11 @@ namespace blogi {
            PQfinish(_dbconn);
        }

        int exec(SQL *sql,DBResult &res){
        int exec(SQL *sql,DBResult &res) override{
            PGresult *pres = PQexec(_dbconn,sql->c_str());
            int pstate=PQresultStatus(pres);

            if( ( pstate!=PGRES_COMMAND_OK && pstate != PGRES_EMPTY_QUERY && pstate != PGRES_TUPLES_OK)) {
            if(pstate != PGRES_TUPLES_OK) {
                 libhttppp::HTTPException exp;
                 exp[libhttppp::HTTPException::Critical] << PQerrorMessage(_dbconn);
                 PQclear(pres);
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ namespace blogi {
            sqlite3_close(_dbconn);
        }

        int exec(SQL *sql,DBResult &res){
        int exec(SQL *sql,DBResult &res) override{
            while( sqllock.exchange(true, std::memory_order_acquire) );
            char *ssql;
            ssql=new char[sql->length()];