added: parameter 'l' to 'ls' function

added: Db::ItemQuery struct for querying items
changed: some refactoring (renamed some config variables)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@589 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-02-22 22:52:09 +00:00
parent 16e51cd4e5
commit 3702efc5be
29 changed files with 396 additions and 195 deletions

View File

@@ -29,7 +29,7 @@ void Db::ItemColumns::SetColumns(PGresult * r)
content = PQfnumber(r, "content");
content_type = PQfnumber(r, "content_type");
guest_name = PQfnumber(r, "guest_name");
static_auth = PQfnumber(r, "static_auth");
auth = PQfnumber(r, "auth");
}
@@ -51,7 +51,7 @@ void Db::ItemColumns::SetItem(PGresult * r, long row, Item & item)
if( content != -1 ) item.content = Db::AssertValue(r, row, content);
if( content_type != -1 ) item.content_type = static_cast<Item::ContentType>( atoi(Db::AssertValue(r, row, content_type)) );
if( guest_name != -1 ) item.guest_name = Db::AssertValue(r, row, guest_name);
if( static_auth != -1 ) item.static_auth = static_cast<Item::StaticAuth>( atoi(Db::AssertValue(r, row, static_auth)) );
if( auth != -1 ) item.auth = static_cast<Item::Auth>( atoi(Db::AssertValue(r, row, auth)) );
}