mirror of
https://github.com/hanzo-ds/native.git
synced 2026-10-30 20:00:34 +00:00
Module path, package names, and identifiers de-branded to native/proto/compress/ pool/tracing. Server wire-protocol strings preserved. Vendored codec surface used by hanzo-ds/go (proto + compress).
33 lines
522 B
Go
33 lines
522 B
Go
package proto
|
|
|
|
import "github.com/go-faster/errors"
|
|
|
|
type TableColumns struct {
|
|
First string
|
|
Second string
|
|
}
|
|
|
|
func (c *TableColumns) DecodeAware(r *Reader, _ int) error {
|
|
{
|
|
v, err := r.Str()
|
|
if err != nil {
|
|
return errors.Wrap(err, "first")
|
|
}
|
|
c.First = v
|
|
}
|
|
{
|
|
v, err := r.Str()
|
|
if err != nil {
|
|
return errors.Wrap(err, "second")
|
|
}
|
|
c.Second = v
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (c TableColumns) EncodeAware(b *Buffer, _ int) {
|
|
ServerCodeTableColumns.Encode(b)
|
|
b.PutString(c.First)
|
|
b.PutString(c.Second)
|
|
}
|