#include <iostream>
#include "sql.h"

using namespace std;
using namespace sql_tools;

int
main()
{
   Connection con("127.0.0.1", "mcoan", "abc123", "test");
   if(con) {
      Statement * st = con.get_statement();
      if(st) {
         ResultSet * rs = st->execute("SELECT name,age FROM person");
         if(rs) {
            while(rs->has_more()) {
               cout << rs->get_string(0) << ", " << rs->get_string(1) << endl;
               rs->next();
            }
            delete rs;   
         }
         delete st;
      }
   }
   return 0;
}
