mysql

package
v0.0.0-...-aa82ca8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client MySQL客户端

func NewClient

func NewClient(cfg *conf.MySQLConfig) *Client

NewClient 新建MySQL客户端.

func (*Client) Close

func (cli *Client) Close() error

Close 关闭MySQL连接服务.

func (*Client) Query

func (cli *Client) Query(docID string) string

Query 根据文档ID查找数据库中对应的文档名.

func (*Client) Setup

func (cli *Client) Setup() error

Setup 初始化MySQL连接服务.

type Doc

type Doc struct {
	ID    int64
	DocID string `gorm:"size:8;column:doc_id;not null"`
	Title string `gorm:"size:255;column:title;not null"`
}

Doc 数据库schema定义

Jump to

Keyboard shortcuts

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