userdata

package
v0.0.0-...-babe8d3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sql represents SQL database implementation of the user data persistence layer

Index

Constants

View Source
const (
	// use it to test transaction rollback
	//DELETE_USER        string = "delete from userinf where username=?"
	DELETE_USER string = "delete from userinfo where username=?"
	QUERY_USER         = "SELECT * FROM userinfo "
	UPDATE_USER        = "update userinfo set username=?, department=?, created=? where uid=?"
	INSERT_USER        = "INSERT userinfo SET username=?,department=?,created=?"

	FORMAT_ISO8601_DATE = "2006-01-02"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UserDataSql

type UserDataSql struct {
	DB gdbc.SqlGdbc
}

UserDataSql is the SQL implementation of UserDataInterface

func (*UserDataSql) EnableTx

func (uds *UserDataSql) EnableTx(txFunc func() error) error

func (*UserDataSql) FindAll

func (uds *UserDataSql) FindAll() error

func (*UserDataSql) Insert

func (uds *UserDataSql) Insert(name string, department string, created time.Time) (id int64, e error)

func (*UserDataSql) Remove

func (uds *UserDataSql) Remove(username string) (int64, error)

func (*UserDataSql) Update

func (uds *UserDataSql) Update(name string, department string, created time.Time, id int64) (rowsAffected int64, e error)

Jump to

Keyboard shortcuts

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