<commit_before>package godata

import "../../regexutil"
import "../sqlconstants"

type GoData struct {
	goValue interface{}
}

type GoColumn struct {
	name    string
	sqlType string
	goType  string
}

type GoRow struct {
	row []GoData
}

type GoRows struct {
	rows []GoRow
}
type GoColumns struct {
	columns []GoColumn
}

type GoMetaTable struct {
	name     string
	dbVendor string
	columns  *GoColumns
}

type GoTable struct {
	metatable *GoMetaTable
	rows      *GoRow
}

func NewGoRow() *GoRow {
	return &GoRow{}
}

func NewGoColumns() *GoColumns {
	return &GoColumns{}
}

func (c *GoColumns) Add(name string, sqlType, goType string) *GoColumns {
	data := GoColumn{name, sqlType, goType}
	c.columns = append(c.columns, data)
	return c
}

func (r *GoRow) Add(value interface{}) *GoRow {
	data := GoData{value}
	r.row = append(r.row, data)
	return r
}

func NewMetaTableFromCreateStatement(stmt string) (*GoMetaTable, error) {

	table, columnArrayMap, err := regexutil.ParseCreateStatement(stmt)
	cols := NewGoColumns()

	if err != nil {<commit_msg>Simplifed Godata data structures.  Got ride of pointers to make it less confusing.   Will circle back to pointers if needed for a performance/mutability reasons.<commit_after>package godata

import "../../regexutil"

import "../sqlconstants"

type GoType struct {
	sqlType string
	goType  string
}

type GoRow []interface{}

type GoRows []GoRow

type GoColumns map[string]GoType

type GoSelect struct {
	columns GoColumns
	rows    GoRows
}

type GoMetaTable struct {
	name     string
	dbVendor string
	columns  GoColumns
}

type GoTable struct {
	metatable GoMetaTable
	rows      GoRow
}

func NewGoRow() GoRow {
	return GoRow{}
}

func NewGoRows() GoRows {
	return GoRows{}
}

func NewGoColumns() GoColumns {
	return GoColumns{}
}

func NewGoSelect(columns GoColumns, rows GoRows) GoSelect {
	return GoSelect{columns, rows}
}

func (s GoSelect) GetColumns() GoColumns {
	return s.columns
}

func (s GoSelect) GetRows() []GoRow {
	return s.rows
}

func (c GoColumns) Add(name, sqlType, goType string) GoColumns {
	t := GoType{sqlType, goType}
	c[name] = t
	return c
}

func (t GoType) GoType() string {
	return t.goType
}

func (t GoType) SqlType() string {
	return t.sqlType
}

func (m GoMetaTable) GetColumns() GoColumns {
	return m.columns
}

func NewMetaTableFromCreateStatement(stmt string) (*GoMetaTable, error) {

	table, columnArrayMap, err := regexutil.ParseCreateStatement(stmt)
	cols := NewGoColumns()

	if err != nil {
{'fraction_non_alphanumeric': 0.10326744655102864, 'fraction_numerical': 0.0, 'mean_word_length': 4.232067510548523, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3581184', 'n_tokens_mistral': 844, 'n_tokens_neox': 841, 'n_words': 262}