test

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_ID uint64 = 1 << iota
	USER_NAME
	USER_AGE
	USER_FOLLOWINGS
	USER_FOLLOWERS

	UserIdCol         = "id"
	UserNameCol       = "name"
	UserAgeCol        = "age"
	UserFollowingsCol = "followings"
	UserFollowersCol  = "followers"
)
View Source
const (
	FOLLOW_USERID uint64 = 1 << iota
	FOLLOW_FOLLOWUSERID

	FollowUserIdCol       = "user_id"
	FollowFollowUserIdCol = "follow_user_id"
)

Variables

This section is empty.

Functions

func ASTConv

func ASTConv()

gomodel astConv = [

INSERT INTO Follow(UserId, FollowUserId)
    SELECT ?, ? FROM DUAL
    WHERE EXISTS(SELECT Id FROM User WHERE Id=?)

]

Types

type Follow

type Follow struct {
	UserId       int64 `table:"user_follow"`
	FollowUserId int64
}

func (*Follow) Columns

func (f *Follow) Columns() []string

func (*Follow) Ptrs

func (f *Follow) Ptrs(fields uint64, ptrs []interface{})

func (*Follow) Table

func (f *Follow) Table() string

func (*Follow) Vals

func (f *Follow) Vals(fields uint64, vals []interface{})

type User

type User struct {
	Id   int64
	Name string
	Age  int

	Followings int
	Followers  int
}

func (*User) Columns

func (u *User) Columns() []string

func (*User) Ptrs

func (u *User) Ptrs(fields uint64, ptrs []interface{})

func (*User) Table

func (u *User) Table() string

func (*User) Vals

func (u *User) Vals(fields uint64, vals []interface{})

Jump to

Keyboard shortcuts

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