#include "sqltable.h"

Csqltable::Csqltable(string TableName)
{
	this->TableName = TableName;
}

Csqltable::Csqltable(int ncols, int nrows)
{
	this->ncols = ncols;
	this->nrows = nrows;

	resize_matrix(ncols, nrows);
}

Csqltable::Csqltable(string TableName, int ncols, int nrows)
{
	this->TableName = TableName;
	this->ncols = ncols;
	this->nrows = nrows;

	resize_matrix(ncols, nrows);
}
//---------------------------------------------------------

Csqltable::~Csqltable(void)
{}


//---------------------------------------------------------

void Csqltable::resize_matrix(int ncols, int nrows)
{
	fieldname.resize(ncols);
	fieldtype.resize(ncols);
	fieldtypeInt.resize(ncols);
	constraints.resize(ncols);

	matrix.resize(ncols);
	for (int i = 0; i < ncols; i++)
		matrix[i].resize(nrows);
}
//---------------------------------------------------------
