func (this *DogIder) ToSql(request *pb.DogIds) sql.Scanner {
	this.ids = request
	return this
}
ToSql initializes the implementation with a value.  It expects its return value
to be able to scan out our request as a type that will fit in the db column
package main
import (
	"context"
	"database/sql"
	"database/sql/driver"
	"fmt"
	"net"
	"time"
	"github.com/lib/pq"
	pb "github.com/tcncloud/protoc-gen-persistdocs/test"
	"google.golang.org/grpc"
)
func main() {
	db, err := sql.Open("postgres", "user=postgres password=postgres dbname=postgres sslmode=disable")
	if err != nil {
		panic(err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
	defer cancel()
	catQuery := pb.QueriesPetShop().GetCatByName(ctx, db)
	catName := &pb.CatName{CatName: "boomi"}
	iter := catQuery.Execute(catName)
	for {
		row, ok := iter.Next()
		if !ok {
			break
		}
		cat, err := row.Proto()
		fmt.Printf("#+v\n", cat)
	}
	err = iter.Each(func(row *pb.Row_PetShop_GetCatByName) error {
		cat := pb.Cat{}
		if err := row.Unwrap(&cat); err != nil {
			return err
		}
		fmt.Printf("#+v\n", cat)
		return nil
	})
	err = iter.Zero()
	row := iter.One()
	cat, err := row.Cat()
}
func main2() {
	db, err := sql.Open("postgres", "user=postgres password=postgres dbname=postgres sslmode=disable")
	if err != nil {
		panic(err)
	}
	handlers := &MyPartOfPetShop{}
	service := pb.ImplPetShop(db, handlers)
	server := grpc.NewServer()
	pb.RegisterPetShopServer(server, service)
	lis, err := net.Listen("tcp", "0.0.0.0:50051")
	if err != nil {
		panic(err)
	}
	if err := server.Serve(lis); err != nil {
		fmt.Printf("error serving: %v\n", err)
	}
}
type MyPartOfPetShop struct{}
func (m *MyPartOfPetShop) PetDog(ctx context.Context, req *pb.Dog) (*pb.Empty, error) {
	return &pb.Empty{}, nil
}
func main3() {
	db, err := sql.Open("postgres", "user=postgres password=postgres dbname=postgres sslmode=disable")
	if err != nil {
		panic(err)
	}
	var owners *pb.Owner
	opts := pb.OptsPetShop(nil, &MyMapper{})
	pb.QueriesPetShop(opts).GetAllOwners(ctx, db).Execute().Each(func(row *pb.Row_PetShop_GetAllOwners) error {
		owner := pb.Owner{}
		if err := row.Unwrap(&owner); err != nil {
			return err
		}
		owners = append(owners, owner)
		return nil
	})
}
type MyMapper struct{}
func (m *MyMapper) DogIds() pb.MappingImpl_PetShop_DogIds {
	return &DogIder{}
}
type DogIder struct {
	ids *pb.DogIds
}
func (this *DogIder) ToProto(dest **pb.DogIds) error {
	*dest = this.ids
	return nil
}