models

package
v0.0.0-...-82c895e Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2014 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEBUG = true // 输出调试信息
	// DEBUG = false    // 不输出调试信息
	PAGE_SIZE = 10 //每页显示数据
)

Variables

This section is empty.

Functions

func ArticleById

func ArticleById(q *qbs.Qbs, id int64) (*xuanblog_article, error)

func ArticleCount

func ArticleCount(q *qbs.Qbs) (count int64)

func ArticleList

func ArticleList(q *qbs.Qbs, offset int) ([]*xuanblog_article, error)

获得文章列表

func Check

func Check(err error)

func DBConn

func DBConn() (q *qbs.Qbs)

func Debug

func Debug(infos ...interface{})

当DEBUG开关打开时,输出调试信息 使用方法:`debug('格式化字符串', 参数1, 参数2, ...)` 输出结果:`DEBUG: 提示信息`(会自动换行) 相当于加强版的`fmt.Println()`,支持格式化字符串,输出以`DEBUG: `开头

func InitDb

func InitDb()

func RedirectToError

func RedirectToError(this *beego.Controller, err error)

func SliceContains

func SliceContains(strSlice []string, str string) bool

判断字符串切片中是否包含某个字符串

func Str2date

func Str2date(timeStr string) (timeObj time.Time, err error)

把字符串转换为time.Time对象

func Str2slice

func Str2slice(str string) []string

把用`, `间隔的字符串转换为字符串列表(例如关键字列表)

Types

This section is empty.

Jump to

Keyboard shortcuts

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