/** * @brief Converts to QVariantMap */ QVariant ConnectionSettings::toVariant() const { QVariantMap map; map.insert("connectionName", QtUtils::toQString(connectionName())); map.insert("serverHost", QtUtils::toQString(serverHost())); map.insert("serverPort", serverPort()); map.insert("defaultDatabase", QtUtils::toQString(defaultDatabase())); map.insert("isReplicaSet", isReplicaSet()); if (isReplicaSet()) { map.insert("replicaSet", _replicaSetSettings->toVariant()); } #ifdef MONGO_SSL SSLInfo infl = _info.sslInfo(); map.insert("sslEnabled", infl._sslSupport); map.insert("sslPemKeyFile", QtUtils::toQString(infl._sslPEMKeyFile)); #endif QVariantList list; for (QList<CredentialSettings *>::const_iterator it = _credentials.begin(); it != _credentials.end(); ++it) { CredentialSettings *credential = *it; list.append(credential->toVariant()); } map.insert("credentials", list); map.insert("ssh", _sshSettings->toVariant()); map.insert("ssl", _sslSettings->toVariant()); map.insert("uuid", _uuid); return map; }
bool NCSqlQuery::rollbackTransaction( ) { return defaultDatabase().rollback(); }
bool NCSqlQuery::commitTransaction( ) { return defaultDatabase().commit(); }
bool NCSqlQuery::beginTransaction( ) { return defaultDatabase().transaction(); }