Пример #1
0
bool LS3DatastoreXML::addRecord(const QMap<QString, QVariant> &data, QString &uuid, bool createIDD) {
    LS3ElapsedAutoTimer timer("LS3DatastoreXML::addRecord(map, "+uuid+" ...)");
    if (!dbIsLoaded()) return false;
    int row=dbInsertNoMoveCursor(data);
    if (row>=0) {
        if (createIDD) {
            setField(row, "id", createID(row, getPluginServices()->GetIDType()));
        }
        uuid=getField(row, "uuid").toString();
    }
    return row>=0;
}
	Record* getRecordFromInput(){
		std::vector < std::vector<std::string> > fieldsList = parseInput();

		ID* id = new ID(DIMENSIONS);
		std::vector<bool> visited(DIMENSIONS, false);

		createID(fieldsList, id, visited);

		fillMissingData(visited, id);

		return new Record(id);
	}
Пример #3
0
bool LS3DatastoreXML::addRecord(const QMap<QString, QVariant>& data, bool moveToRecord, bool createIDD) {
    LS3ElapsedAutoTimer timer("LS3DatastoreXML::addRecord(map, ...)");
    if (!dbIsLoaded()) return false;
    int row=dbInsertNoMoveCursor(data);
    if (row>=0) {
        if (createIDD) {
            setField(row, "id", createID(row, getPluginServices()->GetIDType()));
        }
        if (moveToRecord) {
            dbMove(row);
        }
    }
    return row>=0;
}
Пример #4
0
QString LS3Datastore::createID(int record, QString type) {
    return createID(record, QString2IDType(type));
}
Пример #5
0
QString LS3Datastore::createIDForCurrentRecord(QString type) {
    return createID(currentRecordNum(), QString2IDType(type));
}
Пример #6
0
QString LS3Datastore::createIDForCurrentRecord(IDType type) {
    return createID(currentRecordNum(), type);
}