Documentation ¶
Index ¶
- Constants
- Variables
- func InitCon()
- func InitMigration()
- type Client
- func (c *Client) CreateOrUpdate(ctx context.Context, db *sqlx.DB, data interface{}, query string) (lastId int64, err error)
- func (c *Client) Get(ctx context.Context, db *sqlx.DB, data interface{}, query *util.Query, ...) (err error)
- func (c *Client) Select(ctx context.Context, db *sqlx.DB, data *[]entity.Question, query *util.Query, ...) (err error)
- type IMysql
Constants ¶
View Source
const ( // Find QueryFindQuestions = `SELECT id, no, question, answer FROM questions` // Insert QueryInsertQuestion = `INSERT INTO questions (no, question, answer) VALUES (:no, :question, :answer)` // Update QueryUpdateQuestion = `UPDATE questions SET no=:no, question=:question, answer=:answer WHERE no=:no` // delete QueryDeleteQuestion = `DELETE FROM questions WHERE no=:no` )
Variables ¶
View Source
var QuizMasterDB *sqlx.DB
Functions ¶
func InitMigration ¶
func InitMigration()
Types ¶
Click to show internal directories.
Click to hide internal directories.