sql

package
v0.0.0-...-aabdbfd Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound error = fmt.Errorf("User not found")
)

Functions

func CreateUser

func CreateUser(engine *xorm.Engine, user User) error

func New

func New(DatabaseConnStr string) (*xorm.Engine, error)

func UpdateUser

func UpdateUser(engine *xorm.Engine, user User) error

Types

type User

type User struct {
	TelegramId        int64 `xorm:"pk unique"`
	PrimaryLanguage   string
	SecondaryLanguage string
}

func GetUserByID

func GetUserByID(engine *xorm.Engine, id int64) (User, error)

Jump to

Keyboard shortcuts

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