db

package
v0.0.0-...-21be9bc Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessages

func GetMessages(db_client MySQLClient, reverseSetting string, chat string, cursor int64, limit int32) (*sql.Rows, error)

func GetProperties

func GetProperties(rows *sql.Rows, limit int32) ([]*rpc.Message, int64, bool, error)

func InsertMessage

func InsertMessage(db_client MySQLClient, chat string, sender string, text string, sendTime int64) error

Types

type MySQLClient

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

func (*MySQLClient) ExecQuery

func (c *MySQLClient) ExecQuery(query string, args ...interface{}) error

func (*MySQLClient) InitClient

func (c *MySQLClient) InitClient(ctx context.Context, dataSourceName string) error

func (*MySQLClient) SelectQuery

func (c *MySQLClient) SelectQuery(query string, args ...interface{}) (*sql.Rows, error)

func (*MySQLClient) TestConnection

func (c *MySQLClient) TestConnection(ctx context.Context) error

Jump to

Keyboard shortcuts

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