// Code generated by depstubber. DO NOT EDIT.
// This is a simple stub for github.com/go-pg/pg/orm, strictly for use in testing.

// See the LICENSE file for information about the licensing of the original library.
// Source: github.com/go-pg/pg/orm (exports: Query; functions: Q)

// Package orm is a stub of github.com/go-pg/pg/orm, generated by depstubber.
package orm

import (
	context "context"
	io "io"
	reflect "reflect"
)

type ColumnScanner interface {
	ScanColumn(_ int, _ string, _ interface{}, _ int) error
}

type CreateTableOptions struct {
	Temp          bool
	IfNotExists   bool
	Varchar       int
	FKConstraints bool
}

type DB interface {
	Context() context.Context
	CopyFrom(_ io.Reader, _ interface{}, _ ...interface{}) (Result, error)
	CopyTo(_ io.Writer, _ interface{}, _ ...interface{}) (Result, error)
	Delete(_ interface{}) error
	Exec(_ interface{}, _ ...interface{}) (Result, error)
	ExecContext(_ context.Context, _ interface{}, _ ...interface{}) (Result, error)
	ExecOne(_ interface{}, _ ...interface{}) (Result, error)
	ExecOneContext(_ context.Context, _ interface{}, _ ...interface{}) (Result, error)
	ForceDelete(_ interface{}) error
	FormatQuery(_ []byte, _ string, _ ...interface{}) []byte
	Insert(_ ...interface{}) error
	Model(_ ...interface{}) *Query
	ModelContext(_ context.Context, _ ...interface{}) *Query
	Query(_ interface{}, _ interface{}, _ ...interface{}) (Result, error)
	QueryContext(_ context.Context, _ interface{}, _ interface{}, _ ...interface{}) (Result, error)
	QueryOne(_ interface{}, _ interface{}, _ ...interface{}) (Result, error)
	QueryOneContext(_ context.Context, _ interface{}, _ interface{}, _ ...interface{}) (Result, error)
	Select(_ interface{}) error
	Update(_ interface{}) error
}

type DropTableOptions struct {
	IfExists bool
	Cascade  bool
}

type Field struct {
	Field    reflect.StructField
	Type     reflect.Type
	GoName   string
	SQLName  string
	Column   interface{}
	SQLType  string
	Index    []int
	Default  interface{}
	OnDelete string
	OnUpdate string
}

func (_ *Field) AppendValue(_ []byte, _ reflect.Value, _ int) []byte {
	return nil
}

func (_ *Field) Copy() *Field {
	return nil
}

func (_ *Field) HasFlag(_ byte) bool {
	return false
}

func (_ *Field) IsZeroValue(_ reflect.Value) bool {
	return false
}

func (_ *Field) OmitZero() bool {
	return false
}

func (_ *Field) ScanValue(_ reflect.Value, _ interface{}, _ int) error {
	return nil
}

func (_ *Field) SetFlag(_ byte) {}

func (_ *Field) Value(_ reflect.Value) reflect.Value {
	return reflect.Value{}
}

type Method struct {
	Index int
}

func (_ *Method) AppendValue(_ []byte, _ reflect.Value, _ int) []byte {
	return nil
}

func (_ *Method) Has(_ int8) bool {
	return false
}

func (_ *Method) Value(_ reflect.Value) reflect.Value {
	return reflect.Value{}
}

type Model interface {
	AddModel(_ ColumnScanner) error
	AfterDelete(_ context.Context, _ DB) error
	AfterInsert(_ context.Context, _ DB) error
	AfterQuery(_ context.Context, _ DB) error
	AfterSelect(_ context.Context, _ DB) error
	AfterUpdate(_ context.Context, _ DB) error
	BeforeDelete(_ context.Context, _ DB) error
	BeforeInsert(_ context.Context, _ DB) error
	BeforeSelectQuery(_ context.Context, _ DB, _ *Query) (*Query, error)
	BeforeUpdate(_ context.Context, _ DB) error
	Init() error
	NewModel() ColumnScanner
}

func Q(_ string, _ ...interface{}) interface{} {
	return nil
}

type Query struct{}

func (_ *Query) AppendFormat(_ []byte, _ QueryFormatter) []byte {
	return nil
}

func (_ *Query) Apply(_ func(*Query) (*Query, error)) *Query {
	return nil
}

func (_ *Query) Column(_ ...string) *Query {
	return nil
}

func (_ *Query) ColumnExpr(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Context(_ context.Context) *Query {
	return nil
}

func (_ *Query) Copy() *Query {
	return nil
}

func (_ *Query) CopyFrom(_ io.Reader, _ interface{}, _ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) CopyTo(_ io.Writer, _ interface{}, _ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) Count() (int, error) {
	return 0, nil
}

func (_ *Query) CountEstimate(_ int) (int, error) {
	return 0, nil
}

func (_ *Query) CreateTable(_ *CreateTableOptions) error {
	return nil
}

func (_ *Query) DB(_ DB) *Query {
	return nil
}

func (_ *Query) Delete(_ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) Deleted() *Query {
	return nil
}

func (_ *Query) DropTable(_ *DropTableOptions) error {
	return nil
}

func (_ *Query) ExcludeColumn(_ ...string) *Query {
	return nil
}

func (_ *Query) Exec(_ interface{}, _ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) ExecOne(_ interface{}, _ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) Exists() (bool, error) {
	return false, nil
}

func (_ *Query) First() error {
	return nil
}

func (_ *Query) For(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) ForEach(_ interface{}) error {
	return nil
}

func (_ *Query) ForceDelete(_ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) FormatQuery(_ []byte, _ string, _ ...interface{}) []byte {
	return nil
}

func (_ *Query) Formatter(_ QueryFormatter) *Query {
	return nil
}

func (_ *Query) GetModel() TableModel {
	return nil
}

func (_ *Query) Group(_ ...string) *Query {
	return nil
}

func (_ *Query) GroupExpr(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Having(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Insert(_ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) Join(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) JoinOn(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) JoinOnOr(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Last() error {
	return nil
}

func (_ *Query) Limit(_ int) *Query {
	return nil
}

func (_ *Query) Model(_ ...interface{}) *Query {
	return nil
}

func (_ *Query) New() *Query {
	return nil
}

func (_ *Query) Offset(_ int) *Query {
	return nil
}

func (_ *Query) OnConflict(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Order(_ ...string) *Query {
	return nil
}

func (_ *Query) OrderExpr(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Query(_ interface{}, _ interface{}, _ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) QueryOne(_ interface{}, _ interface{}, _ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) Relation(_ string, _ ...func(*Query) (*Query, error)) *Query {
	return nil
}

func (_ *Query) Returning(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Select(_ ...interface{}) error {
	return nil
}

func (_ *Query) SelectAndCount(_ ...interface{}) (int, error) {
	return 0, nil
}

func (_ *Query) SelectAndCountEstimate(_ int, _ ...interface{}) (int, error) {
	return 0, nil
}

func (_ *Query) SelectOrInsert(_ ...interface{}) (bool, error) {
	return false, nil
}

func (_ *Query) Set(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Table(_ ...string) *Query {
	return nil
}

func (_ *Query) TableExpr(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Update(_ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) UpdateNotNull(_ ...interface{}) (Result, error) {
	return nil, nil
}

func (_ *Query) Value(_ string, _ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) Where(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) WhereGroup(_ func(*Query) (*Query, error)) *Query {
	return nil
}

func (_ *Query) WhereIn(_ string, _ interface{}) *Query {
	return nil
}

func (_ *Query) WhereInMulti(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) WhereOr(_ string, _ ...interface{}) *Query {
	return nil
}

func (_ *Query) WhereOrGroup(_ func(*Query) (*Query, error)) *Query {
	return nil
}

func (_ *Query) WherePK() *Query {
	return nil
}

func (_ *Query) WhereStruct(_ interface{}) *Query {
	return nil
}

func (_ *Query) With(_ string, _ *Query) *Query {
	return nil
}

func (_ *Query) WrapWith(_ string) *Query {
	return nil
}

type QueryFormatter interface {
	FormatQuery(_ []byte, _ string, _ ...interface{}) []byte
}

type Relation struct {
	Type          int
	Field         *Field
	JoinTable     *Table
	FKs           []*Field
	Polymorphic   *Field
	FKValues      []*Field
	M2MTableName  interface{}
	M2MTableAlias interface{}
	BaseFKs       []string
	JoinFKs       []string
}

func (_ *Relation) String() string {
	return ""
}

type Result interface {
	Model() Model
	RowsAffected() int
	RowsReturned() int
}

type Table struct {
	Type               reflect.Type
	TypeName           string
	Alias              interface{}
	ModelName          string
	Name               string
	FullName           interface{}
	FullNameForSelects interface{}
	Tablespace         interface{}
	Fields             []*Field
	PKs                []*Field
	DataFields         []*Field
	FieldsMap          map[string]*Field
	Methods            map[string]*Method
	Relations          map[string]*Relation
	Unique             map[string][]*Field
	SoftDeleteField    *Field
}

func (_ *Table) AddField(_ *Field) {}

func (_ *Table) AppendParam(_ []byte, _ reflect.Value, _ string) ([]byte, bool) {
	return nil, false
}

func (_ *Table) GetField(_ string) (*Field, error) {
	return nil, nil
}

func (_ *Table) HasField(_ string) bool {
	return false
}

func (_ *Table) HasFlag(_ uint16) bool {
	return false
}

func (_ *Table) RemoveField(_ *Field) {}

func (_ *Table) SetFlag(_ uint16) {}

func (_ *Table) String() string {
	return ""
}

type TableModel interface {
	AddJoin(_ interface{}) interface{}
	AddModel(_ ColumnScanner) error
	AfterDelete(_ context.Context, _ DB) error
	AfterInsert(_ context.Context, _ DB) error
	AfterQuery(_ context.Context, _ DB) error
	AfterSelect(_ context.Context, _ DB) error
	AfterUpdate(_ context.Context, _ DB) error
	AppendParam(_ []byte, _ QueryFormatter, _ string) ([]byte, bool)
	BeforeDelete(_ context.Context, _ DB) error
	BeforeInsert(_ context.Context, _ DB) error
	BeforeSelectQuery(_ context.Context, _ DB, _ *Query) (*Query, error)
	BeforeUpdate(_ context.Context, _ DB) error
	GetJoin(_ string) interface{}
	GetJoins() []interface{}
	Index() []int
	Init() error
	IsNil() bool
	Join(_ string, _ func(*Query) (*Query, error)) interface{}
	Kind() reflect.Kind
	Mount(_ reflect.Value)
	NewModel() ColumnScanner
	ParentIndex() []int
	Relation() *Relation
	Root() reflect.Value
	Table() *Table
	Value() reflect.Value
}
