Project

General

Profile

Bug #1249 ยป wt_alias.cpp

Mike Trinkala, 04/21/2012 01:45 AM

 
#include <Wt/Dbo/Dbo>
#include <Wt/Dbo/backend/Sqlite3>

#include <string>
#include <vector>

using namespace std;
namespace dbo = Wt::Dbo;

int main(int argc, char **argv)
{
dbo::Session session;
dbo::backend::Sqlite3 sqlite3(":memory:");
session.setConnection(sqlite3);

dbo::Query<int> query = session.query<int>("select count() as cnt");
vector<dbo::FieldInfo> fields = query.fields();
vector<dbo::FieldInfo>::iterator it, end = fields.end();
for(it = fields.begin(); it != end; ++it) {
cout << "name: " << (*it).name() << endl;
}
}
    (1-1/1)