mysql

package
v0.0.0-...-fe5a163 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ArticleObjs _ArticleObjs
View Source
var CommentObjs _CommentObjs
View Source
var UserObjs _UserObjs

Functions

This section is empty.

Types

type Article

type Article struct {
	Id         int64     `json:"id"`
	UserId     int64     `json:"user_id"`
	Title      string    `json:"title"`
	State      int       `json:"state"` // 0: published, 1: draft, 2: hidden
	Content    string    `json:"content"`
	Donation   float64   `json:"donation"`
	CreateTime time.Time `json:"create_time"`
	UpdateTime time.Time `json:"update_time"`
}

func (Article) Delete

func (obj Article) Delete(dbtx gmq.DbTx) (int64, error)

func (Article) Insert

func (obj Article) Insert(dbtx gmq.DbTx) (Article, error)

func (Article) String

func (obj Article) String() string

func (Article) Update

func (obj Article) Update(dbtx gmq.DbTx) (int64, error)

type ArticleRowVisitor

type ArticleRowVisitor func(obj Article) bool

type Comment

type Comment struct {
	UserId     int64     `json:"user_id"`
	ArticleId  int64     `json:"article_id"`
	Content    string    `json:"content"`
	CreateTime time.Time `json:"create_time"`
	UpdateTime time.Time `json:"update_time"`
}

func (Comment) Delete

func (obj Comment) Delete(dbtx gmq.DbTx) (int64, error)

func (Comment) Insert

func (obj Comment) Insert(dbtx gmq.DbTx) (Comment, error)

func (Comment) String

func (obj Comment) String() string

func (Comment) Update

func (obj Comment) Update(dbtx gmq.DbTx) (int64, error)

type CommentRowVisitor

type CommentRowVisitor func(obj Comment) bool

type User

type User struct {
	Id         int64     `json:"id"`
	Name       string    `json:"name"`
	Password   string    `json:"password"`
	IsMarried  int       `json:"is_married"`
	Age        int       `json:"age"`
	CreateTime time.Time `json:"create_time"`
	UpdateTime time.Time `json:"update_time"`
}

func (User) Delete

func (obj User) Delete(dbtx gmq.DbTx) (int64, error)

func (User) Insert

func (obj User) Insert(dbtx gmq.DbTx) (User, error)

func (User) String

func (obj User) String() string

func (User) Update

func (obj User) Update(dbtx gmq.DbTx) (int64, error)

type UserRowVisitor

type UserRowVisitor func(obj User) bool

Jump to

Keyboard shortcuts

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