#include "greendb/greenenv.hh"
#include "greendb/debug.hh"
#include "greendb/table.hh"
#include "greendb/schema.hh"
#include "greendb/typemap.hh"
#include "greendb/row.hh"
#include <malloc.h>

int
main (int argc, char **argv) {
	static GreenEnv ge(".");
	char* table_name = argv[1];
	ge.open ();
	Table table (table_name, ge);
	Schema* schema = table.get_schema();
	std::cout <<table.get_name()<<std::endl;
	for (size_t i = 0; i < schema->size() ;i++) {
		int type = schema->get_type(i);
		const char* name = schema->get_name(i);
		std::cout<<i<<") "<<type<<"\t"<<name<<std::endl;
	}
	table.close();
	ge.close();
	return 0;
}


syntax highlighted by Code2HTML, v. 0.9.1