1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 20:20:58 +01:00

Before trying to install STLdb4 ....

This commit is contained in:
Wouter den Breejen 2007-07-03 13:50:16 +00:00
parent ad2b815b5e
commit c65c296ce0
5 changed files with 100 additions and 15 deletions

View file

@ -444,5 +444,53 @@ void Database::enumTable(const Transaction & txn, TableId table,
} catch (DbException e) { rethrow(e); }
}
void Database::setStateReferences(const Transaction & txn, TableId table,
const Path & statePath, const int revision, const Strings & references)
{
//get all previous StateReferences
StateReferences newReferences;
//Merge
newReferences[revision] = references;
//Insert
string data = "";
checkInterrupt();
try {
Db * db = getDb(table);
Dbt kt((void *) statePath.c_str(), statePath.length());
Dbt dt((void *) data.c_str(), data.length());
db->put(txn.txn, &kt, &dt, 0);
} catch (DbException e) { rethrow(e); }
}
bool Database::queryStateReferences(const Transaction & txn, TableId table,
const Path & statePath, Strings & references, int revision)
{
//TODO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
return false;
}
void Database::setStateRevisions(const Transaction & txn, TableId table,
const Path & statePath, const int revision, const RevisionNumbers & revisions)
{
//TODO
}
/*
bool Database::queryStateRevisions(const Transaction & txn, TableId table,
const Path & statePath, RevisionNumbers & revisions, int revision = -1)
{
//TODO
return false;
}*/
bool Database::queryAllStateRevisions(const Transaction & txn, TableId table,
const Path & statePath, RevisionNumbers & revisions)
{
//TODO
return false;
}
}