mysqlr

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package mysqlr is generated by ezorm (v2) DO NOT EDIT

Package mysqlr is generated by ezorm (v2) DO NOT EDIT

Package mysqlr is generated by ezorm (v2) DO NOT EDIT

Package mysqlr is generated by ezorm (v2) DO NOT EDIT

Package mysqlr is generated by ezorm (v2) DO NOT EDIT

Package mysqlr is generated from e2e/mysqlr/sqls directory by github.com/ezbuy/ezorm/v2 , DO NOT EDIT!

Index

Constants

This section is empty.

Variables

View Source
var AutoBlogColumns = struct {
	Id        string
	UserId    string
	Title     string
	Content   string
	Status    string
	Readed    string
	CreatedAt string
	UpdatedAt string
}{
	"id",
	"user_id",
	"title",
	"content",
	"status",
	"readed",
	"created_at",
	"updated_at",
}
View Source
var AutoBlogMgr *_AutoBlogMgr
View Source
var BlogColumns = struct {
	Id        string
	UserId    string
	Title     string
	Content   string
	Status    string
	Readed    string
	CreatedAt string
	UpdatedAt string
}{
	"id",
	"user_id",
	"title",
	"content",
	"status",
	"readed",
	"created_at",
	"updated_at",
}
View Source
var BlogMgr *_BlogMgr
View Source
var UserColumns = struct {
	Id        string
	UserId    string
	Name      string
	CreatedAt string
	UpdatedAt string
}{
	"id",
	"user_id",
	"name",
	"created_at",
	"updated_at",
}
View Source
var UserMgr *_UserMgr

Functions

func AutoBlogDBMgr added in v2.6.9

func AutoBlogDBMgr(db orm.DB) *_AutoBlogDBMgr

func BlogDBMgr

func BlogDBMgr(db orm.DB) *_BlogDBMgr

func GetRawQuery

func GetRawQuery() *sqlMethods

func MySQL

func MySQL() *orm.DBStore

func MySQLDSNSetup

func MySQLDSNSetup(dsn string)

func MySQLInstance

func MySQLInstance(key string) *orm.DBStore

func MySQLMultiDSNSetup

func MySQLMultiDSNSetup(key, dsn string)

func MySQLSetup

func MySQLSetup(cf *MySQLConfig)

func UserDBMgr added in v2.2.2

func UserDBMgr(db orm.DB) *_UserDBMgr

Types

type AutoBlog added in v2.6.9

type AutoBlog struct {
	Id        int64     `mysql:"id"`
	UserId    int32     `mysql:"user_id"`
	Title     string    `mysql:"title"`
	Content   string    `mysql:"content"`
	Status    int32     `mysql:"status"`
	Readed    int32     `mysql:"readed"`
	CreatedAt time.Time `mysql:"created_at"`
	UpdatedAt time.Time `mysql:"updated_at"`
}

func (*AutoBlog) GetClassName added in v2.6.9

func (obj *AutoBlog) GetClassName() string

func (*AutoBlog) GetColumns added in v2.6.9

func (obj *AutoBlog) GetColumns() []string

func (*AutoBlog) GetNameSpace added in v2.6.9

func (obj *AutoBlog) GetNameSpace() string

func (*AutoBlog) GetNoneIncrementColumns added in v2.6.9

func (obj *AutoBlog) GetNoneIncrementColumns() []string

func (*AutoBlog) GetPrimaryKey added in v2.6.9

func (obj *AutoBlog) GetPrimaryKey() PrimaryKey

func (*AutoBlog) GetTableName added in v2.6.9

func (obj *AutoBlog) GetTableName() string

func (*AutoBlog) Validate added in v2.6.9

func (obj *AutoBlog) Validate() error

type Blog

type Blog struct {
	Id        int64     `mysql:"id"`
	UserId    int32     `mysql:"user_id"`
	Title     string    `mysql:"title"`
	Content   string    `mysql:"content"`
	Status    int32     `mysql:"status"`
	Readed    int32     `mysql:"readed"`
	CreatedAt time.Time `mysql:"created_at"`
	UpdatedAt time.Time `mysql:"updated_at"`
}

func (*Blog) GetClassName

func (obj *Blog) GetClassName() string

func (*Blog) GetColumns

func (obj *Blog) GetColumns() []string

func (*Blog) GetNameSpace

func (obj *Blog) GetNameSpace() string

func (*Blog) GetNoneIncrementColumns

func (obj *Blog) GetNoneIncrementColumns() []string

func (*Blog) GetPrimaryKey

func (obj *Blog) GetPrimaryKey() PrimaryKey

func (*Blog) GetTableName

func (obj *Blog) GetTableName() string

func (*Blog) Validate

func (obj *Blog) Validate() error

type BlogAggrReq added in v2.6.15

type BlogAggrReq struct {
	Id int64 `sql:"id"`
}

func (*BlogAggrReq) Condition added in v2.6.15

func (req *BlogAggrReq) Condition() string

func (*BlogAggrReq) Params added in v2.6.15

func (req *BlogAggrReq) Params() []any

type BlogAggrResp added in v2.6.15

type BlogAggrResp struct {
	Count any `sql:"count"`
}

type BlogFuncReq added in v2.6.15

type BlogFuncReq struct {
	Id int64 `sql:"id"`
}

func (*BlogFuncReq) Condition added in v2.6.15

func (req *BlogFuncReq) Condition() string

func (*BlogFuncReq) Params added in v2.6.15

func (req *BlogFuncReq) Params() []any

type BlogFuncResp added in v2.6.15

type BlogFuncResp struct {
	LenTitle any `sql:"len_title"`
	UTitle   any `sql:"u_title"`
}

type BlogJoinOrderByReq added in v2.6.20

type BlogJoinOrderByReq struct {
	Id int64 `sql:"id"`
}

func (*BlogJoinOrderByReq) Condition added in v2.6.20

func (req *BlogJoinOrderByReq) Condition() string

func (*BlogJoinOrderByReq) Params added in v2.6.20

func (req *BlogJoinOrderByReq) Params() []any

type BlogJoinOrderByResp added in v2.6.20

type BlogJoinOrderByResp struct {
	Bid int64 `sql:"bid"`
	Uid int64 `sql:"uid"`
}

type BlogLikeReq added in v2.6.17

type BlogLikeReq struct {
	Title string `sql:"title"`
}

func (*BlogLikeReq) Condition added in v2.6.17

func (req *BlogLikeReq) Condition() string

func (*BlogLikeReq) Params added in v2.6.17

func (req *BlogLikeReq) Params() []any

type BlogLikeResp added in v2.6.17

type BlogLikeResp struct {
	Id     int64 `sql:"id"`
	Status int32 `sql:"status"`
}

type BlogOrderByReq added in v2.6.19

type BlogOrderByReq struct {
	UserId int64 `sql:"user_id"`
	Offset int32 `sql:"offset"`
	Limit  int32 `sql:"limit"`
}

func (*BlogOrderByReq) Condition added in v2.6.19

func (req *BlogOrderByReq) Condition() string

func (*BlogOrderByReq) Params added in v2.6.19

func (req *BlogOrderByReq) Params() []any

type BlogOrderByResp added in v2.6.19

type BlogOrderByResp struct {
	Status int32 `sql:"status"`
	UserId int32 `sql:"user_id"`
}

type BlogReq

type BlogReq struct {
	Id     int64 `sql:"id"`
	Offset int32 `sql:"offset"`
	Limit  int32 `sql:"limit"`
}

func (*BlogReq) Condition added in v2.6.12

func (req *BlogReq) Condition() string

func (*BlogReq) Params

func (req *BlogReq) Params() []any

type BlogResp

type BlogResp struct {
	Id     int64 `sql:"id"`
	Status int32 `sql:"status"`
}

type DBFetcher

type DBFetcher interface {
	FetchBySQL(sql string, args ...interface{}) ([]interface{}, error)
}

type IdOfAutoBlogPK added in v2.6.9

type IdOfAutoBlogPK struct {
	Id int64
}

func (*IdOfAutoBlogPK) Columns added in v2.6.9

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

func (*IdOfAutoBlogPK) Key added in v2.6.9

func (u *IdOfAutoBlogPK) Key() string

func (*IdOfAutoBlogPK) Parse added in v2.6.9

func (u *IdOfAutoBlogPK) Parse(key string) error

func (*IdOfAutoBlogPK) SQLFormat added in v2.6.9

func (u *IdOfAutoBlogPK) SQLFormat() string

func (*IdOfAutoBlogPK) SQLParams added in v2.6.9

func (u *IdOfAutoBlogPK) SQLParams() []interface{}

type IdUserIdOfBlogPK

type IdUserIdOfBlogPK struct {
	Id     int64
	UserId int32
}

func (*IdUserIdOfBlogPK) Columns

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

func (*IdUserIdOfBlogPK) Key

func (u *IdUserIdOfBlogPK) Key() string

func (*IdUserIdOfBlogPK) Parse

func (u *IdUserIdOfBlogPK) Parse(key string) error

func (*IdUserIdOfBlogPK) SQLFormat

func (u *IdUserIdOfBlogPK) SQLFormat() string

func (*IdUserIdOfBlogPK) SQLParams

func (u *IdUserIdOfBlogPK) SQLParams() []interface{}

type IdUserIdOfUserPK added in v2.2.2

type IdUserIdOfUserPK struct {
	Id     int64
	UserId int32
}

func (*IdUserIdOfUserPK) Columns added in v2.2.2

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

func (*IdUserIdOfUserPK) Key added in v2.2.2

func (u *IdUserIdOfUserPK) Key() string

func (*IdUserIdOfUserPK) Parse added in v2.2.2

func (u *IdUserIdOfUserPK) Parse(key string) error

func (*IdUserIdOfUserPK) SQLFormat added in v2.2.2

func (u *IdUserIdOfUserPK) SQLFormat() string

func (*IdUserIdOfUserPK) SQLParams added in v2.2.2

func (u *IdUserIdOfUserPK) SQLParams() []interface{}

type Index

type Index interface {
	SQL
	Key() string
	PositionOffsetLimit(len int) (int, int)
}

type MySQLConfig

type MySQLConfig struct {
	Host            string
	Port            int
	UserName        string
	Password        string
	Database        string
	PoolSize        int
	ConnMaxLifeTime time.Duration
}

type NameUserIdOfUserUK added in v2.4.0

type NameUserIdOfUserUK struct {
	Name   string
	UserId int32
}

func (*NameUserIdOfUserUK) Key added in v2.4.0

func (u *NameUserIdOfUserUK) Key() string

func (*NameUserIdOfUserUK) Limit added in v2.4.0

func (u *NameUserIdOfUserUK) Limit(n int)

func (*NameUserIdOfUserUK) Offset added in v2.4.0

func (u *NameUserIdOfUserUK) Offset(n int)

func (*NameUserIdOfUserUK) SQLFormat added in v2.4.0

func (u *NameUserIdOfUserUK) SQLFormat(limit bool) string

func (*NameUserIdOfUserUK) SQLLimit added in v2.4.0

func (u *NameUserIdOfUserUK) SQLLimit() int

func (*NameUserIdOfUserUK) SQLParams added in v2.4.0

func (u *NameUserIdOfUserUK) SQLParams() []any

type NameUserIdOfUserUKs added in v2.4.0

type NameUserIdOfUserUKs []*NameUserIdOfUserUK

func NewNameUserIdOfUserUKs added in v2.4.0

func NewNameUserIdOfUserUKs(s []*NameUserIdOfUserUK) NameUserIdOfUserUKs

func (NameUserIdOfUserUKs) SQLFormat added in v2.4.0

func (us NameUserIdOfUserUKs) SQLFormat(limit bool) string

func (NameUserIdOfUserUKs) SQLParams added in v2.4.0

func (us NameUserIdOfUserUKs) SQLParams() []any

type PrimaryKey

type PrimaryKey interface {
	Key() string
	SQLFormat() string
	SQLParams() []interface{}
	Columns() []string
	Parse(key string) error
}

! conf.orm

type RawQueryOption

type RawQueryOption struct {
	// contains filtered or unexported fields
}

type RawQueryOptionHandler

type RawQueryOptionHandler func(*RawQueryOption)

func WithDB

type SQL

type SQL interface {
	SQLFormat(limit bool) string
	SQLParams() []interface{}
	SQLLimit() int
	Offset(n int)
	Limit(n int)
}

type StatusOfAutoBlogIDX added in v2.6.9

type StatusOfAutoBlogIDX struct {
	Status int32
	// contains filtered or unexported fields
}

func (*StatusOfAutoBlogIDX) Key added in v2.6.9

func (u *StatusOfAutoBlogIDX) Key() string

func (*StatusOfAutoBlogIDX) Limit added in v2.6.9

func (u *StatusOfAutoBlogIDX) Limit(n int)

func (*StatusOfAutoBlogIDX) Offset added in v2.6.9

func (u *StatusOfAutoBlogIDX) Offset(n int)

func (*StatusOfAutoBlogIDX) PositionOffsetLimit added in v2.6.9

func (u *StatusOfAutoBlogIDX) PositionOffsetLimit(len int) (int, int)

func (*StatusOfAutoBlogIDX) SQLFormat added in v2.6.9

func (u *StatusOfAutoBlogIDX) SQLFormat(limit bool) string

func (*StatusOfAutoBlogIDX) SQLLimit added in v2.6.9

func (u *StatusOfAutoBlogIDX) SQLLimit() int

func (*StatusOfAutoBlogIDX) SQLParams added in v2.6.9

func (u *StatusOfAutoBlogIDX) SQLParams() []interface{}

type StatusOfBlogIDX

type StatusOfBlogIDX struct {
	Status int32
	// contains filtered or unexported fields
}

func (*StatusOfBlogIDX) Key

func (u *StatusOfBlogIDX) Key() string

func (*StatusOfBlogIDX) Limit

func (u *StatusOfBlogIDX) Limit(n int)

func (*StatusOfBlogIDX) Offset

func (u *StatusOfBlogIDX) Offset(n int)

func (*StatusOfBlogIDX) PositionOffsetLimit

func (u *StatusOfBlogIDX) PositionOffsetLimit(len int) (int, int)

func (*StatusOfBlogIDX) SQLFormat

func (u *StatusOfBlogIDX) SQLFormat(limit bool) string

func (*StatusOfBlogIDX) SQLLimit

func (u *StatusOfBlogIDX) SQLLimit() int

func (*StatusOfBlogIDX) SQLParams

func (u *StatusOfBlogIDX) SQLParams() []interface{}

type TitleOfBlogUK added in v2.4.0

type TitleOfBlogUK struct {
	Title string
}

func (*TitleOfBlogUK) Key added in v2.4.0

func (u *TitleOfBlogUK) Key() string

func (*TitleOfBlogUK) Limit added in v2.4.0

func (u *TitleOfBlogUK) Limit(n int)

func (*TitleOfBlogUK) Offset added in v2.4.0

func (u *TitleOfBlogUK) Offset(n int)

func (*TitleOfBlogUK) SQLFormat added in v2.4.0

func (u *TitleOfBlogUK) SQLFormat(limit bool) string

func (*TitleOfBlogUK) SQLLimit added in v2.4.0

func (u *TitleOfBlogUK) SQLLimit() int

func (*TitleOfBlogUK) SQLParams added in v2.4.0

func (u *TitleOfBlogUK) SQLParams() []any

type TitleOfBlogUKs added in v2.4.0

type TitleOfBlogUKs []*TitleOfBlogUK

func NewTitleOfBlogUKs added in v2.4.0

func NewTitleOfBlogUKs(s []*TitleOfBlogUK) TitleOfBlogUKs

func (TitleOfBlogUKs) SQLFormat added in v2.4.0

func (us TitleOfBlogUKs) SQLFormat(limit bool) string

func (TitleOfBlogUKs) SQLParams added in v2.4.0

func (us TitleOfBlogUKs) SQLParams() []any

type Unique

type Unique interface {
	SQL
	Key() string
}

type User added in v2.2.2

type User struct {
	Id        int64  `mysql:"id"`
	UserId    int32  `mysql:"user_id"`
	Name      string `mysql:"name"`
	CreatedAt int64  `mysql:"created_at"`
	UpdatedAt int64  `mysql:"updated_at"`
}

func (*User) GetClassName added in v2.2.2

func (obj *User) GetClassName() string

func (*User) GetColumns added in v2.2.2

func (obj *User) GetColumns() []string

func (*User) GetNameSpace added in v2.2.2

func (obj *User) GetNameSpace() string

func (*User) GetNoneIncrementColumns added in v2.2.2

func (obj *User) GetNoneIncrementColumns() []string

func (*User) GetPrimaryKey added in v2.2.2

func (obj *User) GetPrimaryKey() PrimaryKey

func (*User) GetTableName added in v2.2.2

func (obj *User) GetTableName() string

func (*User) Validate added in v2.2.2

func (obj *User) Validate() error

type UserIdTitleOfBlogUK added in v2.4.0

type UserIdTitleOfBlogUK struct {
	UserId int32
	Title  string
}

func (*UserIdTitleOfBlogUK) Key added in v2.4.0

func (u *UserIdTitleOfBlogUK) Key() string

func (*UserIdTitleOfBlogUK) Limit added in v2.4.0

func (u *UserIdTitleOfBlogUK) Limit(n int)

func (*UserIdTitleOfBlogUK) Offset added in v2.4.0

func (u *UserIdTitleOfBlogUK) Offset(n int)

func (*UserIdTitleOfBlogUK) SQLFormat added in v2.4.0

func (u *UserIdTitleOfBlogUK) SQLFormat(limit bool) string

func (*UserIdTitleOfBlogUK) SQLLimit added in v2.4.0

func (u *UserIdTitleOfBlogUK) SQLLimit() int

func (*UserIdTitleOfBlogUK) SQLParams added in v2.4.0

func (u *UserIdTitleOfBlogUK) SQLParams() []any

type UserIdTitleOfBlogUKs added in v2.4.0

type UserIdTitleOfBlogUKs []*UserIdTitleOfBlogUK

func NewUserIdTitleOfBlogUKs added in v2.4.0

func NewUserIdTitleOfBlogUKs(s []*UserIdTitleOfBlogUK) UserIdTitleOfBlogUKs

func (UserIdTitleOfBlogUKs) SQLFormat added in v2.4.0

func (us UserIdTitleOfBlogUKs) SQLFormat(limit bool) string

func (UserIdTitleOfBlogUKs) SQLParams added in v2.4.0

func (us UserIdTitleOfBlogUKs) SQLParams() []any

Jump to

Keyboard shortcuts

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