#include "client.h"

int main ( int argc, char* argv[] ) {
  LDB* ldb = new LDB;
  try {
    ldb->open("School");
    ldb->begin_transaction();
    LDBobject x = ldb->query("select name from Instructors where ssn=35");
    cout << x << endl;
    LDBobject y = ldb->query("select e.name		                \
			      from e in Instructors,			\
				   c in e.teaches                       \
			     where e.dept.name='D2' order by e.name	");
    for(int i=0; i<y.size(); i++)
       cout << y.nth(i) << endl;
    ldb->commit_transaction();
    ldb->close();
  } catch (ServerError(m)) {
    cerr << m;
    ldb->close();
  };
};
