example

package
v0.0.0-...-8554e18 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUserTable

func CreateUserTable() error

func DeleteUser

func DeleteUser(q *qbs.Qbs, id int64) (affected int64, err error)

func GetUser

func GetUser(w http.ResponseWriter, r *http.Request)

func RegisterDb

func RegisterDb()

func UpdateMultipleUsers

func UpdateMultipleUsers(q *qbs.Qbs) (affected int64, err error)

func UpdateOneUser

func UpdateOneUser(q *qbs.Qbs, id int64, name string) (affected int64, err error)

Types

type Post

type Post struct {
	Id       int64
	AuthorId int64
	Author   *User
	Content  string
	Created  time.Time
	Updated  time.Time
}

func FindPostsOmitContentAndCreated

func FindPostsOmitContentAndCreated(q *qbs.Qbs) ([]*Post, error)

func FindPostsOmitJoin

func FindPostsOmitJoin(q *qbs.Qbs) ([]*Post, error)

type User

type User struct {
	Id   int64
	Name string `qbs:"size:50,index"`
}

func CreateUser

func CreateUser(q *qbs.Qbs) (*User, error)

func FindUserByCondition

func FindUserByCondition(q *qbs.Qbs) (*User, error)

func FindUserById

func FindUserById(q *qbs.Qbs, id int64) (*User, error)

func FindUserByName

func FindUserByName(q *qbs.Qbs, n string) (*User, error)

func FindUsers

func FindUsers(q *qbs.Qbs) ([]*User, error)

func (*User) Indexes

func (*User) Indexes(indexes *qbs.Indexes)

Jump to

Keyboard shortcuts

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