int main() { std::cout << B << "-------- " << std::setw(30) << std::left << "Simple storage" << " --------" << RES << std::endl; storeSimple(); loadSimple(); std::cout << B << "-------- " << std::setw(30) << std::left << "Derived object storage" << " --------" << RES << std::endl; storeVirt(); loadVirt(); return 0; }
QString BDTools::generateIdStr(QString table, QString field) { search("select max(" + field + ") from " + table); return QString::number(loadSimple(0).toInt() + 1); }