myPgBytea

package
v0.0.0-...-cee649a Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SchemaUser = `
		CREATE TABLE user_info_dktest (
    		user_id SERIAL PRIMARY KEY,
			user_name bytea,				
			remarks varchar(256)
		);
		`

Functions

func ConnectToDatabase

func ConnectToDatabase(conf string) *sqlx.DB

func CreateTable

func CreateTable(db *sqlx.DB)

func DropTable

func DropTable(db *sqlx.DB)

func InsertUser

func InsertUser(db *sqlx.DB, theUser UserInfo) (err error)

Types

type UserInfo

type UserInfo struct {
	UserID   int    `db:"user_id" json:"user_id"`
	UserName []byte `db:"user_name" json:"user_name"`
	Remarks  string `db:"remarks" json:"remarks"`
}

func RetrieveUser

func RetrieveUser(db *sqlx.DB, userID int) (theUser UserInfo, err error)

Jump to

Keyboard shortcuts

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