mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-24 11:39:18 -05:00
adding type info test
This commit is contained in:
@@ -32,7 +32,7 @@ type multilinestringType struct {
|
||||
|
||||
var _ TypeInfo = (*multilinestringType)(nil)
|
||||
|
||||
var MultiLineStringtype = &multilinestringType{sql.MultiLineStringType{}}
|
||||
var MultiLineStringType = &multilinestringType{sql.MultiLineStringType{}}
|
||||
|
||||
// ConvertNomsValueToValue implements TypeInfo interface.
|
||||
func (ti *multilinestringType) ConvertNomsValueToValue(v types.Value) (interface{}, error) {
|
||||
|
||||
@@ -355,9 +355,10 @@ func generateTypeInfoArrays(t *testing.T) ([][]TypeInfo, [][]types.Value) {
|
||||
{Int8Type, Int16Type, Int24Type, Int32Type, Int64Type},
|
||||
{JSONType},
|
||||
{LineStringType},
|
||||
{MultiPointType},
|
||||
{PointType},
|
||||
{PolygonType},
|
||||
{MultiPointType},
|
||||
{MultiLineStringType},
|
||||
{GeometryType},
|
||||
generateSetTypes(t, 16),
|
||||
{TimeType},
|
||||
@@ -392,9 +393,10 @@ func generateTypeInfoArrays(t *testing.T) ([][]TypeInfo, [][]types.Value) {
|
||||
{json.MustTypesJSON(`null`), json.MustTypesJSON(`[]`), json.MustTypesJSON(`"lorem ipsum"`), json.MustTypesJSON(`2.71`),
|
||||
json.MustTypesJSON(`false`), json.MustTypesJSON(`{"a": 1, "b": []}`)}, //JSON
|
||||
{types.LineString{SRID: 0, Points: []types.Point{{SRID: 0, X: 1, Y: 2}, {SRID: 0, X: 3, Y: 4}}}}, // LineString
|
||||
{types.MultiPoint{SRID: 0, Points: []types.Point{{SRID: 0, X: 1, Y: 2}, {SRID: 0, X: 3, Y: 4}}}}, // MultiPoint
|
||||
{types.Point{SRID: 0, X: 1, Y: 2}}, // Point
|
||||
{types.Polygon{SRID: 0, Lines: []types.LineString{{SRID: 0, Points: []types.Point{{SRID: 0, X: 0, Y: 0}, {SRID: 0, X: 0, Y: 1}, {SRID: 0, X: 1, Y: 1}, {SRID: 0, X: 0, Y: 0}}}}}}, // Polygon
|
||||
{types.Polygon{SRID: 0, Lines: []types.LineString{{SRID: 0, Points: []types.Point{{SRID: 0, X: 0, Y: 0}, {SRID: 0, X: 0, Y: 1}, {SRID: 0, X: 1, Y: 1}, {SRID: 0, X: 0, Y: 0}}}}}}, // Polygon
|
||||
{types.MultiPoint{SRID: 0, Points: []types.Point{{SRID: 0, X: 1, Y: 2}, {SRID: 0, X: 3, Y: 4}}}}, // MultiPoint
|
||||
{types.MultiLineString{SRID: 0, Lines: []types.LineString{{SRID: 0, Points: []types.Point{{SRID: 0, X: 0, Y: 0}, {SRID: 0, X: 0, Y: 1}, {SRID: 0, X: 1, Y: 1}, {SRID: 0, X: 0, Y: 0}}}}}}, // Polygon
|
||||
{types.Geometry{Inner: types.Point{SRID: 0, X: 1, Y: 2}}}, // Geometry holding a Point
|
||||
{types.Uint(1), types.Uint(5), types.Uint(64), types.Uint(42), types.Uint(192)}, //Set
|
||||
{types.Int(0), types.Int(1000000 /*"00:00:01"*/), types.Int(113000000 /*"00:01:53"*/), types.Int(247019000000 /*"68:36:59"*/), types.Int(458830485214 /*"127:27:10.485214"*/)}, //Time
|
||||
|
||||
Reference in New Issue
Block a user