diff options
-rw-r--r-- | core/vm/sqlvm/schema/schema.go | 6 | ||||
-rw-r--r-- | core/vm/sqlvm/schema/schema_test.go | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/core/vm/sqlvm/schema/schema.go b/core/vm/sqlvm/schema/schema.go index 76c843387..993843105 100644 --- a/core/vm/sqlvm/schema/schema.go +++ b/core/vm/sqlvm/schema/schema.go @@ -48,13 +48,13 @@ const ( ) // Schema defines sqlvm schema struct. -type Schema []*Table +type Schema []Table // Table defiens sqlvm table struct. type Table struct { Name []byte - Columns []*Column - Indices []*Index + Columns []Column + Indices []Index } // Index defines sqlvm index struct. diff --git a/core/vm/sqlvm/schema/schema_test.go b/core/vm/sqlvm/schema/schema_test.go index 5d252ef85..8a9044857 100644 --- a/core/vm/sqlvm/schema/schema_test.go +++ b/core/vm/sqlvm/schema/schema_test.go @@ -65,9 +65,9 @@ func (s *SchemaTestSuite) TestEncodeAndDecodeColumn() { func (s *SchemaTestSuite) TestEncodeAndDecodeSchema() { schema := Schema{ - &Table{ + Table{ Name: []byte("test"), - Columns: []*Column{ + Columns: []Column{ { column: column{ Name: []byte("a"), @@ -78,7 +78,7 @@ func (s *SchemaTestSuite) TestEncodeAndDecodeSchema() { Default: true, }, }, - Indices: []*Index{ + Indices: []Index{ { Name: []byte("idx"), Attr: IndexAttrUnique, @@ -86,7 +86,7 @@ func (s *SchemaTestSuite) TestEncodeAndDecodeSchema() { }, }, }, - &Table{ + Table{ Name: []byte("test2"), }, } @@ -111,13 +111,13 @@ func (s *SchemaTestSuite) TestEncodeAndDecodeSchema() { for j := 0; j < len(table.Columns); j++ { column := table.Columns[j] column2 := table.Columns[j] - s.Require().Equal(*column, *column2) + s.Require().Equal(column, column2) } for j := 0; j < len(table.Indices); j++ { index := table.Indices[j] index2 := table2.Indices[j] - s.Require().Equal(*index, *index2) + s.Require().Equal(index, index2) } } } |