package engine type Table struct { Name string Columns []Column Rows []Row } type ColumnFlag uint32 const ( PRIMARY_KEY ColumnFlag = 1 << iota FOREIGN_KEY NOT_NULL NONE ColumnFlag = 0 ) func (v ColumnFlag) Has(flag ColumnFlag) bool { return v&flag == flag } type ColumnType uint32 const ( TEXT ColumnType = iota INTEGER REAL BLOB ) type Column struct { Type ColumnType Name string Reference *Column Flags ColumnFlag } type Row struct { // This should be map but to Column so its always the right Column but for testing this is a slice now Values []string }