Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bf16a581

Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt

  • ID bf16a58184a2cba0d1a4d0311ee0c425f575439e
  • Vorgänger 886bdb22
  • Nachfolger 6d46f506

samples

Unterschiede anzeigen:

samples/example/main.cpp
EntityInstanceFactory::registerClass<Contact>();
EntityInstanceFactory::registerClass<Address>();
CuteEntityManager::EntityManager *e = new
// CuteEntityManager::EntityManager("QSQLITE",
// QDir::currentPath() + "/db.sqlite", "", "", "", 0, true);
CuteEntityManager::EntityManager("QSQLITE",
":memory:", "", "", "", "", true, "foreign_keys = ON");
qDebug() << "EntityManagerObjectName:" << e->objectName();
SqliteBackupProcessor *sqliteproc = new SqliteBackupProcessor(e->getDb(),
QDir::currentPath());
qWarning() << "DB Loaded:" << sqliteproc->sqliteDBMemFile(false, "db.sqlite");
QDir::currentPath() + "/db.sqlite", "", "", "", 0, true);
// CuteEntityManager::EntityManager("QSQLITE",
// ":memory:", "", "", "", "", true, "foreign_keys = ON");
// SqliteBackupProcessor *sqliteproc = new SqliteBackupProcessor(e->getDb(),
// QDir::currentPath());
// qWarning() << "DB Loaded:" << sqliteproc->sqliteDBMemFile(false, "db.sqlite");
qDebug() << "EntityManagerObjectName:" << e->objectName();
QThread *entityManager = new QThread();
e->moveToThread(entityManager);
qWarning() << "-----------------------------";
......
qWarning() << "-----------------------------";
e->remove(entityGroupFindPtr);
sqliteproc->sqliteDBMemFile(true, "db.sqlite");
//sqliteproc->sqliteDBMemFile(true, "db.sqlite");
qWarning() << "Duration:" << t.elapsed();
delete sqliteproc;
return 0;

Auch abrufbar als: Unified diff