func WithTable(t string) Option {
	return func(o *Options) {
		o.Table = t
	}
}
WithTable sets the default table for queries
package model
import (
	"context"
	"errors"
	"github.com/micro/micro/v3/service/store"
)
var (
	ErrorNilInterface         = errors.New("interface is nil")
	ErrorNotFound             = errors.New("not found")
	ErrorMultipleRecordsFound = errors.New("multiple records found")
)
type OrderType string
const (
	OrderTypeUnordered = OrderType("unordered")
	OrderTypeAsc       = OrderType("ascending")
	OrderTypeDesc      = OrderType("descending")
)
const (
	queryTypeEq  = "eq"
	indexTypeEq  = "eq"
	queryTypeAll = "all"
	indexTypeAll = "all"
)
var (
	DefaultKey = "ID"
	DefaultIndex = newIndex("ID")
	DefaultModel = NewModel()
)
type Model interface {
	Context(ctx context.Context) Model
	Register(v interface{}) error
	Create(v interface{}) error
	Update(v interface{}) error
	Read(query Query, resultPointer interface{}) error
	Delete(query Query) error
}
type Options struct {
	Database string
	Table string
	Debug bool
	Indexes []Index
	Namespace string
	Store store.Store
	Context context.Context
	Key string
}
type Option func(*Options)
func WithDatabase(db string) Option {
	return func(o *Options) {
		o.Database = db
	}
}