Function dropModel

Synopsis

#include <include/Database.h>

void dropModel()

Description

No description yet.

Mentioned in

Source

Lines 53-63 in src/Database.cpp. Line 67 in include/Database.h.

void Database::dropModel()
{
    if(!mx)
        throw std::logic_error("register bean classes first");
    Model mdl=mx->getModel();
    for(Model::iterator it=mdl.begin();it!=mdl.end();it++){
        Table& t=it->second;
        std::string query="DROP TABLE IF EXISTS "+t.name+";";
        dbExecQuery(query);
    }
}





Add Discussion as Guest

Log in