github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/types/types.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: sql/types/types.proto
     3  
     4  package types
     5  
     6  import proto "github.com/gogo/protobuf/proto"
     7  import fmt "fmt"
     8  import math "math"
     9  import geopb "github.com/cockroachdb/cockroach/pkg/geo/geopb"
    10  
    11  import github_com_cockroachdb_cockroach_pkg_geo_geopb "github.com/cockroachdb/cockroach/pkg/geo/geopb"
    12  import github_com_lib_pq_oid "github.com/lib/pq/oid"
    13  
    14  import io "io"
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
    26  
    27  // See the comment header for the T.Family method for more details.
    28  type Family int32
    29  
    30  const (
    31  	// BoolFamily is the family of boolean true/false types.
    32  	//
    33  	//   Canonical: types.Bool
    34  	//   Oid      : T_bool
    35  	//
    36  	// Examples:
    37  	//   BOOL
    38  	//
    39  	BoolFamily Family = 0
    40  	// IntFamily is the family of signed integer types.
    41  	//
    42  	//   Canonical: types.Int
    43  	//   Oid      : T_int8, T_int4, T_int2
    44  	//   Width    : 64, 32, 16
    45  	//
    46  	// Examples:
    47  	//   INT
    48  	//   INT8
    49  	//   INT4
    50  	//
    51  	IntFamily Family = 1
    52  	// FloatFamily is the family of base-2 floating-point types (IEEE 754).
    53  	//
    54  	//   Canonical: types.Float
    55  	//   Oid      : T_float8, T_float4
    56  	//   Width    : 64, 32
    57  	//
    58  	// Examples:
    59  	//   FLOAT8
    60  	//   FLOAT4
    61  	//
    62  	FloatFamily Family = 2
    63  	// DecimalFamily is the family of base-10 floating and fixed point types.
    64  	//
    65  	//   Canonical    : types.Decimal
    66  	//   Oid          : T_numeric
    67  	//   Precision    : max # decimal digits (0 = no specified limit)
    68  	//   Width (Scale): # digits after decimal point (0 = no specified limit)
    69  	//
    70  	// Examples:
    71  	//   DECIMAL
    72  	//   DECIMAL(10)
    73  	//   DECIMAL(10,3)
    74  	//
    75  	DecimalFamily Family = 3
    76  	// DateFamily is the family of date types that store only year/month/day with
    77  	// no time component.
    78  	//
    79  	//   Canonical: types.Date
    80  	//   Oid      : T_date
    81  	//
    82  	// Examples:
    83  	//   DATE
    84  	//
    85  	DateFamily Family = 4
    86  	// TimestampFamily is the family of date types that store a year/month/day
    87  	// date component, as well as an hour/minute/second time component. There is
    88  	// no timezone component (see TIMESTAMPTZ). Seconds can have varying precision
    89  	// (defaults to microsecond precision). Currently, only microsecond precision
    90  	// is supported.
    91  	//
    92  	//   Canonical: types.Timestamp
    93  	//   Oid      : T_timestamp
    94  	//   Precision: fractional seconds (3 = ms, 0,6 = us, 9 = ns, etc.)
    95  	//
    96  	// Examples:
    97  	//   TIMESTAMP
    98  	//   TIMESTAMP(6)
    99  	//
   100  	TimestampFamily Family = 5
   101  	// IntervalFamily is the family of types describing a duration of time.
   102  	// Currently, only microsecond precision is supported.
   103  	//
   104  	//   Canonical: types.Interval
   105  	//   Oid      : T_interval
   106  	//
   107  	// Examples:
   108  	//   INTERVAL
   109  	//
   110  	IntervalFamily Family = 6
   111  	// StringFamily is the family of types containing Unicode textual strings.
   112  	// This family includes types constructed by STRING, VARCHAR, CHAR, and "char"
   113  	// column type definitions (CHAR and "char" are distinct PG types). Note
   114  	// that while STRING and VARCHAR have no default width limit, CHAR has a
   115  	// default width of 1.
   116  	// TODO(andyk): "char" should have default width of 1 as well, but doesn't.
   117  	//
   118  	//   Canonical: types.String
   119  	//   Oid      : T_text, T_varchar, T_bpchar, T_char
   120  	//   Width    : max # characters (0 = no specified limit)
   121  	//
   122  	// Examples:
   123  	//   STRING
   124  	//   TEXT
   125  	//   VARCHAR(10)
   126  	//   CHAR
   127  	//
   128  	StringFamily Family = 7
   129  	// BytesFamily is the family of types containing a list of raw byte values.
   130  	//
   131  	//   Canonical: types.BYTES
   132  	//   Oid      : T_bytea
   133  	//
   134  	// Examples:
   135  	//   BYTES
   136  	//
   137  	BytesFamily Family = 8
   138  	// TimestampTZFamily is the family of date types that store a year/month/day
   139  	// date component, as well as an hour/minute/second time component, along with
   140  	// a timezone. Seconds can have varying precision (defaults to microsecond
   141  	// precision). Currently, only microsecond precision is supported.
   142  	//
   143  	//   Canonical: types.TimestampTZ
   144  	//   Oid      : T_timestamptz
   145  	//   Precision: fractional seconds (3 = ms, 0,6 = us, 9 = ns, etc.)
   146  	//
   147  	// Examples:
   148  	//   TIMESTAMPTZ
   149  	//   TIMESTAMPTZ(6)
   150  	//
   151  	TimestampTZFamily Family = 9
   152  	// CollatedStringFamily is the family of types containing Unicode textual
   153  	// strings with an associated COLLATE value that specifies the locale used
   154  	// for various character-based operations such as sorting, pattern matching,
   155  	// and builtin functions like lower and upper.
   156  	//
   157  	//   Oid      : T_text, T_varchar, T_bpchar, T_char
   158  	//   Width    : max # characters (0 = no specified limit)
   159  	//   Locale   : name of locale (e.g. EN or DE)
   160  	//
   161  	// Examples:
   162  	//   STRING COLLATE en
   163  	//   VARCHAR(10) COLLATE de
   164  	//
   165  	CollatedStringFamily Family = 10
   166  	// OidFamily is the family of types containing Postgres Object ID (Oid)
   167  	// values. Oids are integer values that identify some object in the database,
   168  	// like a type, relation, or procedure.
   169  	//
   170  	//   Canonical: types.Oid
   171  	//   Oid      : T_oid, T_regclass, T_regproc, T_regprocedure, T_regtype,
   172  	//              T_regnamespace
   173  	//
   174  	// Examples:
   175  	//   OID
   176  	//   REGCLASS
   177  	//   REGPROC
   178  	//
   179  	// TODO(andyk): Oids should be part of the IntFamily, since they are treated
   180  	//              as equivalent to ints by PG.
   181  	OidFamily Family = 12
   182  	// UnknownFamily is a special type family that tags expressions that
   183  	// statically evaluate to NULL. An UnknownFamily expression *must* be NULL.
   184  	// But the inverse is not true, since other types allow NULL values as well.
   185  	// UnknownFamily types are not supported as a table column type, but can be
   186  	// transferred through DistSQL streams.
   187  	//
   188  	//   Canonical: types.Unknown
   189  	//   Oid      : T_unknown
   190  	//
   191  	UnknownFamily Family = 13
   192  	// UuidFamily is the family of types containing universally unique
   193  	// identifiers. A UUID is a 128-bit quantity that is very unlikely to ever be
   194  	// generated again, and so can be relied on to be distinct from all other UUID
   195  	// values.
   196  	//
   197  	//   Canonical: types.Uuid
   198  	//   Oid      : T_uuid
   199  	//
   200  	// Examples:
   201  	//   UUID
   202  	//
   203  	UuidFamily Family = 14
   204  	// ArrayFamily is a family of non-scalar types that contain an ordered list of
   205  	// elements. The elements of an array must all share the same type. Elements
   206  	// can have have any type, including ARRAY. However, while the types package
   207  	// supports nested arrays, other parts of CRDB do not currently support them.
   208  	// Also, the length of array dimension(s) are ignored by PG and CRDB (e.g.
   209  	// an array of length 11 could be inserted into a column declared as INT[11]).
   210  	//
   211  	// Array OID values are special. Rather than having a single T_array OID,
   212  	// Postgres defines a separate OID for each possible array element type.
   213  	// Here are some examples:
   214  	//
   215  	//   T__int8: array of int8 values
   216  	//   T__text: array of text values
   217  	//
   218  	// Notice that each array OID has double underscores to distinguish it from
   219  	// the OID of the scalar type it contains.
   220  	//
   221  	//   Oid          : T__int, T__text, T__numeric, etc.
   222  	//   ArrayContents: types.T of the array element type
   223  	//
   224  	// Examples:
   225  	//   INT[]
   226  	//   VARCHAR(10)[] COLLATE EN
   227  	//   DECIMAL(10,1)[]
   228  	//   TIMESTAMP[5]
   229  	//
   230  	ArrayFamily Family = 15
   231  	// INetFamily is the family of types containing IPv4 or IPv6 network address
   232  	// identifiers (e.g. 192.168.100.128/25 or FE80:CD00:0:CDE:1257:0:211E:729C).
   233  	//
   234  	//   Canonical: types.INet
   235  	//   Oid      : T_inet
   236  	//
   237  	// Examples:
   238  	//   INET
   239  	//
   240  	INetFamily Family = 16
   241  	// TimeFamily is the family of date types that store only hour/minute/second
   242  	// with no date component. There is no timezone component. Seconds can have
   243  	// varying precision (defaults to microsecond precision). Currently, only
   244  	// microsecond precision is supported.
   245  	//
   246  	//   Canonical: types.Time
   247  	//   Oid      : T_time
   248  	//   Precision: fractional seconds (3 = ms, 0,6 = us, 9 = ns, etc.)
   249  	//
   250  	// Examples:
   251  	//   TIME
   252  	//   TIME(6)
   253  	//
   254  	TimeFamily Family = 17
   255  	// JsonFamily is the family of types containing JavaScript Object Notation
   256  	// (JSON) values. Currently, CRDB only supports JSONB values, which are stored
   257  	// in a decomposed binary format.
   258  	//
   259  	//   Canonical: types.Jsonb
   260  	//   Oid      : T_jsonb
   261  	//
   262  	// Examples:
   263  	//   JSON
   264  	//   JSONB
   265  	//
   266  	JsonFamily Family = 18
   267  	// TimeTZFamily is the family of date types that store only hour/minute/second
   268  	// and timestamp components, with no date component. Seconds can have
   269  	// varying precision (defaults to microsecond precision). Currently, only
   270  	// microsecond precision is supported.
   271  	//
   272  	//   Canonical: types.TimeTZ
   273  	//   Oid      : T_timetz
   274  	//   Precision: fractional seconds (3 = ms, 0,6 = us, 9 = ns, etc.)
   275  	//
   276  	// Examples:
   277  	//   TIMETZ
   278  	//
   279  	TimeTZFamily Family = 19
   280  	// TupleFamily is a family of non-scalar structural types that describes the
   281  	// fields of a row or record. The fields can be of any type, including nested
   282  	// tuple and array types. Fields can also have optional labels. Currently,
   283  	// CRDB does not support tuple types as column types, but it is possible to
   284  	// construct tuples using the ROW function or tuple construction syntax.
   285  	//
   286  	//   Oid          : T_record
   287  	//   TupleContents: []*types.T of each tuple field
   288  	//   TupleLabels  : []string of each tuple label
   289  	//
   290  	// Examples:
   291  	//   (1, 'foo')
   292  	//   ((1, 'foo') AS num, str)
   293  	//   ROW(1, 'foo')
   294  	//   (ROW(1, 'foo') AS num, str)
   295  	//
   296  	TupleFamily Family = 20
   297  	// BitFamily is the family of types containing ordered lists of bit values
   298  	// (0 or 1). Note that while VARBIT has no default width limit, BIT has a
   299  	// default width limit of 1.
   300  	//
   301  	//   Canonical: types.VarBit
   302  	//   Oid      : T_varbit, T_bit
   303  	//   Width    : max # of bits (0 = no specified limit)
   304  	//
   305  	// Examples:
   306  	//   VARBIT
   307  	//   VARBIT(10)
   308  	//   BIT
   309  	//   BIT(10)
   310  	//
   311  	BitFamily Family = 21
   312  	// GeometryFamily is a family that supports the Geometry geospatial type,
   313  	// which is compatible with PostGIS's Geometry implementation.
   314  	//
   315  	//   Canonical: types.Geometry
   316  	//   Oid      : oidext.T_geometry
   317  	//
   318  	// Examples:
   319  	//   GEOMETRY
   320  	//   GEOMETRY(LINESTRING)
   321  	//   GEOMETRY(LINESTRING, SRID)
   322  	GeometryFamily Family = 22
   323  	// GeographyFamily is a family that supports the Geography geospatial type,
   324  	// which is compatible with PostGIS's Geography implementation.
   325  	//
   326  	//   Canonical: types.Geography
   327  	//   Oid      : oidext.T_geography
   328  	//
   329  	// Examples:
   330  	//   GEOGRAPHY
   331  	//   GEOGRAPHY(LINESTRING)
   332  	//   GEOGRAPHY(LINESTRING, SRID)
   333  	GeographyFamily Family = 23
   334  	// EnumFamily is a family that represents all ENUM types. ENUM types
   335  	// have data about the ENUM defined in a TypeDescriptor. The ID of
   336  	// the TypeDescriptor that backs this ENUM is stored in the StableTypeID
   337  	// field. It does not have a canonical form.
   338  	EnumFamily Family = 24
   339  	// AnyFamily is a special type family used during static analysis as a
   340  	// wildcard type that matches any other type, including scalar, array, and
   341  	// tuple types. Execution-time values should never have this type. As an
   342  	// example of its use, many SQL builtin functions allow an input value to be
   343  	// of any type, and so use this type in their static definitions.
   344  	//
   345  	//   Canonical: types.Any
   346  	//   Oid      : T_anyelement
   347  	//
   348  	AnyFamily Family = 100
   349  )
   350  
   351  var Family_name = map[int32]string{
   352  	0:   "BoolFamily",
   353  	1:   "IntFamily",
   354  	2:   "FloatFamily",
   355  	3:   "DecimalFamily",
   356  	4:   "DateFamily",
   357  	5:   "TimestampFamily",
   358  	6:   "IntervalFamily",
   359  	7:   "StringFamily",
   360  	8:   "BytesFamily",
   361  	9:   "TimestampTZFamily",
   362  	10:  "CollatedStringFamily",
   363  	12:  "OidFamily",
   364  	13:  "UnknownFamily",
   365  	14:  "UuidFamily",
   366  	15:  "ArrayFamily",
   367  	16:  "INetFamily",
   368  	17:  "TimeFamily",
   369  	18:  "JsonFamily",
   370  	19:  "TimeTZFamily",
   371  	20:  "TupleFamily",
   372  	21:  "BitFamily",
   373  	22:  "GeometryFamily",
   374  	23:  "GeographyFamily",
   375  	24:  "EnumFamily",
   376  	100: "AnyFamily",
   377  }
   378  var Family_value = map[string]int32{
   379  	"BoolFamily":           0,
   380  	"IntFamily":            1,
   381  	"FloatFamily":          2,
   382  	"DecimalFamily":        3,
   383  	"DateFamily":           4,
   384  	"TimestampFamily":      5,
   385  	"IntervalFamily":       6,
   386  	"StringFamily":         7,
   387  	"BytesFamily":          8,
   388  	"TimestampTZFamily":    9,
   389  	"CollatedStringFamily": 10,
   390  	"OidFamily":            12,
   391  	"UnknownFamily":        13,
   392  	"UuidFamily":           14,
   393  	"ArrayFamily":          15,
   394  	"INetFamily":           16,
   395  	"TimeFamily":           17,
   396  	"JsonFamily":           18,
   397  	"TimeTZFamily":         19,
   398  	"TupleFamily":          20,
   399  	"BitFamily":            21,
   400  	"GeometryFamily":       22,
   401  	"GeographyFamily":      23,
   402  	"EnumFamily":           24,
   403  	"AnyFamily":            100,
   404  }
   405  
   406  func (x Family) Enum() *Family {
   407  	p := new(Family)
   408  	*p = x
   409  	return p
   410  }
   411  func (x Family) String() string {
   412  	return proto.EnumName(Family_name, int32(x))
   413  }
   414  func (x *Family) UnmarshalJSON(data []byte) error {
   415  	value, err := proto.UnmarshalJSONEnum(Family_value, data, "Family")
   416  	if err != nil {
   417  		return err
   418  	}
   419  	*x = Family(value)
   420  	return nil
   421  }
   422  func (Family) EnumDescriptor() ([]byte, []int) {
   423  	return fileDescriptor_types_7bfdf29f8d103278, []int{0}
   424  }
   425  
   426  // IntervalDurationType represents a duration that can be used
   427  // when defining an Interval Duration Field.
   428  // See https://www.postgresql.org/docs/current/datatype-datetime.html.
   429  type IntervalDurationType int32
   430  
   431  const (
   432  	// UNSET defaults to SECOND during evaluation.
   433  	// This indicates no typmod.
   434  	IntervalDurationType_UNSET  IntervalDurationType = 0
   435  	IntervalDurationType_YEAR   IntervalDurationType = 1
   436  	IntervalDurationType_MONTH  IntervalDurationType = 2
   437  	IntervalDurationType_DAY    IntervalDurationType = 3
   438  	IntervalDurationType_HOUR   IntervalDurationType = 4
   439  	IntervalDurationType_MINUTE IntervalDurationType = 5
   440  	// SECOND is the only unit where precision can be added.
   441  	IntervalDurationType_SECOND IntervalDurationType = 6
   442  	// MILLISECOND is not technically part of the SQL standard for intervals, but we
   443  	// provide it as a field to allow code to parse intervals with a default unit
   444  	// of milliseconds, which is useful for some internal use cases like
   445  	// statement_timeout.
   446  	IntervalDurationType_MILLISECOND IntervalDurationType = 7
   447  )
   448  
   449  var IntervalDurationType_name = map[int32]string{
   450  	0: "UNSET",
   451  	1: "YEAR",
   452  	2: "MONTH",
   453  	3: "DAY",
   454  	4: "HOUR",
   455  	5: "MINUTE",
   456  	6: "SECOND",
   457  	7: "MILLISECOND",
   458  }
   459  var IntervalDurationType_value = map[string]int32{
   460  	"UNSET":       0,
   461  	"YEAR":        1,
   462  	"MONTH":       2,
   463  	"DAY":         3,
   464  	"HOUR":        4,
   465  	"MINUTE":      5,
   466  	"SECOND":      6,
   467  	"MILLISECOND": 7,
   468  }
   469  
   470  func (x IntervalDurationType) Enum() *IntervalDurationType {
   471  	p := new(IntervalDurationType)
   472  	*p = x
   473  	return p
   474  }
   475  func (x IntervalDurationType) String() string {
   476  	return proto.EnumName(IntervalDurationType_name, int32(x))
   477  }
   478  func (x *IntervalDurationType) UnmarshalJSON(data []byte) error {
   479  	value, err := proto.UnmarshalJSONEnum(IntervalDurationType_value, data, "IntervalDurationType")
   480  	if err != nil {
   481  		return err
   482  	}
   483  	*x = IntervalDurationType(value)
   484  	return nil
   485  }
   486  func (IntervalDurationType) EnumDescriptor() ([]byte, []int) {
   487  	return fileDescriptor_types_7bfdf29f8d103278, []int{1}
   488  }
   489  
   490  // IntervalDurationField represents precisions in intervals which are
   491  // outside of the regular time precision syntax.
   492  // i.e. instead of INTERVAL(6), we can have INTERVAL SECOND(6), INTERVAL MONTH, etc.
   493  // This is represented as a bitmask on the first 4 bits of precision in postgres.
   494  type IntervalDurationField struct {
   495  	// DurationType is the unit of measurement in which durations
   496  	// should truncate themselves to.
   497  	// This (unlike precision) gets truncated downward.
   498  	DurationType IntervalDurationType `protobuf:"varint,1,opt,name=duration_type,json=durationType,enum=cockroach.sql.sem.types.IntervalDurationType" json:"duration_type"`
   499  	// FromDurationType is the left side of the "duration field".
   500  	// i.e. in the `DurationType_1 TO DurationType_2` syntax, this represents `DurationType_1`.
   501  	// Note this is ignored, see https://www.postgresql.org/message-id/20110510040219.GD5617%40tornado.gateway.2wire.net.
   502  	FromDurationType IntervalDurationType `protobuf:"varint,2,opt,name=from_duration_type,json=fromDurationType,enum=cockroach.sql.sem.types.IntervalDurationType" json:"from_duration_type"`
   503  }
   504  
   505  func (m *IntervalDurationField) Reset()         { *m = IntervalDurationField{} }
   506  func (m *IntervalDurationField) String() string { return proto.CompactTextString(m) }
   507  func (*IntervalDurationField) ProtoMessage()    {}
   508  func (*IntervalDurationField) Descriptor() ([]byte, []int) {
   509  	return fileDescriptor_types_7bfdf29f8d103278, []int{0}
   510  }
   511  func (m *IntervalDurationField) XXX_Unmarshal(b []byte) error {
   512  	return m.Unmarshal(b)
   513  }
   514  func (m *IntervalDurationField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   515  	b = b[:cap(b)]
   516  	n, err := m.MarshalTo(b)
   517  	if err != nil {
   518  		return nil, err
   519  	}
   520  	return b[:n], nil
   521  }
   522  func (dst *IntervalDurationField) XXX_Merge(src proto.Message) {
   523  	xxx_messageInfo_IntervalDurationField.Merge(dst, src)
   524  }
   525  func (m *IntervalDurationField) XXX_Size() int {
   526  	return m.Size()
   527  }
   528  func (m *IntervalDurationField) XXX_DiscardUnknown() {
   529  	xxx_messageInfo_IntervalDurationField.DiscardUnknown(m)
   530  }
   531  
   532  var xxx_messageInfo_IntervalDurationField proto.InternalMessageInfo
   533  
   534  // GeoMetadata contains metadata associated with Geospatial data types.
   535  type GeoMetadata struct {
   536  	SRID  github_com_cockroachdb_cockroach_pkg_geo_geopb.SRID `protobuf:"varint,1,opt,name=srid,casttype=github.com/cockroachdb/cockroach/pkg/geo/geopb.SRID" json:"srid"`
   537  	Shape geopb.Shape                                         `protobuf:"varint,2,opt,name=shape,enum=cockroach.geopb.Shape" json:"shape"`
   538  }
   539  
   540  func (m *GeoMetadata) Reset()         { *m = GeoMetadata{} }
   541  func (m *GeoMetadata) String() string { return proto.CompactTextString(m) }
   542  func (*GeoMetadata) ProtoMessage()    {}
   543  func (*GeoMetadata) Descriptor() ([]byte, []int) {
   544  	return fileDescriptor_types_7bfdf29f8d103278, []int{1}
   545  }
   546  func (m *GeoMetadata) XXX_Unmarshal(b []byte) error {
   547  	return m.Unmarshal(b)
   548  }
   549  func (m *GeoMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   550  	b = b[:cap(b)]
   551  	n, err := m.MarshalTo(b)
   552  	if err != nil {
   553  		return nil, err
   554  	}
   555  	return b[:n], nil
   556  }
   557  func (dst *GeoMetadata) XXX_Merge(src proto.Message) {
   558  	xxx_messageInfo_GeoMetadata.Merge(dst, src)
   559  }
   560  func (m *GeoMetadata) XXX_Size() int {
   561  	return m.Size()
   562  }
   563  func (m *GeoMetadata) XXX_DiscardUnknown() {
   564  	xxx_messageInfo_GeoMetadata.DiscardUnknown(m)
   565  }
   566  
   567  var xxx_messageInfo_GeoMetadata proto.InternalMessageInfo
   568  
   569  // PersistentUserDefinedTypeMetadata contains user defined type metadata
   570  // that will be serialized to disk, unlike other user defined type metadata
   571  // that is only stored in memory once a type is resolved.
   572  type PersistentUserDefinedTypeMetadata struct {
   573  	// StableTypeID is the ID of the backing TypeDescriptor for this type.
   574  	StableTypeID uint32 `protobuf:"varint,1,opt,name=stable_type_id,json=stableTypeId" json:"stable_type_id"`
   575  	// StableArrayTypeID is the ID of the TypeDescriptor that defines the backs
   576  	// the automatically generated array type for this type. StableArrayTypeID
   577  	// is only set for user defined types that aren't arrays.
   578  	StableArrayTypeID uint32 `protobuf:"varint,2,opt,name=stable_array_type_id,json=stableArrayTypeId" json:"stable_array_type_id"`
   579  }
   580  
   581  func (m *PersistentUserDefinedTypeMetadata) Reset()         { *m = PersistentUserDefinedTypeMetadata{} }
   582  func (m *PersistentUserDefinedTypeMetadata) String() string { return proto.CompactTextString(m) }
   583  func (*PersistentUserDefinedTypeMetadata) ProtoMessage()    {}
   584  func (*PersistentUserDefinedTypeMetadata) Descriptor() ([]byte, []int) {
   585  	return fileDescriptor_types_7bfdf29f8d103278, []int{2}
   586  }
   587  func (m *PersistentUserDefinedTypeMetadata) XXX_Unmarshal(b []byte) error {
   588  	return m.Unmarshal(b)
   589  }
   590  func (m *PersistentUserDefinedTypeMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   591  	b = b[:cap(b)]
   592  	n, err := m.MarshalTo(b)
   593  	if err != nil {
   594  		return nil, err
   595  	}
   596  	return b[:n], nil
   597  }
   598  func (dst *PersistentUserDefinedTypeMetadata) XXX_Merge(src proto.Message) {
   599  	xxx_messageInfo_PersistentUserDefinedTypeMetadata.Merge(dst, src)
   600  }
   601  func (m *PersistentUserDefinedTypeMetadata) XXX_Size() int {
   602  	return m.Size()
   603  }
   604  func (m *PersistentUserDefinedTypeMetadata) XXX_DiscardUnknown() {
   605  	xxx_messageInfo_PersistentUserDefinedTypeMetadata.DiscardUnknown(m)
   606  }
   607  
   608  var xxx_messageInfo_PersistentUserDefinedTypeMetadata proto.InternalMessageInfo
   609  
   610  func (m *T) Reset()      { *m = T{} }
   611  func (*T) ProtoMessage() {}
   612  func (*T) Descriptor() ([]byte, []int) {
   613  	return fileDescriptor_types_7bfdf29f8d103278, []int{3}
   614  }
   615  func (m *T) XXX_Unmarshal(b []byte) error {
   616  	return xxx_messageInfo_T.Unmarshal(m, b)
   617  }
   618  func (m *T) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   619  	return xxx_messageInfo_T.Marshal(b, m, deterministic)
   620  }
   621  func (dst *T) XXX_Merge(src proto.Message) {
   622  	xxx_messageInfo_T.Merge(dst, src)
   623  }
   624  func (m *T) XXX_Size() int {
   625  	return xxx_messageInfo_T.Size(m)
   626  }
   627  func (m *T) XXX_DiscardUnknown() {
   628  	xxx_messageInfo_T.DiscardUnknown(m)
   629  }
   630  
   631  var xxx_messageInfo_T proto.InternalMessageInfo
   632  
   633  // InternalType is the protobuf encoding for SQL types. It is always wrapped by
   634  // a T struct, and should never be used directly by outside packages. See the
   635  // comment header for the T struct for more details.
   636  type InternalType struct {
   637  	// Family specifies a group of types that are compatible with one another.
   638  	// See the header for the T.Family method for more details.
   639  	Family Family `protobuf:"varint,1,opt,name=family,enum=cockroach.sql.sem.types.Family" json:"family"`
   640  	// Width is the size or scale of the type, such as number of bits or
   641  	// characters. See the T.Width method for more details.
   642  	Width int32 `protobuf:"varint,2,opt,name=width" json:"width"`
   643  	// Precision is the accuracy of the data type. See the T.Precision method for
   644  	// more details. This field was also by FLOAT pre-2.1 (this was incorrect.)
   645  	Precision int32 `protobuf:"varint,3,opt,name=precision" json:"precision"`
   646  	// ArrayDimensions is deprecated in 19.2, since it was never used. It
   647  	// previously contained the length of each dimension in the array. A
   648  	// dimension of -1 meant that no bound was specified for that dimension. If
   649  	// arrayDimensions was nil, then the array had one unbounded dimension.
   650  	ArrayDimensions []int32 `protobuf:"varint,4,rep,name=array_dimensions,json=arrayDimensions" json:"array_dimensions,omitempty"`
   651  	// Locale identifies a specific geographical, political, or cultural region that
   652  	// impacts various character-based operations such as sorting, pattern matching,
   653  	// and builtin functions like lower and upper. See the T.Locale method for
   654  	// more details.
   655  	Locale *string `protobuf:"bytes,5,opt,name=locale" json:"locale,omitempty"`
   656  	// VisibleType is deprecated in 19.2, since it is now superseded by the Oid
   657  	// field. It previously contained an alias for any types where our internal
   658  	// representation is different than the user specification. Examples are INT4,
   659  	// FLOAT4, etc. Mostly for Postgres compatibility.
   660  	VisibleType int32 `protobuf:"varint,6,opt,name=visible_type,json=visibleType" json:"visible_type"`
   661  	// ArrayElemType is deprecated in 19.2, since it is now superseded by the
   662  	// ArrayContents field. It previously contained the type family of array
   663  	// elements. The other array fields (width/precision/locale/etc) were used
   664  	// to store the other attributes of the array's element type.
   665  	ArrayElemType *Family `protobuf:"varint,7,opt,name=array_elem_type,json=arrayElemType,enum=cockroach.sql.sem.types.Family" json:"array_elem_type,omitempty"`
   666  	// TupleContents returns a slice containing the type of each tuple field. This
   667  	// is nil for non-TUPLE types.
   668  	TupleContents []*T `protobuf:"bytes,8,rep,name=tuple_contents,json=tupleContents" json:"tuple_contents,omitempty"`
   669  	// TupleLabels returns a slice containing the labels of each tuple field. This
   670  	// is nil for non-TUPLE types, or if the TUPLE type does not specify labels.
   671  	TupleLabels []string `protobuf:"bytes,9,rep,name=tuple_labels,json=tupleLabels" json:"tuple_labels,omitempty"`
   672  	// Oid returns the type's Postgres Object ID. See the header for the T.Oid
   673  	// method for more details. For user-defined types, the OID value is an
   674  	// offset (oidext.CockroachPredefinedOIDMax) away from the stable_type_id
   675  	// field. This makes it easy to retrieve a type descriptor by OID.
   676  	Oid github_com_lib_pq_oid.Oid `protobuf:"varint,10,opt,name=oid,customtype=github.com/lib/pq/oid.Oid" json:"oid"`
   677  	// ArrayContents returns the type of array elements. This is nil for non-ARRAY
   678  	// types.
   679  	ArrayContents *T `protobuf:"bytes,11,opt,name=array_contents,json=arrayContents" json:"array_contents,omitempty"`
   680  	// TimePrecisionIsSet indicates whether the precision was explicitly set.
   681  	// It is currently in use for the TIME-related families and INTERVALs
   682  	// where a Precision of 0 indicated the default precision of 6
   683  	// in versions pre-20.1.
   684  	// The rules for Precision to use are as follows:
   685  	//   * If Precision is > 0, then that is the precision.
   686  	//   * If Precision is 0, it will default to 6 if TimePrecisionIsSet is false
   687  	//    (for compatibility reasons).
   688  	//   * Otherwise, Precision = 0 and TimePrecisionIsSet = true, so it is
   689  	//     actually 0.
   690  	TimePrecisionIsSet bool `protobuf:"varint,12,opt,name=time_precision_is_set,json=timePrecisionIsSet" json:"time_precision_is_set"`
   691  	// IntervalDurationField is populated for intervals, representing extra
   692  	// typmod or precision data that may be required.
   693  	IntervalDurationField *IntervalDurationField `protobuf:"bytes,13,opt,name=interval_duration_field,json=intervalDurationField" json:"interval_duration_field,omitempty"`
   694  	// GeoMetadata is populated for geospatial types.
   695  	GeoMetadata *GeoMetadata `protobuf:"bytes,14,opt,name=geo_metadata,json=geoMetadata" json:"geo_metadata,omitempty"`
   696  	// UDTMetadata is populated for user defined types.
   697  	UDTMetadata *PersistentUserDefinedTypeMetadata `protobuf:"bytes,15,opt,name=udt_metadata,json=udtMetadata" json:"udt_metadata,omitempty"`
   698  }
   699  
   700  func (m *InternalType) Reset()         { *m = InternalType{} }
   701  func (m *InternalType) String() string { return proto.CompactTextString(m) }
   702  func (*InternalType) ProtoMessage()    {}
   703  func (*InternalType) Descriptor() ([]byte, []int) {
   704  	return fileDescriptor_types_7bfdf29f8d103278, []int{4}
   705  }
   706  func (m *InternalType) XXX_Unmarshal(b []byte) error {
   707  	return m.Unmarshal(b)
   708  }
   709  func (m *InternalType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   710  	b = b[:cap(b)]
   711  	n, err := m.MarshalTo(b)
   712  	if err != nil {
   713  		return nil, err
   714  	}
   715  	return b[:n], nil
   716  }
   717  func (dst *InternalType) XXX_Merge(src proto.Message) {
   718  	xxx_messageInfo_InternalType.Merge(dst, src)
   719  }
   720  func (m *InternalType) XXX_Size() int {
   721  	return m.Size()
   722  }
   723  func (m *InternalType) XXX_DiscardUnknown() {
   724  	xxx_messageInfo_InternalType.DiscardUnknown(m)
   725  }
   726  
   727  var xxx_messageInfo_InternalType proto.InternalMessageInfo
   728  
   729  func init() {
   730  	proto.RegisterType((*IntervalDurationField)(nil), "cockroach.sql.sem.types.IntervalDurationField")
   731  	proto.RegisterType((*GeoMetadata)(nil), "cockroach.sql.sem.types.GeoMetadata")
   732  	proto.RegisterType((*PersistentUserDefinedTypeMetadata)(nil), "cockroach.sql.sem.types.PersistentUserDefinedTypeMetadata")
   733  	proto.RegisterType((*T)(nil), "cockroach.sql.sem.types.T")
   734  	proto.RegisterType((*InternalType)(nil), "cockroach.sql.sem.types.InternalType")
   735  	proto.RegisterEnum("cockroach.sql.sem.types.Family", Family_name, Family_value)
   736  	proto.RegisterEnum("cockroach.sql.sem.types.IntervalDurationType", IntervalDurationType_name, IntervalDurationType_value)
   737  }
   738  func (m *IntervalDurationField) Marshal() (dAtA []byte, err error) {
   739  	size := m.Size()
   740  	dAtA = make([]byte, size)
   741  	n, err := m.MarshalTo(dAtA)
   742  	if err != nil {
   743  		return nil, err
   744  	}
   745  	return dAtA[:n], nil
   746  }
   747  
   748  func (m *IntervalDurationField) MarshalTo(dAtA []byte) (int, error) {
   749  	var i int
   750  	_ = i
   751  	var l int
   752  	_ = l
   753  	dAtA[i] = 0x8
   754  	i++
   755  	i = encodeVarintTypes(dAtA, i, uint64(m.DurationType))
   756  	dAtA[i] = 0x10
   757  	i++
   758  	i = encodeVarintTypes(dAtA, i, uint64(m.FromDurationType))
   759  	return i, nil
   760  }
   761  
   762  func (m *GeoMetadata) Marshal() (dAtA []byte, err error) {
   763  	size := m.Size()
   764  	dAtA = make([]byte, size)
   765  	n, err := m.MarshalTo(dAtA)
   766  	if err != nil {
   767  		return nil, err
   768  	}
   769  	return dAtA[:n], nil
   770  }
   771  
   772  func (m *GeoMetadata) MarshalTo(dAtA []byte) (int, error) {
   773  	var i int
   774  	_ = i
   775  	var l int
   776  	_ = l
   777  	dAtA[i] = 0x8
   778  	i++
   779  	i = encodeVarintTypes(dAtA, i, uint64(m.SRID))
   780  	dAtA[i] = 0x10
   781  	i++
   782  	i = encodeVarintTypes(dAtA, i, uint64(m.Shape))
   783  	return i, nil
   784  }
   785  
   786  func (m *PersistentUserDefinedTypeMetadata) Marshal() (dAtA []byte, err error) {
   787  	size := m.Size()
   788  	dAtA = make([]byte, size)
   789  	n, err := m.MarshalTo(dAtA)
   790  	if err != nil {
   791  		return nil, err
   792  	}
   793  	return dAtA[:n], nil
   794  }
   795  
   796  func (m *PersistentUserDefinedTypeMetadata) MarshalTo(dAtA []byte) (int, error) {
   797  	var i int
   798  	_ = i
   799  	var l int
   800  	_ = l
   801  	dAtA[i] = 0x8
   802  	i++
   803  	i = encodeVarintTypes(dAtA, i, uint64(m.StableTypeID))
   804  	dAtA[i] = 0x10
   805  	i++
   806  	i = encodeVarintTypes(dAtA, i, uint64(m.StableArrayTypeID))
   807  	return i, nil
   808  }
   809  
   810  func (m *InternalType) Marshal() (dAtA []byte, err error) {
   811  	size := m.Size()
   812  	dAtA = make([]byte, size)
   813  	n, err := m.MarshalTo(dAtA)
   814  	if err != nil {
   815  		return nil, err
   816  	}
   817  	return dAtA[:n], nil
   818  }
   819  
   820  func (m *InternalType) MarshalTo(dAtA []byte) (int, error) {
   821  	var i int
   822  	_ = i
   823  	var l int
   824  	_ = l
   825  	dAtA[i] = 0x8
   826  	i++
   827  	i = encodeVarintTypes(dAtA, i, uint64(m.Family))
   828  	dAtA[i] = 0x10
   829  	i++
   830  	i = encodeVarintTypes(dAtA, i, uint64(m.Width))
   831  	dAtA[i] = 0x18
   832  	i++
   833  	i = encodeVarintTypes(dAtA, i, uint64(m.Precision))
   834  	if len(m.ArrayDimensions) > 0 {
   835  		for _, num := range m.ArrayDimensions {
   836  			dAtA[i] = 0x20
   837  			i++
   838  			i = encodeVarintTypes(dAtA, i, uint64(num))
   839  		}
   840  	}
   841  	if m.Locale != nil {
   842  		dAtA[i] = 0x2a
   843  		i++
   844  		i = encodeVarintTypes(dAtA, i, uint64(len(*m.Locale)))
   845  		i += copy(dAtA[i:], *m.Locale)
   846  	}
   847  	dAtA[i] = 0x30
   848  	i++
   849  	i = encodeVarintTypes(dAtA, i, uint64(m.VisibleType))
   850  	if m.ArrayElemType != nil {
   851  		dAtA[i] = 0x38
   852  		i++
   853  		i = encodeVarintTypes(dAtA, i, uint64(*m.ArrayElemType))
   854  	}
   855  	if len(m.TupleContents) > 0 {
   856  		for _, msg := range m.TupleContents {
   857  			dAtA[i] = 0x42
   858  			i++
   859  			i = encodeVarintTypes(dAtA, i, uint64(msg.Size()))
   860  			n, err := msg.MarshalTo(dAtA[i:])
   861  			if err != nil {
   862  				return 0, err
   863  			}
   864  			i += n
   865  		}
   866  	}
   867  	if len(m.TupleLabels) > 0 {
   868  		for _, s := range m.TupleLabels {
   869  			dAtA[i] = 0x4a
   870  			i++
   871  			l = len(s)
   872  			for l >= 1<<7 {
   873  				dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
   874  				l >>= 7
   875  				i++
   876  			}
   877  			dAtA[i] = uint8(l)
   878  			i++
   879  			i += copy(dAtA[i:], s)
   880  		}
   881  	}
   882  	dAtA[i] = 0x50
   883  	i++
   884  	i = encodeVarintTypes(dAtA, i, uint64(m.Oid))
   885  	if m.ArrayContents != nil {
   886  		dAtA[i] = 0x5a
   887  		i++
   888  		i = encodeVarintTypes(dAtA, i, uint64(m.ArrayContents.Size()))
   889  		n1, err := m.ArrayContents.MarshalTo(dAtA[i:])
   890  		if err != nil {
   891  			return 0, err
   892  		}
   893  		i += n1
   894  	}
   895  	dAtA[i] = 0x60
   896  	i++
   897  	if m.TimePrecisionIsSet {
   898  		dAtA[i] = 1
   899  	} else {
   900  		dAtA[i] = 0
   901  	}
   902  	i++
   903  	if m.IntervalDurationField != nil {
   904  		dAtA[i] = 0x6a
   905  		i++
   906  		i = encodeVarintTypes(dAtA, i, uint64(m.IntervalDurationField.Size()))
   907  		n2, err := m.IntervalDurationField.MarshalTo(dAtA[i:])
   908  		if err != nil {
   909  			return 0, err
   910  		}
   911  		i += n2
   912  	}
   913  	if m.GeoMetadata != nil {
   914  		dAtA[i] = 0x72
   915  		i++
   916  		i = encodeVarintTypes(dAtA, i, uint64(m.GeoMetadata.Size()))
   917  		n3, err := m.GeoMetadata.MarshalTo(dAtA[i:])
   918  		if err != nil {
   919  			return 0, err
   920  		}
   921  		i += n3
   922  	}
   923  	if m.UDTMetadata != nil {
   924  		dAtA[i] = 0x7a
   925  		i++
   926  		i = encodeVarintTypes(dAtA, i, uint64(m.UDTMetadata.Size()))
   927  		n4, err := m.UDTMetadata.MarshalTo(dAtA[i:])
   928  		if err != nil {
   929  			return 0, err
   930  		}
   931  		i += n4
   932  	}
   933  	return i, nil
   934  }
   935  
   936  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
   937  	for v >= 1<<7 {
   938  		dAtA[offset] = uint8(v&0x7f | 0x80)
   939  		v >>= 7
   940  		offset++
   941  	}
   942  	dAtA[offset] = uint8(v)
   943  	return offset + 1
   944  }
   945  func (m *IntervalDurationField) Size() (n int) {
   946  	if m == nil {
   947  		return 0
   948  	}
   949  	var l int
   950  	_ = l
   951  	n += 1 + sovTypes(uint64(m.DurationType))
   952  	n += 1 + sovTypes(uint64(m.FromDurationType))
   953  	return n
   954  }
   955  
   956  func (m *GeoMetadata) Size() (n int) {
   957  	if m == nil {
   958  		return 0
   959  	}
   960  	var l int
   961  	_ = l
   962  	n += 1 + sovTypes(uint64(m.SRID))
   963  	n += 1 + sovTypes(uint64(m.Shape))
   964  	return n
   965  }
   966  
   967  func (m *PersistentUserDefinedTypeMetadata) Size() (n int) {
   968  	if m == nil {
   969  		return 0
   970  	}
   971  	var l int
   972  	_ = l
   973  	n += 1 + sovTypes(uint64(m.StableTypeID))
   974  	n += 1 + sovTypes(uint64(m.StableArrayTypeID))
   975  	return n
   976  }
   977  
   978  func (m *InternalType) Size() (n int) {
   979  	if m == nil {
   980  		return 0
   981  	}
   982  	var l int
   983  	_ = l
   984  	n += 1 + sovTypes(uint64(m.Family))
   985  	n += 1 + sovTypes(uint64(m.Width))
   986  	n += 1 + sovTypes(uint64(m.Precision))
   987  	if len(m.ArrayDimensions) > 0 {
   988  		for _, e := range m.ArrayDimensions {
   989  			n += 1 + sovTypes(uint64(e))
   990  		}
   991  	}
   992  	if m.Locale != nil {
   993  		l = len(*m.Locale)
   994  		n += 1 + l + sovTypes(uint64(l))
   995  	}
   996  	n += 1 + sovTypes(uint64(m.VisibleType))
   997  	if m.ArrayElemType != nil {
   998  		n += 1 + sovTypes(uint64(*m.ArrayElemType))
   999  	}
  1000  	if len(m.TupleContents) > 0 {
  1001  		for _, e := range m.TupleContents {
  1002  			l = e.Size()
  1003  			n += 1 + l + sovTypes(uint64(l))
  1004  		}
  1005  	}
  1006  	if len(m.TupleLabels) > 0 {
  1007  		for _, s := range m.TupleLabels {
  1008  			l = len(s)
  1009  			n += 1 + l + sovTypes(uint64(l))
  1010  		}
  1011  	}
  1012  	n += 1 + sovTypes(uint64(m.Oid))
  1013  	if m.ArrayContents != nil {
  1014  		l = m.ArrayContents.Size()
  1015  		n += 1 + l + sovTypes(uint64(l))
  1016  	}
  1017  	n += 2
  1018  	if m.IntervalDurationField != nil {
  1019  		l = m.IntervalDurationField.Size()
  1020  		n += 1 + l + sovTypes(uint64(l))
  1021  	}
  1022  	if m.GeoMetadata != nil {
  1023  		l = m.GeoMetadata.Size()
  1024  		n += 1 + l + sovTypes(uint64(l))
  1025  	}
  1026  	if m.UDTMetadata != nil {
  1027  		l = m.UDTMetadata.Size()
  1028  		n += 1 + l + sovTypes(uint64(l))
  1029  	}
  1030  	return n
  1031  }
  1032  
  1033  func sovTypes(x uint64) (n int) {
  1034  	for {
  1035  		n++
  1036  		x >>= 7
  1037  		if x == 0 {
  1038  			break
  1039  		}
  1040  	}
  1041  	return n
  1042  }
  1043  func sozTypes(x uint64) (n int) {
  1044  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1045  }
  1046  func (m *IntervalDurationField) Unmarshal(dAtA []byte) error {
  1047  	l := len(dAtA)
  1048  	iNdEx := 0
  1049  	for iNdEx < l {
  1050  		preIndex := iNdEx
  1051  		var wire uint64
  1052  		for shift := uint(0); ; shift += 7 {
  1053  			if shift >= 64 {
  1054  				return ErrIntOverflowTypes
  1055  			}
  1056  			if iNdEx >= l {
  1057  				return io.ErrUnexpectedEOF
  1058  			}
  1059  			b := dAtA[iNdEx]
  1060  			iNdEx++
  1061  			wire |= (uint64(b) & 0x7F) << shift
  1062  			if b < 0x80 {
  1063  				break
  1064  			}
  1065  		}
  1066  		fieldNum := int32(wire >> 3)
  1067  		wireType := int(wire & 0x7)
  1068  		if wireType == 4 {
  1069  			return fmt.Errorf("proto: IntervalDurationField: wiretype end group for non-group")
  1070  		}
  1071  		if fieldNum <= 0 {
  1072  			return fmt.Errorf("proto: IntervalDurationField: illegal tag %d (wire type %d)", fieldNum, wire)
  1073  		}
  1074  		switch fieldNum {
  1075  		case 1:
  1076  			if wireType != 0 {
  1077  				return fmt.Errorf("proto: wrong wireType = %d for field DurationType", wireType)
  1078  			}
  1079  			m.DurationType = 0
  1080  			for shift := uint(0); ; shift += 7 {
  1081  				if shift >= 64 {
  1082  					return ErrIntOverflowTypes
  1083  				}
  1084  				if iNdEx >= l {
  1085  					return io.ErrUnexpectedEOF
  1086  				}
  1087  				b := dAtA[iNdEx]
  1088  				iNdEx++
  1089  				m.DurationType |= (IntervalDurationType(b) & 0x7F) << shift
  1090  				if b < 0x80 {
  1091  					break
  1092  				}
  1093  			}
  1094  		case 2:
  1095  			if wireType != 0 {
  1096  				return fmt.Errorf("proto: wrong wireType = %d for field FromDurationType", wireType)
  1097  			}
  1098  			m.FromDurationType = 0
  1099  			for shift := uint(0); ; shift += 7 {
  1100  				if shift >= 64 {
  1101  					return ErrIntOverflowTypes
  1102  				}
  1103  				if iNdEx >= l {
  1104  					return io.ErrUnexpectedEOF
  1105  				}
  1106  				b := dAtA[iNdEx]
  1107  				iNdEx++
  1108  				m.FromDurationType |= (IntervalDurationType(b) & 0x7F) << shift
  1109  				if b < 0x80 {
  1110  					break
  1111  				}
  1112  			}
  1113  		default:
  1114  			iNdEx = preIndex
  1115  			skippy, err := skipTypes(dAtA[iNdEx:])
  1116  			if err != nil {
  1117  				return err
  1118  			}
  1119  			if skippy < 0 {
  1120  				return ErrInvalidLengthTypes
  1121  			}
  1122  			if (iNdEx + skippy) > l {
  1123  				return io.ErrUnexpectedEOF
  1124  			}
  1125  			iNdEx += skippy
  1126  		}
  1127  	}
  1128  
  1129  	if iNdEx > l {
  1130  		return io.ErrUnexpectedEOF
  1131  	}
  1132  	return nil
  1133  }
  1134  func (m *GeoMetadata) Unmarshal(dAtA []byte) error {
  1135  	l := len(dAtA)
  1136  	iNdEx := 0
  1137  	for iNdEx < l {
  1138  		preIndex := iNdEx
  1139  		var wire uint64
  1140  		for shift := uint(0); ; shift += 7 {
  1141  			if shift >= 64 {
  1142  				return ErrIntOverflowTypes
  1143  			}
  1144  			if iNdEx >= l {
  1145  				return io.ErrUnexpectedEOF
  1146  			}
  1147  			b := dAtA[iNdEx]
  1148  			iNdEx++
  1149  			wire |= (uint64(b) & 0x7F) << shift
  1150  			if b < 0x80 {
  1151  				break
  1152  			}
  1153  		}
  1154  		fieldNum := int32(wire >> 3)
  1155  		wireType := int(wire & 0x7)
  1156  		if wireType == 4 {
  1157  			return fmt.Errorf("proto: GeoMetadata: wiretype end group for non-group")
  1158  		}
  1159  		if fieldNum <= 0 {
  1160  			return fmt.Errorf("proto: GeoMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
  1161  		}
  1162  		switch fieldNum {
  1163  		case 1:
  1164  			if wireType != 0 {
  1165  				return fmt.Errorf("proto: wrong wireType = %d for field SRID", wireType)
  1166  			}
  1167  			m.SRID = 0
  1168  			for shift := uint(0); ; shift += 7 {
  1169  				if shift >= 64 {
  1170  					return ErrIntOverflowTypes
  1171  				}
  1172  				if iNdEx >= l {
  1173  					return io.ErrUnexpectedEOF
  1174  				}
  1175  				b := dAtA[iNdEx]
  1176  				iNdEx++
  1177  				m.SRID |= (github_com_cockroachdb_cockroach_pkg_geo_geopb.SRID(b) & 0x7F) << shift
  1178  				if b < 0x80 {
  1179  					break
  1180  				}
  1181  			}
  1182  		case 2:
  1183  			if wireType != 0 {
  1184  				return fmt.Errorf("proto: wrong wireType = %d for field Shape", wireType)
  1185  			}
  1186  			m.Shape = 0
  1187  			for shift := uint(0); ; shift += 7 {
  1188  				if shift >= 64 {
  1189  					return ErrIntOverflowTypes
  1190  				}
  1191  				if iNdEx >= l {
  1192  					return io.ErrUnexpectedEOF
  1193  				}
  1194  				b := dAtA[iNdEx]
  1195  				iNdEx++
  1196  				m.Shape |= (geopb.Shape(b) & 0x7F) << shift
  1197  				if b < 0x80 {
  1198  					break
  1199  				}
  1200  			}
  1201  		default:
  1202  			iNdEx = preIndex
  1203  			skippy, err := skipTypes(dAtA[iNdEx:])
  1204  			if err != nil {
  1205  				return err
  1206  			}
  1207  			if skippy < 0 {
  1208  				return ErrInvalidLengthTypes
  1209  			}
  1210  			if (iNdEx + skippy) > l {
  1211  				return io.ErrUnexpectedEOF
  1212  			}
  1213  			iNdEx += skippy
  1214  		}
  1215  	}
  1216  
  1217  	if iNdEx > l {
  1218  		return io.ErrUnexpectedEOF
  1219  	}
  1220  	return nil
  1221  }
  1222  func (m *PersistentUserDefinedTypeMetadata) Unmarshal(dAtA []byte) error {
  1223  	l := len(dAtA)
  1224  	iNdEx := 0
  1225  	for iNdEx < l {
  1226  		preIndex := iNdEx
  1227  		var wire uint64
  1228  		for shift := uint(0); ; shift += 7 {
  1229  			if shift >= 64 {
  1230  				return ErrIntOverflowTypes
  1231  			}
  1232  			if iNdEx >= l {
  1233  				return io.ErrUnexpectedEOF
  1234  			}
  1235  			b := dAtA[iNdEx]
  1236  			iNdEx++
  1237  			wire |= (uint64(b) & 0x7F) << shift
  1238  			if b < 0x80 {
  1239  				break
  1240  			}
  1241  		}
  1242  		fieldNum := int32(wire >> 3)
  1243  		wireType := int(wire & 0x7)
  1244  		if wireType == 4 {
  1245  			return fmt.Errorf("proto: PersistentUserDefinedTypeMetadata: wiretype end group for non-group")
  1246  		}
  1247  		if fieldNum <= 0 {
  1248  			return fmt.Errorf("proto: PersistentUserDefinedTypeMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
  1249  		}
  1250  		switch fieldNum {
  1251  		case 1:
  1252  			if wireType != 0 {
  1253  				return fmt.Errorf("proto: wrong wireType = %d for field StableTypeID", wireType)
  1254  			}
  1255  			m.StableTypeID = 0
  1256  			for shift := uint(0); ; shift += 7 {
  1257  				if shift >= 64 {
  1258  					return ErrIntOverflowTypes
  1259  				}
  1260  				if iNdEx >= l {
  1261  					return io.ErrUnexpectedEOF
  1262  				}
  1263  				b := dAtA[iNdEx]
  1264  				iNdEx++
  1265  				m.StableTypeID |= (uint32(b) & 0x7F) << shift
  1266  				if b < 0x80 {
  1267  					break
  1268  				}
  1269  			}
  1270  		case 2:
  1271  			if wireType != 0 {
  1272  				return fmt.Errorf("proto: wrong wireType = %d for field StableArrayTypeID", wireType)
  1273  			}
  1274  			m.StableArrayTypeID = 0
  1275  			for shift := uint(0); ; shift += 7 {
  1276  				if shift >= 64 {
  1277  					return ErrIntOverflowTypes
  1278  				}
  1279  				if iNdEx >= l {
  1280  					return io.ErrUnexpectedEOF
  1281  				}
  1282  				b := dAtA[iNdEx]
  1283  				iNdEx++
  1284  				m.StableArrayTypeID |= (uint32(b) & 0x7F) << shift
  1285  				if b < 0x80 {
  1286  					break
  1287  				}
  1288  			}
  1289  		default:
  1290  			iNdEx = preIndex
  1291  			skippy, err := skipTypes(dAtA[iNdEx:])
  1292  			if err != nil {
  1293  				return err
  1294  			}
  1295  			if skippy < 0 {
  1296  				return ErrInvalidLengthTypes
  1297  			}
  1298  			if (iNdEx + skippy) > l {
  1299  				return io.ErrUnexpectedEOF
  1300  			}
  1301  			iNdEx += skippy
  1302  		}
  1303  	}
  1304  
  1305  	if iNdEx > l {
  1306  		return io.ErrUnexpectedEOF
  1307  	}
  1308  	return nil
  1309  }
  1310  func (m *InternalType) Unmarshal(dAtA []byte) error {
  1311  	l := len(dAtA)
  1312  	iNdEx := 0
  1313  	for iNdEx < l {
  1314  		preIndex := iNdEx
  1315  		var wire uint64
  1316  		for shift := uint(0); ; shift += 7 {
  1317  			if shift >= 64 {
  1318  				return ErrIntOverflowTypes
  1319  			}
  1320  			if iNdEx >= l {
  1321  				return io.ErrUnexpectedEOF
  1322  			}
  1323  			b := dAtA[iNdEx]
  1324  			iNdEx++
  1325  			wire |= (uint64(b) & 0x7F) << shift
  1326  			if b < 0x80 {
  1327  				break
  1328  			}
  1329  		}
  1330  		fieldNum := int32(wire >> 3)
  1331  		wireType := int(wire & 0x7)
  1332  		if wireType == 4 {
  1333  			return fmt.Errorf("proto: InternalType: wiretype end group for non-group")
  1334  		}
  1335  		if fieldNum <= 0 {
  1336  			return fmt.Errorf("proto: InternalType: illegal tag %d (wire type %d)", fieldNum, wire)
  1337  		}
  1338  		switch fieldNum {
  1339  		case 1:
  1340  			if wireType != 0 {
  1341  				return fmt.Errorf("proto: wrong wireType = %d for field Family", wireType)
  1342  			}
  1343  			m.Family = 0
  1344  			for shift := uint(0); ; shift += 7 {
  1345  				if shift >= 64 {
  1346  					return ErrIntOverflowTypes
  1347  				}
  1348  				if iNdEx >= l {
  1349  					return io.ErrUnexpectedEOF
  1350  				}
  1351  				b := dAtA[iNdEx]
  1352  				iNdEx++
  1353  				m.Family |= (Family(b) & 0x7F) << shift
  1354  				if b < 0x80 {
  1355  					break
  1356  				}
  1357  			}
  1358  		case 2:
  1359  			if wireType != 0 {
  1360  				return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType)
  1361  			}
  1362  			m.Width = 0
  1363  			for shift := uint(0); ; shift += 7 {
  1364  				if shift >= 64 {
  1365  					return ErrIntOverflowTypes
  1366  				}
  1367  				if iNdEx >= l {
  1368  					return io.ErrUnexpectedEOF
  1369  				}
  1370  				b := dAtA[iNdEx]
  1371  				iNdEx++
  1372  				m.Width |= (int32(b) & 0x7F) << shift
  1373  				if b < 0x80 {
  1374  					break
  1375  				}
  1376  			}
  1377  		case 3:
  1378  			if wireType != 0 {
  1379  				return fmt.Errorf("proto: wrong wireType = %d for field Precision", wireType)
  1380  			}
  1381  			m.Precision = 0
  1382  			for shift := uint(0); ; shift += 7 {
  1383  				if shift >= 64 {
  1384  					return ErrIntOverflowTypes
  1385  				}
  1386  				if iNdEx >= l {
  1387  					return io.ErrUnexpectedEOF
  1388  				}
  1389  				b := dAtA[iNdEx]
  1390  				iNdEx++
  1391  				m.Precision |= (int32(b) & 0x7F) << shift
  1392  				if b < 0x80 {
  1393  					break
  1394  				}
  1395  			}
  1396  		case 4:
  1397  			if wireType == 0 {
  1398  				var v int32
  1399  				for shift := uint(0); ; shift += 7 {
  1400  					if shift >= 64 {
  1401  						return ErrIntOverflowTypes
  1402  					}
  1403  					if iNdEx >= l {
  1404  						return io.ErrUnexpectedEOF
  1405  					}
  1406  					b := dAtA[iNdEx]
  1407  					iNdEx++
  1408  					v |= (int32(b) & 0x7F) << shift
  1409  					if b < 0x80 {
  1410  						break
  1411  					}
  1412  				}
  1413  				m.ArrayDimensions = append(m.ArrayDimensions, v)
  1414  			} else if wireType == 2 {
  1415  				var packedLen int
  1416  				for shift := uint(0); ; shift += 7 {
  1417  					if shift >= 64 {
  1418  						return ErrIntOverflowTypes
  1419  					}
  1420  					if iNdEx >= l {
  1421  						return io.ErrUnexpectedEOF
  1422  					}
  1423  					b := dAtA[iNdEx]
  1424  					iNdEx++
  1425  					packedLen |= (int(b) & 0x7F) << shift
  1426  					if b < 0x80 {
  1427  						break
  1428  					}
  1429  				}
  1430  				if packedLen < 0 {
  1431  					return ErrInvalidLengthTypes
  1432  				}
  1433  				postIndex := iNdEx + packedLen
  1434  				if postIndex > l {
  1435  					return io.ErrUnexpectedEOF
  1436  				}
  1437  				var elementCount int
  1438  				var count int
  1439  				for _, integer := range dAtA {
  1440  					if integer < 128 {
  1441  						count++
  1442  					}
  1443  				}
  1444  				elementCount = count
  1445  				if elementCount != 0 && len(m.ArrayDimensions) == 0 {
  1446  					m.ArrayDimensions = make([]int32, 0, elementCount)
  1447  				}
  1448  				for iNdEx < postIndex {
  1449  					var v int32
  1450  					for shift := uint(0); ; shift += 7 {
  1451  						if shift >= 64 {
  1452  							return ErrIntOverflowTypes
  1453  						}
  1454  						if iNdEx >= l {
  1455  							return io.ErrUnexpectedEOF
  1456  						}
  1457  						b := dAtA[iNdEx]
  1458  						iNdEx++
  1459  						v |= (int32(b) & 0x7F) << shift
  1460  						if b < 0x80 {
  1461  							break
  1462  						}
  1463  					}
  1464  					m.ArrayDimensions = append(m.ArrayDimensions, v)
  1465  				}
  1466  			} else {
  1467  				return fmt.Errorf("proto: wrong wireType = %d for field ArrayDimensions", wireType)
  1468  			}
  1469  		case 5:
  1470  			if wireType != 2 {
  1471  				return fmt.Errorf("proto: wrong wireType = %d for field Locale", wireType)
  1472  			}
  1473  			var stringLen uint64
  1474  			for shift := uint(0); ; shift += 7 {
  1475  				if shift >= 64 {
  1476  					return ErrIntOverflowTypes
  1477  				}
  1478  				if iNdEx >= l {
  1479  					return io.ErrUnexpectedEOF
  1480  				}
  1481  				b := dAtA[iNdEx]
  1482  				iNdEx++
  1483  				stringLen |= (uint64(b) & 0x7F) << shift
  1484  				if b < 0x80 {
  1485  					break
  1486  				}
  1487  			}
  1488  			intStringLen := int(stringLen)
  1489  			if intStringLen < 0 {
  1490  				return ErrInvalidLengthTypes
  1491  			}
  1492  			postIndex := iNdEx + intStringLen
  1493  			if postIndex > l {
  1494  				return io.ErrUnexpectedEOF
  1495  			}
  1496  			s := string(dAtA[iNdEx:postIndex])
  1497  			m.Locale = &s
  1498  			iNdEx = postIndex
  1499  		case 6:
  1500  			if wireType != 0 {
  1501  				return fmt.Errorf("proto: wrong wireType = %d for field VisibleType", wireType)
  1502  			}
  1503  			m.VisibleType = 0
  1504  			for shift := uint(0); ; shift += 7 {
  1505  				if shift >= 64 {
  1506  					return ErrIntOverflowTypes
  1507  				}
  1508  				if iNdEx >= l {
  1509  					return io.ErrUnexpectedEOF
  1510  				}
  1511  				b := dAtA[iNdEx]
  1512  				iNdEx++
  1513  				m.VisibleType |= (int32(b) & 0x7F) << shift
  1514  				if b < 0x80 {
  1515  					break
  1516  				}
  1517  			}
  1518  		case 7:
  1519  			if wireType != 0 {
  1520  				return fmt.Errorf("proto: wrong wireType = %d for field ArrayElemType", wireType)
  1521  			}
  1522  			var v Family
  1523  			for shift := uint(0); ; shift += 7 {
  1524  				if shift >= 64 {
  1525  					return ErrIntOverflowTypes
  1526  				}
  1527  				if iNdEx >= l {
  1528  					return io.ErrUnexpectedEOF
  1529  				}
  1530  				b := dAtA[iNdEx]
  1531  				iNdEx++
  1532  				v |= (Family(b) & 0x7F) << shift
  1533  				if b < 0x80 {
  1534  					break
  1535  				}
  1536  			}
  1537  			m.ArrayElemType = &v
  1538  		case 8:
  1539  			if wireType != 2 {
  1540  				return fmt.Errorf("proto: wrong wireType = %d for field TupleContents", wireType)
  1541  			}
  1542  			var msglen int
  1543  			for shift := uint(0); ; shift += 7 {
  1544  				if shift >= 64 {
  1545  					return ErrIntOverflowTypes
  1546  				}
  1547  				if iNdEx >= l {
  1548  					return io.ErrUnexpectedEOF
  1549  				}
  1550  				b := dAtA[iNdEx]
  1551  				iNdEx++
  1552  				msglen |= (int(b) & 0x7F) << shift
  1553  				if b < 0x80 {
  1554  					break
  1555  				}
  1556  			}
  1557  			if msglen < 0 {
  1558  				return ErrInvalidLengthTypes
  1559  			}
  1560  			postIndex := iNdEx + msglen
  1561  			if postIndex > l {
  1562  				return io.ErrUnexpectedEOF
  1563  			}
  1564  			m.TupleContents = append(m.TupleContents, &T{})
  1565  			if err := m.TupleContents[len(m.TupleContents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1566  				return err
  1567  			}
  1568  			iNdEx = postIndex
  1569  		case 9:
  1570  			if wireType != 2 {
  1571  				return fmt.Errorf("proto: wrong wireType = %d for field TupleLabels", wireType)
  1572  			}
  1573  			var stringLen uint64
  1574  			for shift := uint(0); ; shift += 7 {
  1575  				if shift >= 64 {
  1576  					return ErrIntOverflowTypes
  1577  				}
  1578  				if iNdEx >= l {
  1579  					return io.ErrUnexpectedEOF
  1580  				}
  1581  				b := dAtA[iNdEx]
  1582  				iNdEx++
  1583  				stringLen |= (uint64(b) & 0x7F) << shift
  1584  				if b < 0x80 {
  1585  					break
  1586  				}
  1587  			}
  1588  			intStringLen := int(stringLen)
  1589  			if intStringLen < 0 {
  1590  				return ErrInvalidLengthTypes
  1591  			}
  1592  			postIndex := iNdEx + intStringLen
  1593  			if postIndex > l {
  1594  				return io.ErrUnexpectedEOF
  1595  			}
  1596  			m.TupleLabels = append(m.TupleLabels, string(dAtA[iNdEx:postIndex]))
  1597  			iNdEx = postIndex
  1598  		case 10:
  1599  			if wireType != 0 {
  1600  				return fmt.Errorf("proto: wrong wireType = %d for field Oid", wireType)
  1601  			}
  1602  			m.Oid = 0
  1603  			for shift := uint(0); ; shift += 7 {
  1604  				if shift >= 64 {
  1605  					return ErrIntOverflowTypes
  1606  				}
  1607  				if iNdEx >= l {
  1608  					return io.ErrUnexpectedEOF
  1609  				}
  1610  				b := dAtA[iNdEx]
  1611  				iNdEx++
  1612  				m.Oid |= (github_com_lib_pq_oid.Oid(b) & 0x7F) << shift
  1613  				if b < 0x80 {
  1614  					break
  1615  				}
  1616  			}
  1617  		case 11:
  1618  			if wireType != 2 {
  1619  				return fmt.Errorf("proto: wrong wireType = %d for field ArrayContents", wireType)
  1620  			}
  1621  			var msglen int
  1622  			for shift := uint(0); ; shift += 7 {
  1623  				if shift >= 64 {
  1624  					return ErrIntOverflowTypes
  1625  				}
  1626  				if iNdEx >= l {
  1627  					return io.ErrUnexpectedEOF
  1628  				}
  1629  				b := dAtA[iNdEx]
  1630  				iNdEx++
  1631  				msglen |= (int(b) & 0x7F) << shift
  1632  				if b < 0x80 {
  1633  					break
  1634  				}
  1635  			}
  1636  			if msglen < 0 {
  1637  				return ErrInvalidLengthTypes
  1638  			}
  1639  			postIndex := iNdEx + msglen
  1640  			if postIndex > l {
  1641  				return io.ErrUnexpectedEOF
  1642  			}
  1643  			if m.ArrayContents == nil {
  1644  				m.ArrayContents = &T{}
  1645  			}
  1646  			if err := m.ArrayContents.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1647  				return err
  1648  			}
  1649  			iNdEx = postIndex
  1650  		case 12:
  1651  			if wireType != 0 {
  1652  				return fmt.Errorf("proto: wrong wireType = %d for field TimePrecisionIsSet", wireType)
  1653  			}
  1654  			var v int
  1655  			for shift := uint(0); ; shift += 7 {
  1656  				if shift >= 64 {
  1657  					return ErrIntOverflowTypes
  1658  				}
  1659  				if iNdEx >= l {
  1660  					return io.ErrUnexpectedEOF
  1661  				}
  1662  				b := dAtA[iNdEx]
  1663  				iNdEx++
  1664  				v |= (int(b) & 0x7F) << shift
  1665  				if b < 0x80 {
  1666  					break
  1667  				}
  1668  			}
  1669  			m.TimePrecisionIsSet = bool(v != 0)
  1670  		case 13:
  1671  			if wireType != 2 {
  1672  				return fmt.Errorf("proto: wrong wireType = %d for field IntervalDurationField", wireType)
  1673  			}
  1674  			var msglen int
  1675  			for shift := uint(0); ; shift += 7 {
  1676  				if shift >= 64 {
  1677  					return ErrIntOverflowTypes
  1678  				}
  1679  				if iNdEx >= l {
  1680  					return io.ErrUnexpectedEOF
  1681  				}
  1682  				b := dAtA[iNdEx]
  1683  				iNdEx++
  1684  				msglen |= (int(b) & 0x7F) << shift
  1685  				if b < 0x80 {
  1686  					break
  1687  				}
  1688  			}
  1689  			if msglen < 0 {
  1690  				return ErrInvalidLengthTypes
  1691  			}
  1692  			postIndex := iNdEx + msglen
  1693  			if postIndex > l {
  1694  				return io.ErrUnexpectedEOF
  1695  			}
  1696  			if m.IntervalDurationField == nil {
  1697  				m.IntervalDurationField = &IntervalDurationField{}
  1698  			}
  1699  			if err := m.IntervalDurationField.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1700  				return err
  1701  			}
  1702  			iNdEx = postIndex
  1703  		case 14:
  1704  			if wireType != 2 {
  1705  				return fmt.Errorf("proto: wrong wireType = %d for field GeoMetadata", wireType)
  1706  			}
  1707  			var msglen int
  1708  			for shift := uint(0); ; shift += 7 {
  1709  				if shift >= 64 {
  1710  					return ErrIntOverflowTypes
  1711  				}
  1712  				if iNdEx >= l {
  1713  					return io.ErrUnexpectedEOF
  1714  				}
  1715  				b := dAtA[iNdEx]
  1716  				iNdEx++
  1717  				msglen |= (int(b) & 0x7F) << shift
  1718  				if b < 0x80 {
  1719  					break
  1720  				}
  1721  			}
  1722  			if msglen < 0 {
  1723  				return ErrInvalidLengthTypes
  1724  			}
  1725  			postIndex := iNdEx + msglen
  1726  			if postIndex > l {
  1727  				return io.ErrUnexpectedEOF
  1728  			}
  1729  			if m.GeoMetadata == nil {
  1730  				m.GeoMetadata = &GeoMetadata{}
  1731  			}
  1732  			if err := m.GeoMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1733  				return err
  1734  			}
  1735  			iNdEx = postIndex
  1736  		case 15:
  1737  			if wireType != 2 {
  1738  				return fmt.Errorf("proto: wrong wireType = %d for field UDTMetadata", wireType)
  1739  			}
  1740  			var msglen int
  1741  			for shift := uint(0); ; shift += 7 {
  1742  				if shift >= 64 {
  1743  					return ErrIntOverflowTypes
  1744  				}
  1745  				if iNdEx >= l {
  1746  					return io.ErrUnexpectedEOF
  1747  				}
  1748  				b := dAtA[iNdEx]
  1749  				iNdEx++
  1750  				msglen |= (int(b) & 0x7F) << shift
  1751  				if b < 0x80 {
  1752  					break
  1753  				}
  1754  			}
  1755  			if msglen < 0 {
  1756  				return ErrInvalidLengthTypes
  1757  			}
  1758  			postIndex := iNdEx + msglen
  1759  			if postIndex > l {
  1760  				return io.ErrUnexpectedEOF
  1761  			}
  1762  			if m.UDTMetadata == nil {
  1763  				m.UDTMetadata = &PersistentUserDefinedTypeMetadata{}
  1764  			}
  1765  			if err := m.UDTMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1766  				return err
  1767  			}
  1768  			iNdEx = postIndex
  1769  		default:
  1770  			iNdEx = preIndex
  1771  			skippy, err := skipTypes(dAtA[iNdEx:])
  1772  			if err != nil {
  1773  				return err
  1774  			}
  1775  			if skippy < 0 {
  1776  				return ErrInvalidLengthTypes
  1777  			}
  1778  			if (iNdEx + skippy) > l {
  1779  				return io.ErrUnexpectedEOF
  1780  			}
  1781  			iNdEx += skippy
  1782  		}
  1783  	}
  1784  
  1785  	if iNdEx > l {
  1786  		return io.ErrUnexpectedEOF
  1787  	}
  1788  	return nil
  1789  }
  1790  func skipTypes(dAtA []byte) (n int, err error) {
  1791  	l := len(dAtA)
  1792  	iNdEx := 0
  1793  	for iNdEx < l {
  1794  		var wire uint64
  1795  		for shift := uint(0); ; shift += 7 {
  1796  			if shift >= 64 {
  1797  				return 0, ErrIntOverflowTypes
  1798  			}
  1799  			if iNdEx >= l {
  1800  				return 0, io.ErrUnexpectedEOF
  1801  			}
  1802  			b := dAtA[iNdEx]
  1803  			iNdEx++
  1804  			wire |= (uint64(b) & 0x7F) << shift
  1805  			if b < 0x80 {
  1806  				break
  1807  			}
  1808  		}
  1809  		wireType := int(wire & 0x7)
  1810  		switch wireType {
  1811  		case 0:
  1812  			for shift := uint(0); ; shift += 7 {
  1813  				if shift >= 64 {
  1814  					return 0, ErrIntOverflowTypes
  1815  				}
  1816  				if iNdEx >= l {
  1817  					return 0, io.ErrUnexpectedEOF
  1818  				}
  1819  				iNdEx++
  1820  				if dAtA[iNdEx-1] < 0x80 {
  1821  					break
  1822  				}
  1823  			}
  1824  			return iNdEx, nil
  1825  		case 1:
  1826  			iNdEx += 8
  1827  			return iNdEx, nil
  1828  		case 2:
  1829  			var length int
  1830  			for shift := uint(0); ; shift += 7 {
  1831  				if shift >= 64 {
  1832  					return 0, ErrIntOverflowTypes
  1833  				}
  1834  				if iNdEx >= l {
  1835  					return 0, io.ErrUnexpectedEOF
  1836  				}
  1837  				b := dAtA[iNdEx]
  1838  				iNdEx++
  1839  				length |= (int(b) & 0x7F) << shift
  1840  				if b < 0x80 {
  1841  					break
  1842  				}
  1843  			}
  1844  			iNdEx += length
  1845  			if length < 0 {
  1846  				return 0, ErrInvalidLengthTypes
  1847  			}
  1848  			return iNdEx, nil
  1849  		case 3:
  1850  			for {
  1851  				var innerWire uint64
  1852  				var start int = iNdEx
  1853  				for shift := uint(0); ; shift += 7 {
  1854  					if shift >= 64 {
  1855  						return 0, ErrIntOverflowTypes
  1856  					}
  1857  					if iNdEx >= l {
  1858  						return 0, io.ErrUnexpectedEOF
  1859  					}
  1860  					b := dAtA[iNdEx]
  1861  					iNdEx++
  1862  					innerWire |= (uint64(b) & 0x7F) << shift
  1863  					if b < 0x80 {
  1864  						break
  1865  					}
  1866  				}
  1867  				innerWireType := int(innerWire & 0x7)
  1868  				if innerWireType == 4 {
  1869  					break
  1870  				}
  1871  				next, err := skipTypes(dAtA[start:])
  1872  				if err != nil {
  1873  					return 0, err
  1874  				}
  1875  				iNdEx = start + next
  1876  			}
  1877  			return iNdEx, nil
  1878  		case 4:
  1879  			return iNdEx, nil
  1880  		case 5:
  1881  			iNdEx += 4
  1882  			return iNdEx, nil
  1883  		default:
  1884  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1885  		}
  1886  	}
  1887  	panic("unreachable")
  1888  }
  1889  
  1890  var (
  1891  	ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling")
  1892  	ErrIntOverflowTypes   = fmt.Errorf("proto: integer overflow")
  1893  )
  1894  
  1895  func init() { proto.RegisterFile("sql/types/types.proto", fileDescriptor_types_7bfdf29f8d103278) }
  1896  
  1897  var fileDescriptor_types_7bfdf29f8d103278 = []byte{
  1898  	// 1126 bytes of a gzipped FileDescriptorProto
  1899  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xbf, 0x6f, 0xdb, 0x46,
  1900  	0x14, 0x26, 0xad, 0x1f, 0x96, 0x4e, 0xbf, 0xe8, 0x8b, 0x94, 0x30, 0x1e, 0x44, 0x45, 0x68, 0x11,
  1901  	0x35, 0x40, 0x25, 0xc0, 0x1d, 0x0a, 0x18, 0xe8, 0x60, 0x59, 0xb2, 0xa3, 0xc0, 0xb6, 0x0c, 0x4a,
  1902  	0x42, 0x9b, 0x2c, 0x02, 0x25, 0x9e, 0xe5, 0x83, 0x49, 0x9e, 0xcc, 0x3b, 0x25, 0xf0, 0xd8, 0xcd,
  1903  	0x63, 0xc6, 0xa2, 0x93, 0x8d, 0x8e, 0xfd, 0x47, 0x9c, 0x2d, 0x43, 0x87, 0xa0, 0x83, 0xd0, 0xc8,
  1904  	0xff, 0x40, 0xe7, 0x4e, 0xc5, 0x1d, 0x8f, 0x94, 0x12, 0xc4, 0x69, 0xd0, 0x45, 0xe0, 0xfb, 0xde,
  1905  	0x7b, 0xdf, 0xfb, 0xde, 0xe3, 0xe3, 0x13, 0x28, 0xd1, 0x73, 0xa7, 0xc1, 0x2e, 0xa6, 0x88, 0x06,
  1906  	0xbf, 0xf5, 0xa9, 0x4f, 0x18, 0x81, 0x0f, 0xc6, 0x64, 0x7c, 0xe6, 0x13, 0x6b, 0x7c, 0x5a, 0xa7,
  1907  	0xe7, 0x4e, 0x9d, 0x22, 0xb7, 0x2e, 0xdc, 0x9b, 0xc5, 0x09, 0x99, 0x10, 0x11, 0xd3, 0xe0, 0x4f,
  1908  	0x41, 0xf8, 0x66, 0x69, 0x82, 0x48, 0x63, 0x82, 0xc8, 0x74, 0x14, 0xfc, 0x06, 0x70, 0xf5, 0x0f,
  1909  	0x15, 0x94, 0x3a, 0x1e, 0x43, 0xfe, 0x4b, 0xcb, 0x69, 0xcd, 0x7c, 0x8b, 0x61, 0xe2, 0xed, 0x61,
  1910  	0xe4, 0xd8, 0xf0, 0x27, 0x90, 0xb3, 0x25, 0x30, 0xe4, 0xc4, 0xba, 0x5a, 0x51, 0x6b, 0xf9, 0xad,
  1911  	0x6f, 0xeb, 0x77, 0xd4, 0xad, 0x7f, 0x4c, 0xd3, 0xbf, 0x98, 0xa2, 0x66, 0xfc, 0x66, 0x6e, 0x28,
  1912  	0x66, 0xd6, 0x5e, 0xc1, 0xa0, 0x05, 0xe0, 0x89, 0x4f, 0xdc, 0xe1, 0x87, 0xf4, 0x6b, 0xff, 0x9f,
  1913  	0x5e, 0xe3, 0x74, 0xab, 0x78, 0xf5, 0x57, 0x15, 0x64, 0xf6, 0x11, 0x39, 0x44, 0xcc, 0xb2, 0x2d,
  1914  	0x66, 0xc1, 0x1f, 0x41, 0x9c, 0xfa, 0xd8, 0x16, 0x3d, 0x24, 0x9a, 0xbb, 0x3c, 0x6b, 0x31, 0x37,
  1915  	0xe2, 0x3d, 0xb3, 0xd3, 0xfa, 0x67, 0x6e, 0x7c, 0x37, 0xc1, 0xec, 0x74, 0x36, 0xaa, 0x8f, 0x89,
  1916  	0xdb, 0x88, 0xca, 0xdb, 0xa3, 0xe5, 0x73, 0x63, 0x7a, 0x36, 0x69, 0x44, 0x03, 0xac, 0xf3, 0x34,
  1917  	0x53, 0x10, 0xc2, 0x2d, 0x90, 0xa0, 0xa7, 0x56, 0x24, 0xff, 0xfe, 0x8a, 0x7c, 0x19, 0xcb, 0xbd,
  1918  	0x52, 0x67, 0x10, 0x5a, 0xfd, 0x5d, 0x05, 0x8f, 0x8e, 0x91, 0x4f, 0x31, 0x65, 0xc8, 0x63, 0x03,
  1919  	0x8a, 0xfc, 0x16, 0x3a, 0xc1, 0x1e, 0xb2, 0xb9, 0xf4, 0x48, 0xf2, 0x36, 0xc8, 0x53, 0x66, 0x8d,
  1920  	0x1c, 0x24, 0xc6, 0x33, 0x94, 0xe2, 0x73, 0xcd, 0xa2, 0x14, 0x9f, 0xed, 0x09, 0x2f, 0xcf, 0xe9,
  1921  	0xb4, 0xcc, 0x2c, 0x5d, 0x5a, 0x36, 0x7c, 0x06, 0x8a, 0x32, 0xd7, 0xf2, 0x7d, 0xeb, 0x22, 0x62,
  1922  	0x58, 0x13, 0x0c, 0x0f, 0x25, 0xc3, 0x46, 0xc0, 0xb0, 0xc3, 0x43, 0x24, 0xcd, 0x06, 0xfd, 0x08,
  1923  	0xb2, 0xab, 0x04, 0xa8, 0x7d, 0x78, 0x0c, 0x72, 0x98, 0xcf, 0xdf, 0xb3, 0x9c, 0xe5, 0x32, 0x64,
  1924  	0xb6, 0xbe, 0xfe, 0xfc, 0xdb, 0xf2, 0x2c, 0x67, 0x75, 0x09, 0xf0, 0x0a, 0xb6, 0xad, 0x5f, 0x5e,
  1925  	0x19, 0xca, 0x2f, 0x57, 0x86, 0x72, 0x79, 0x6d, 0x28, 0xaf, 0xaf, 0x0d, 0xe5, 0xea, 0xda, 0x50,
  1926  	0xfe, 0xbe, 0x36, 0x94, 0xea, 0xcf, 0xeb, 0x20, 0xbb, 0x9a, 0x0e, 0x7f, 0x00, 0xc9, 0x13, 0xcb,
  1927  	0xc5, 0xce, 0x85, 0x5c, 0x41, 0xe3, 0xce, 0xaa, 0x7b, 0x22, 0x4c, 0xd6, 0x93, 0x49, 0x70, 0x13,
  1928  	0x24, 0x5e, 0x61, 0x9b, 0x9d, 0x8a, 0xee, 0x13, 0xe1, 0xab, 0x10, 0x10, 0xac, 0x82, 0xf4, 0xd4,
  1929  	0x47, 0x63, 0x4c, 0x31, 0xf1, 0xf4, 0xd8, 0x8a, 0x7f, 0x09, 0xc3, 0x6f, 0x80, 0x16, 0x4c, 0xd1,
  1930  	0xc6, 0x2e, 0xf2, 0x38, 0x44, 0xf5, 0x78, 0x25, 0x56, 0x4b, 0x98, 0x05, 0x81, 0xb7, 0x22, 0x18,
  1931  	0xde, 0x07, 0x49, 0x87, 0x8c, 0x2d, 0x07, 0xe9, 0x89, 0x8a, 0x5a, 0x4b, 0x9b, 0xd2, 0x82, 0x8f,
  1932  	0x41, 0xf6, 0x25, 0xa6, 0x38, 0x7c, 0x99, 0x7a, 0x72, 0xa5, 0x52, 0x46, 0x7a, 0x44, 0xab, 0xfb,
  1933  	0x20, 0xe0, 0x1c, 0x22, 0x07, 0xb9, 0x41, 0xec, 0xfa, 0x17, 0xf5, 0x6c, 0xe6, 0x44, 0x5e, 0xdb,
  1934  	0x41, 0xae, 0x20, 0xda, 0x01, 0x79, 0x36, 0x9b, 0x3a, 0x68, 0x38, 0x26, 0x1e, 0xdf, 0x32, 0xaa,
  1935  	0xa7, 0x2a, 0xb1, 0x5a, 0x66, 0x6b, 0xf3, 0x4e, 0x9e, 0xbe, 0x99, 0x13, 0x19, 0xbb, 0x32, 0x01,
  1936  	0x3e, 0x02, 0xd9, 0x80, 0xc2, 0xb1, 0x46, 0xc8, 0xa1, 0x7a, 0xba, 0x12, 0xab, 0xa5, 0xcd, 0x8c,
  1937  	0xc0, 0x0e, 0x04, 0x04, 0xb7, 0x41, 0x8c, 0x60, 0x5b, 0x07, 0x62, 0xad, 0x6a, 0xbc, 0x9d, 0x3f,
  1938  	0xe7, 0xc6, 0xc3, 0x95, 0xaf, 0xc9, 0xc1, 0xa3, 0xc6, 0xf4, 0xbc, 0x41, 0xb0, 0x5d, 0xef, 0x62,
  1939  	0x7b, 0x31, 0x37, 0x62, 0x5d, 0x6c, 0x9b, 0x3c, 0x89, 0x2b, 0x0c, 0x5a, 0x8d, 0x14, 0x66, 0xc4,
  1940  	0x4e, 0x7d, 0x56, 0xa1, 0xc8, 0x88, 0x14, 0x7e, 0x0f, 0x4a, 0x0c, 0xbb, 0x68, 0x18, 0xbd, 0xab,
  1941  	0x21, 0xa6, 0x43, 0x8a, 0x98, 0x9e, 0xad, 0xa8, 0xb5, 0x94, 0x9c, 0x2f, 0xe4, 0x21, 0xc7, 0x61,
  1942  	0x44, 0x87, 0xf6, 0x10, 0x83, 0x27, 0xe0, 0x01, 0x96, 0xe7, 0x64, 0x79, 0x85, 0x4e, 0xf8, 0xd9,
  1943  	0xd3, 0x73, 0x42, 0x44, 0xfd, 0x8b, 0xcf, 0x90, 0x38, 0x96, 0x66, 0x09, 0x7f, 0xf2, 0x86, 0xee,
  1944  	0x83, 0xec, 0x04, 0x91, 0xa1, 0x2b, 0xbf, 0x69, 0x3d, 0x2f, 0xc8, 0xbf, 0xba, 0x93, 0x7c, 0xe5,
  1945  	0x64, 0x99, 0x99, 0xc9, 0xca, 0xfd, 0xf2, 0x40, 0x76, 0x66, 0xb3, 0x25, 0x51, 0x41, 0x10, 0x6d,
  1946  	0xdf, 0x49, 0xf4, 0x9f, 0xe7, 0xa5, 0x59, 0x58, 0xcc, 0x8d, 0xcc, 0xa0, 0xd5, 0x5f, 0xd6, 0x9b,
  1947  	0xd9, 0x2c, 0x34, 0x9e, 0xbc, 0x8f, 0x81, 0x64, 0xb0, 0x58, 0x30, 0x0f, 0x40, 0x93, 0x10, 0x27,
  1948  	0xb0, 0x34, 0x05, 0xe6, 0x40, 0xba, 0xe3, 0x31, 0x69, 0xaa, 0xb0, 0x00, 0x32, 0x7b, 0x0e, 0xb1,
  1949  	0x42, 0x60, 0x0d, 0x6e, 0x80, 0x5c, 0x0b, 0x8d, 0xb1, 0x6b, 0x85, 0x29, 0x31, 0x4e, 0xd1, 0xb2,
  1950  	0x18, 0x92, 0x76, 0x1c, 0xde, 0x03, 0x85, 0x3e, 0x76, 0x11, 0x65, 0x96, 0x3b, 0x95, 0x60, 0x02,
  1951  	0x42, 0x90, 0x0f, 0x67, 0x2b, 0xb1, 0x24, 0xd4, 0x40, 0xb6, 0xc7, 0x7c, 0xec, 0x4d, 0x24, 0xb2,
  1952  	0xce, 0xcb, 0x35, 0x2f, 0x18, 0xa2, 0x12, 0x48, 0xc1, 0x12, 0xd8, 0x88, 0xb8, 0xfa, 0x2f, 0x24,
  1953  	0x9c, 0x86, 0x3a, 0x28, 0xee, 0x12, 0xc7, 0xb1, 0x18, 0xb2, 0x3f, 0x60, 0x00, 0x5c, 0x7f, 0x17,
  1954  	0xdb, 0xd2, 0xcc, 0x72, 0xb9, 0x03, 0xef, 0xcc, 0x23, 0xaf, 0x3c, 0x09, 0xe5, 0xb8, 0xdc, 0xc1,
  1955  	0x2c, 0x0a, 0xc9, 0xf3, 0x9a, 0xe2, 0x20, 0x4a, 0xa0, 0xc0, 0x03, 0x3a, 0x47, 0x28, 0x6c, 0x59,
  1956  	0xe3, 0x36, 0xd7, 0x20, 0xed, 0x0d, 0x6e, 0x3f, 0xa3, 0x24, 0x24, 0x84, 0xbc, 0x0d, 0xee, 0x8f,
  1957  	0xe4, 0xdd, 0xe3, 0x94, 0x7d, 0xfe, 0x1d, 0x49, 0xa0, 0xc8, 0x55, 0x35, 0x71, 0xc8, 0x58, 0xe2,
  1958  	0xc3, 0xd8, 0x47, 0xc4, 0x45, 0xcc, 0x0f, 0xab, 0xde, 0xe7, 0x53, 0xdb, 0x47, 0x64, 0xe2, 0x5b,
  1959  	0xd3, 0xd3, 0x10, 0x7c, 0xc0, 0x4b, 0xb5, 0xbd, 0x99, 0x2b, 0x6d, 0x9d, 0xf3, 0xec, 0x78, 0xa1,
  1960  	0xdb, 0xde, 0x8c, 0x5f, 0xfe, 0x56, 0x56, 0xaa, 0xf1, 0x54, 0x46, 0xcb, 0x54, 0x93, 0xa9, 0x1b,
  1961  	0x55, 0xbb, 0x51, 0xab, 0xc9, 0xd4, 0x1b, 0x55, 0x7b, 0xa3, 0x3e, 0xf1, 0x41, 0xf1, 0x53, 0xff,
  1962  	0xa9, 0x30, 0x0d, 0x12, 0x83, 0xa3, 0x5e, 0xbb, 0xaf, 0x29, 0x30, 0x05, 0xe2, 0xcf, 0xdb, 0x3b,
  1963  	0xa6, 0xa6, 0x72, 0xf0, 0xb0, 0x7b, 0xd4, 0x7f, 0xaa, 0xad, 0xc1, 0x75, 0x10, 0x6b, 0xed, 0x3c,
  1964  	0xd7, 0x62, 0xdc, 0xfb, 0xb4, 0x3b, 0x30, 0xb5, 0x38, 0x04, 0x20, 0x79, 0xd8, 0x39, 0x1a, 0xf4,
  1965  	0xdb, 0x5a, 0x82, 0x3f, 0xf7, 0xda, 0xbb, 0xdd, 0xa3, 0x96, 0x96, 0xe4, 0x6d, 0x1e, 0x76, 0x0e,
  1966  	0x0e, 0x3a, 0x12, 0x58, 0x6f, 0x3e, 0xbe, 0x79, 0x5f, 0x56, 0x6e, 0x16, 0x65, 0xf5, 0xed, 0xa2,
  1967  	0xac, 0xbe, 0x5b, 0x94, 0xd5, 0xbf, 0x16, 0x65, 0xf5, 0xf5, 0x6d, 0x59, 0x79, 0x7b, 0x5b, 0x56,
  1968  	0xde, 0xdd, 0x96, 0x95, 0x17, 0x09, 0xb1, 0xc0, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x23, 0x2f,
  1969  	0x94, 0xb2, 0xf5, 0x08, 0x00, 0x00,
  1970  }