func (this *Queries_MySpanner) Insert(ctx context.Context, db persist.SpannerRunnable) *Query_MySpanner_Insert {
	return &Query_MySpanner_Insert{
		opts: this.opts,
		ctx:  ctx,
		db:   db,
	}
}
Insert returns a struct that will perform the 'insert' query.
When Execute is called, it will use the following fields:
[id start_time]
package basic
import (
	fmt "fmt"
	io "io"
	spanner "cloud.google.com/go/spanner"
	proto "github.com/golang/protobuf/proto"
	timestamp "github.com/golang/protobuf/ptypes/timestamp"
	persist "github.com/tcncloud/protoc-gen-persist/persist"
	test "github.com/tcncloud/protoc-gen-persisttests/test"
	context "golang.org/x/net/context"
	iterator "google.golang.org/api/iterator"
	codes "google.golang.org/grpc/codes"
	gstatus "google.golang.org/grpc/status"
)
type Result interface {
	LastInsertId() (int64, error)
	RowsAffected() (int64, error)
}
type SpannerResult struct {
	iter *spanner.RowIterator
}
func (sr *SpannerResult) LastInsertId() (int64, error) {
	return -1, nil
}
func (sr *SpannerResult) RowsAffected() (int64, error) {
	return sr.iter.RowCount, nil
}
type Queries_ExtraSrv struct {
	opts Opts_ExtraSrv
}
func QueriesExtraSrv(opts ...Opts_ExtraSrv) *Queries_ExtraSrv {
	var myOpts Opts_ExtraSrv
	if len(opts) > 0 {
		myOpts = opts[0]
	} else {
		myOpts = OptsExtraSrv(&DefaultHooks_ExtraSrv{}, &DefaultTypeMappings_ExtraSrv{})
	}
	return &Queries_ExtraSrv{
		opts: myOpts,
	}
}
func (this *Queries_ExtraSrv) Extra(ctx context.Context, db persist.SpannerRunnable) *Query_ExtraSrv_Extra {
	return &Query_ExtraSrv_Extra{
		opts: this.opts,
		ctx:  ctx,
		db:   db,
	}
}
type Query_ExtraSrv_Extra struct {
	opts Opts_ExtraSrv
	db   persist.SpannerRunnable
	ctx  context.Context
}
func (this *Query_ExtraSrv_Extra) QueryInType_Empty()         {}
func (this *Query_ExtraSrv_Extra) QueryOutType_HasTimestamp() {}
func (this *Query_ExtraSrv_Extra) Execute(x In_ExtraSrv_Extra) *Iter_ExtraSrv_Extra {
	ctx := this.ctx
	result := &Iter_ExtraSrv_Extra{
		result: &SpannerResult{},
		tm:     this.opts.MAPPINGS,
		ctx:    ctx,
	}
	params, err := func() (map[string]interface{}, error) {
		result := make(map[string]interface{})
		return result, nil
	}()
	if err != nil {
		result.err = err
		return result
	}
	iter := this.db.QueryWithStats(ctx, spanner.Statement{
		SQL:    "SELECT * FROM extra_unary",
		Params: params,
	})
	result.rows = iter
	result.err = err
	return result
}
type Iter_ExtraSrv_Extra struct {
	result *SpannerResult
	rows   *spanner.RowIterator
	err    error
	tm     TypeMappings_ExtraSrv
	ctx    context.Context
}
func (this *Iter_ExtraSrv_Extra) IterOutTypeHasTimestamp() {}
func (this *Iter_ExtraSrv_Extra) IterInTypeEmpty()         {}
func (this *Iter_ExtraSrv_Extra) Each(fun func(*Row_ExtraSrv_Extra) error) error {
	for {
		select {
		case <-this.ctx.Done():
			return this.ctx.Err()
		default:
			if row, ok := this.Next(); !ok {
				return nil
			} else if err := fun(row); err != nil {
				return err
			}
		}
	}
}
func (this *Iter_ExtraSrv_Extra) One() *Row_ExtraSrv_Extra {
	first, hasFirst := this.Next()
	if first != nil && first.err != nil {
		return &Row_ExtraSrv_Extra{err: first.err}
	}
	_, hasSecond := this.Next()
	if !hasFirst || hasSecond {
		amount := "none"
		if hasSecond {
			amount = "multiple"
		}
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("expected exactly 1 result from query 'Extra' found %s", amount)}
	}
	return first
}
func (this *Iter_ExtraSrv_Extra) Zero() error {
	row, ok := this.Next()
	if row != nil && row.err != nil {
		return row.err
	}
	if ok {
		return fmt.Errorf("expected exactly 0 results from query 'Extra'")
	}
	return nil
}
func (this *Iter_ExtraSrv_Extra) Next() (*Row_ExtraSrv_Extra, bool) {
	row, err := this.rows.Next()
	_ = row
	if err == iterator.Done {
		return nil, false
	}
	if err != nil {
		return &Row_ExtraSrv_Extra{err: err}, true
	}
	time := &timestamp.Timestamp{}
	timeBytes := make([]byte, 0)
	if err := row.ColumnByName("time", &timeBytes); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to convert db column time to []byte")}, true
	}
	if err := proto.Unmarshal(timeBytes, time); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to unmarshal column time to proto message")}, true
	}
	some := &Something{}
	someBytes := make([]byte, 0)
	if err := row.ColumnByName("some", &someBytes); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to convert db column some to []byte")}, true
	}
	if err := proto.Unmarshal(someBytes, some); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to unmarshal column some to proto message")}, true
	}
	var str string
	if err := row.ColumnByName("str", &str); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("cant convert db column str to protobuf go type string")}, true
	}
	table := &test.ExampleTable{}
	tableBytes := make([]byte, 0)
	if err := row.ColumnByName("table", &tableBytes); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to convert db column table to []byte")}, true
	}
	if err := proto.Unmarshal(tableBytes, table); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to unmarshal column table to proto message")}, true
	}
	var strs []string
	if err := row.ColumnByName("strs", &strs); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("cant convert db column strs to protobuf go type []string")}, true
	}
	tables := make([]*test.ExampleTable, 0)
	tablesBytes := make([][]byte, 0)
	if err := row.ColumnByName("tables", &tablesBytes); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to convert db column tables to [][]byte")}, true
	}
	for _, x := range tablesBytes {
		tmp := &test.ExampleTable{}
		if err := proto.Unmarshal(x, tmp); err != nil {
			return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to unmarshal column table to proto message")}, true
		}
		tables = append(tables, tmp)
	}
	somes := make([]*Something, 0)
	somesBytes := make([][]byte, 0)
	if err := row.ColumnByName("somes", &somesBytes); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to convert db column somes to [][]byte")}, true
	}
	for _, x := range somesBytes {
		tmp := &Something{}
		if err := proto.Unmarshal(x, tmp); err != nil {
			return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to unmarshal column table to proto message")}, true
		}
		somes = append(somes, tmp)
	}
	times := make([]*timestamp.Timestamp, 0)
	timesBytes := make([][]byte, 0)
	if err := row.ColumnByName("times", &timesBytes); err != nil {
		return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to convert db column times to [][]byte")}, true
	}
	for _, x := range timesBytes {
		tmp := &timestamp.Timestamp{}
		if err := proto.Unmarshal(x, tmp); err != nil {
			return &Row_ExtraSrv_Extra{err: fmt.Errorf("failed to unmarshal column table to proto message")}, true
		}
		times = append(times, tmp)
	}
	res := &HasTimestamp{
		Time:   time,
		Some:   some,
		Str:    str,
		Table:  table,
		Strs:   strs,
		Tables: tables,
		Somes:  somes,
		Times:  times,
	}
	return &Row_ExtraSrv_Extra{item: res}, true
}
func (this *Iter_ExtraSrv_Extra) Slice() []*Row_ExtraSrv_Extra {
	var results []*Row_ExtraSrv_Extra
	for {
		if i, ok := this.Next(); ok {
			results = append(results, i)
		} else {
			break
		}
	}
	return results
}
type In_ExtraSrv_Extra interface {
}
type Out_ExtraSrv_Extra interface {
	GetTime() *timestamp.Timestamp
	GetSome() *Something
	GetStr() string
	GetTable() *test.ExampleTable
	GetStrs() []string
	GetTables() []*test.ExampleTable
	GetSomes() []*Something
	GetTimes() []*timestamp.Timestamp
}
type Row_ExtraSrv_Extra struct {
	item Out_ExtraSrv_Extra
	err  error
}
func newRowExtraSrvExtra(item Out_ExtraSrv_Extra, err error) *Row_ExtraSrv_Extra {
	return &Row_ExtraSrv_Extra{item, err}
}
func (this *Row_ExtraSrv_Extra) Unwrap(pointerToMsg proto.Message) error {
	if this.err != nil {
		return this.err
	}
	if o, ok := (pointerToMsg).(*HasTimestamp); ok {
		if o == nil {
			return fmt.Errorf("must initialize *HasTimestamp before giving to Unwrap()")
		}
		res, _ := this.HasTimestamp()
		_ = res
		o.Time = res.Time
		o.Some = res.Some
		o.Str = res.Str
		o.Table = res.Table
		o.Strs = res.Strs
		o.Tables = res.Tables
		o.Somes = res.Somes
		o.Times = res.Times
		return nil
	}
	if o, ok := (pointerToMsg).(*test.ExampleTable); ok {
		if o == nil {
			return fmt.Errorf("must initialize *test.ExampleTable before giving to Unwrap()")
		}
		res, _ := this.TestExampleTable()
		_ = res
		return nil
	}
	return nil
}
func (this *Row_ExtraSrv_Extra) HasTimestamp() (*HasTimestamp, error) {
	if this.err != nil {
		return nil, this.err
	}
	return &HasTimestamp{
		Time:   this.item.GetTime(),
		Some:   this.item.GetSome(),
		Str:    this.item.GetStr(),
		Table:  this.item.GetTable(),
		Strs:   this.item.GetStrs(),
		Tables: this.item.GetTables(),
		Somes:  this.item.GetSomes(),
		Times:  this.item.GetTimes(),
	}, nil
}
func (this *Row_ExtraSrv_Extra) TestExampleTable() (*test.ExampleTable, error) {
	if this.err != nil {
		return nil, this.err
	}
	return &test.ExampleTable{}, nil
}
func (this *Row_ExtraSrv_Extra) Proto() (*HasTimestamp, error) {
	if this.err != nil {
		return nil, this.err
	}
	return &HasTimestamp{
		Time:   this.item.GetTime(),
		Some:   this.item.GetSome(),
		Str:    this.item.GetStr(),
		Table:  this.item.GetTable(),
		Strs:   this.item.GetStrs(),
		Tables: this.item.GetTables(),
		Somes:  this.item.GetSomes(),
		Times:  this.item.GetTimes(),
	}, nil
}
type Hooks_ExtraSrv interface {
}
type DefaultHooks_ExtraSrv struct{}
type TypeMappings_ExtraSrv interface {
}
type DefaultTypeMappings_ExtraSrv struct{}
type Opts_ExtraSrv struct {
	MAPPINGS TypeMappings_ExtraSrv
	HOOKS    Hooks_ExtraSrv
}
func OptsExtraSrv(hooks Hooks_ExtraSrv, mappings TypeMappings_ExtraSrv) Opts_ExtraSrv {
	opts := Opts_ExtraSrv{
		HOOKS:    &DefaultHooks_ExtraSrv{},
		MAPPINGS: &DefaultTypeMappings_ExtraSrv{},
	}
	if hooks != nil {
		opts.HOOKS = hooks
	}
	if mappings != nil {
		opts.MAPPINGS = mappings
	}
	return opts
}
type Impl_ExtraSrv struct {
	opts     *Opts_ExtraSrv
	QUERIES  *Queries_ExtraSrv
	HANDLERS RestOfHandlers_ExtraSrv
	DB       *spanner.Client
}
func ImplExtraSrv(db *spanner.Client, handlers RestOfHandlers_ExtraSrv, opts ...Opts_ExtraSrv) *Impl_ExtraSrv {
	var myOpts Opts_ExtraSrv
	if len(opts) > 0 {
		myOpts = opts[0]
	} else {
		myOpts = OptsExtraSrv(&DefaultHooks_ExtraSrv{}, &DefaultTypeMappings_ExtraSrv{})
	}
	return &Impl_ExtraSrv{
		opts:     &myOpts,
		QUERIES:  QueriesExtraSrv(myOpts),
		DB:       db,
		HANDLERS: handlers,
	}
}
type RestOfHandlers_ExtraSrv interface {
	ExtraMethod(context.Context, *test.ExampleTable) (*test.ExampleTable, error)
}
func (this *Impl_ExtraSrv) ExtraMethod(ctx context.Context, req *test.ExampleTable) (*test.ExampleTable, error) {
	return this.HANDLERS.ExtraMethod(ctx, req)
}
func (this *Impl_ExtraSrv) ExtraUnary(ctx context.Context, req *test.NumRows) (*test.ExampleTable, error) {
	query := this.QUERIES.Extra(ctx, this.DB.Single())
	result := query.Execute(req)
	res, err := result.One().TestExampleTable()
	if err != nil {
		return nil, err
	}
	return res, nil
}
type Queries_MySpanner struct {
	opts Opts_MySpanner
}
func QueriesMySpanner(opts ...Opts_MySpanner) *Queries_MySpanner {
	var myOpts Opts_MySpanner
	if len(opts) > 0 {
		myOpts = opts[0]
	} else {
		myOpts = OptsMySpanner(&DefaultHooks_MySpanner{}, &DefaultTypeMappings_MySpanner{})
	}
	return &Queries_MySpanner{
		opts: myOpts,
	}
}