tests

package
v0.0.0-...-c37112f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

generated by argen; DO NOT EDIT

generated by argen; DO NOT EDIT

generated by argen; DO NOT EDIT

generated by argen; DO NOT EDIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogMode

func LogMode(mode bool)

func Use

func Use(DB *sql.DB)

Types

type Post

type Post struct {
	Id     int `db:"pk"`
	UserId int `db:"fk"`
	Name   string
}

+AR

func (Post) All

func (m Post) All() *PostRelation

func (Post) Build

func (m Post) Build(p PostParams) *Post

func (Post) Count

func (m Post) Count(column ...string) int

func (Post) Create

func (m Post) Create(p PostParams) (*Post, *ar.Errors)

func (*Post) Delete

func (m *Post) Delete() (bool, *ar.Errors)

func (Post) DeleteAll

func (m Post) DeleteAll() (bool, *ar.Errors)

func (*Post) Destroy

func (m *Post) Destroy() (bool, *ar.Errors)

func (Post) Exists

func (m Post) Exists() bool

func (Post) Find

func (m Post) Find(id int) (*Post, error)

func (Post) FindBy

func (m Post) FindBy(cond string, args ...interface{}) (*Post, error)

func (Post) First

func (m Post) First() (*Post, error)

func (Post) Group

func (m Post) Group(group string, groups ...string) *PostRelation

func (*Post) IsNewRecord

func (m *Post) IsNewRecord() bool

func (*Post) IsPersistent

func (m *Post) IsPersistent() bool

func (Post) IsValid

func (m Post) IsValid() (bool, *ar.Errors)

func (Post) JoinsUser

func (m Post) JoinsUser() *PostRelation

func (Post) Last

func (m Post) Last() (*Post, error)

func (Post) Limit

func (m Post) Limit(limit int) *PostRelation

func (Post) Offset

func (m Post) Offset(offset int) *PostRelation

func (Post) Order

func (m Post) Order(column, order string) *PostRelation

func (*Post) Save

func (m *Post) Save(validate ...bool) (bool, *ar.Errors)

func (Post) Select

func (m Post) Select(columns ...string) *PostRelation

func (*Post) Update

func (m *Post) Update(p PostParams) (bool, *ar.Errors)

func (*Post) UpdateColumns

func (m *Post) UpdateColumns(p PostParams) (bool, *ar.Errors)

func (*Post) User

func (m *Post) User() (*User, error)

func (Post) Where

func (m Post) Where(cond string, args ...interface{}) *PostRelation

type PostParams

type PostParams Post

type PostRelation

type PostRelation struct {
	*ar.Relation
	// contains filtered or unexported fields
}

func (*PostRelation) All

func (r *PostRelation) All() *PostRelation

func (*PostRelation) And

func (r *PostRelation) And(cond string, args ...interface{}) *PostRelation

func (*PostRelation) Find

func (r *PostRelation) Find(id int) (*Post, error)

func (*PostRelation) FindBy

func (r *PostRelation) FindBy(cond string, args ...interface{}) (*Post, error)

func (*PostRelation) First

func (r *PostRelation) First() (*Post, error)

func (*PostRelation) Group

func (r *PostRelation) Group(group string, groups ...string) *PostRelation

func (*PostRelation) Having

func (r *PostRelation) Having(cond string, args ...interface{}) *PostRelation

func (*PostRelation) JoinsUser

func (r *PostRelation) JoinsUser() *PostRelation

func (*PostRelation) Last

func (r *PostRelation) Last() (*Post, error)

func (*PostRelation) Limit

func (r *PostRelation) Limit(limit int) *PostRelation

func (*PostRelation) Offset

func (r *PostRelation) Offset(offset int) *PostRelation

func (*PostRelation) Order

func (r *PostRelation) Order(column, order string) *PostRelation

func (*PostRelation) Query

func (r *PostRelation) Query() ([]*Post, error)

func (*PostRelation) QueryRow

func (r *PostRelation) QueryRow() (*Post, error)

func (*PostRelation) Select

func (r *PostRelation) Select(columns ...string) *PostRelation

func (*PostRelation) Where

func (r *PostRelation) Where(cond string, args ...interface{}) *PostRelation

type User

type User struct {
	Id   int `db:"pk"`
	Name string
	Age  int
}

+AR

func (User) All

func (m User) All() *UserRelation

func (User) Build

func (m User) Build(p UserParams) *User

func (*User) BuildPost

func (m *User) BuildPost(p PostParams) *Post

func (User) Count

func (m User) Count(column ...string) int

func (User) Create

func (m User) Create(p UserParams) (*User, *ar.Errors)

func (*User) Delete

func (m *User) Delete() (bool, *ar.Errors)

func (User) DeleteAll

func (m User) DeleteAll() (bool, *ar.Errors)

func (*User) Destroy

func (m *User) Destroy() (bool, *ar.Errors)

func (User) Exists

func (m User) Exists() bool

func (User) Find

func (m User) Find(id int) (*User, error)

func (User) FindBy

func (m User) FindBy(cond string, args ...interface{}) (*User, error)

func (User) First

func (m User) First() (*User, error)

func (User) Group

func (m User) Group(group string, groups ...string) *UserRelation

func (*User) IsNewRecord

func (m *User) IsNewRecord() bool

func (*User) IsPersistent

func (m *User) IsPersistent() bool

func (User) IsValid

func (m User) IsValid() (bool, *ar.Errors)

func (User) JoinsPosts

func (m User) JoinsPosts() *UserRelation

func (User) Last

func (m User) Last() (*User, error)

func (User) Limit

func (m User) Limit(limit int) *UserRelation

func (User) Offset

func (m User) Offset(offset int) *UserRelation

func (User) OlderThan

func (m User) OlderThan(args ...interface{}) *UserRelation

func (User) Order

func (m User) Order(column, order string) *UserRelation

func (*User) Posts

func (m *User) Posts() ([]*Post, error)

func (*User) Save

func (m *User) Save(validate ...bool) (bool, *ar.Errors)

func (User) Select

func (m User) Select(columns ...string) *UserRelation

func (*User) Update

func (m *User) Update(p UserParams) (bool, *ar.Errors)

func (*User) UpdateColumns

func (m *User) UpdateColumns(p UserParams) (bool, *ar.Errors)

func (User) Where

func (m User) Where(cond string, args ...interface{}) *UserRelation

type UserParams

type UserParams User

type UserRelation

type UserRelation struct {
	*ar.Relation
	// contains filtered or unexported fields
}

func (*UserRelation) All

func (r *UserRelation) All() *UserRelation

func (*UserRelation) And

func (r *UserRelation) And(cond string, args ...interface{}) *UserRelation

func (*UserRelation) Find

func (r *UserRelation) Find(id int) (*User, error)

func (*UserRelation) FindBy

func (r *UserRelation) FindBy(cond string, args ...interface{}) (*User, error)

func (*UserRelation) First

func (r *UserRelation) First() (*User, error)

func (*UserRelation) Group

func (r *UserRelation) Group(group string, groups ...string) *UserRelation

func (*UserRelation) Having

func (r *UserRelation) Having(cond string, args ...interface{}) *UserRelation

func (*UserRelation) JoinsPosts

func (r *UserRelation) JoinsPosts() *UserRelation

func (*UserRelation) Last

func (r *UserRelation) Last() (*User, error)

func (*UserRelation) Limit

func (r *UserRelation) Limit(limit int) *UserRelation

func (*UserRelation) Offset

func (r *UserRelation) Offset(offset int) *UserRelation

func (*UserRelation) OlderThan

func (r *UserRelation) OlderThan(args ...interface{}) *UserRelation

func (*UserRelation) Order

func (r *UserRelation) Order(column, order string) *UserRelation

func (*UserRelation) Query

func (r *UserRelation) Query() ([]*User, error)

func (*UserRelation) QueryRow

func (r *UserRelation) QueryRow() (*User, error)

func (*UserRelation) Select

func (r *UserRelation) Select(columns ...string) *UserRelation

func (*UserRelation) Where

func (r *UserRelation) Where(cond string, args ...interface{}) *UserRelation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL