

#include "SqlSchema_CREATE.hpp"

using namespace std;

SqlSchema_CREATE::SqlSchema_CREATE(void)
{
   appendRow();
}

// skip first '(' and last ',' character
// FIXME this is no good
string skfl(string str)
{
   return str.substr(1, str.size() - 2);
}


vector<string> SqlSchema_CREATE::getCREATE(void)
{
   vector<string> vCREATE{
    /*  {"DROP TABLE IF EXISTS headers CASCADE; CREATE TABLE headers (" + skfl(m_values[headers])},
         {"DROP TABLE IF EXISTS cubeboundsgalactic CASCADE; CREATE TABLE cubeboundsgalactic (" + skfl(m_values[boundsgal])},
         {"DROP TABLE IF EXISTS cubeboundsicrs CASCADE; CREATE TABLE cubeboundsicrs (" + skfl(m_values[boundsicrs])},
         {"DROP TABLE IF EXISTS verticesgalactic CASCADE; CREATE TABLE verticesgalactic (" + skfl(m_values[verticesgal])},
         {"DROP TABLE IF EXISTS verticesicrs CASCADE; CREATE TABLE verticesicrs (" + skfl(m_values[verticesicrs])},
    */
         {"DROP TABLE IF EXISTS obscore CASCADE; CREATE TABLE obscore " + skl(m_values[obscore])},
   };
   return vCREATE;
}

