Commit 3fde1f4c authored by Eric Myhre's avatar Eric Myhre

Correctly represent schema.StructRepresentation.

parent dc442aca
...@@ -151,8 +151,11 @@ var ( ...@@ -151,8 +151,11 @@ var (
type TypeStruct struct { type TypeStruct struct {
anyType anyType
tupleStyle bool // if true, ReprKind=Array instead of map (and optional fields are invalid!) // n.b. `Fields` is an (order-preserving!) map in the schema-schema;
fields []StructField // but it's a list here, with the keys denormalized into the value,
// because that's typically how we use it.
fields []StructField
representation StructRepresentation
} }
type StructField struct { type StructField struct {
name string name string
...@@ -161,6 +164,21 @@ type StructField struct { ...@@ -161,6 +164,21 @@ type StructField struct {
nullable bool nullable bool
} }
type StructRepresentation interface{ _StructRepresentation() }
func (StructRepresentation_Map) _StructRepresentation() {}
func (StructRepresentation_Tuple) _StructRepresentation() {}
func (StructRepresentation_StringPairs) _StructRepresentation() {}
func (StructRepresentation_StringJoin) _StructRepresentation() {}
type StructRepresentation_Map struct {
renames map[string]string
implicits map[string]interface{}
}
type StructRepresentation_Tuple struct{}
type StructRepresentation_StringPairs struct{ sep1, sep2 string }
type StructRepresentation_StringJoin struct{ sep string }
type TypeEnum struct { type TypeEnum struct {
anyType anyType
members []string members []string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment