dal

package
v0.0.0-...-a2d740a Latest Latest
Warning

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

Go to latest
Published: May 9, 2015 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SQL_GET_DBVERSION_COUNT   = `SELECT count(value) AS count FROM dbversion`
	SQL_GET_DBVERSION_VERSION = `SELECT value FROM dbversion`
)
View Source
const (
	SQL_GET_LANGUAGE_COUNT = `SELECT count(id) AS count FROM language`
	SQL_GET_LANGUAGES      = `SELECT id, code, name FROM language`
)
View Source
const (
	SQL_CREATE_USER = `` /* 159-byte string literal not displayed */

	SQL_GET_USER = `SELECT id, user, password, email, name, admin,
        is_ldap, language, version
		FROM user
		WHERE user = :user`
	SQL_GET_USER_COUNT         = `SELECT count(id) AS count FROM user`
	SQL_GET_USER_WITH_PASSWORD = `` /* 144-byte string literal not displayed */

	SQL_IS_LDAP = `SELECT is_ldap FROM user WHERE user = :user`
)

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(txn *gorp.Transaction, user *models.User) error

func DbVersionCount

func DbVersionCount(txn *gorp.Transaction) (int64, error)

func GetLanguages

func GetLanguages(txn *gorp.Transaction) ([]models.Language, error)

func GetUser

func GetUser(txn *gorp.Transaction, user string, password string) (*models.User, error)

func GetVersion

func GetVersion(txn *gorp.Transaction) (string, error)

func InitModels

func InitModels(dbm *gorp.DbMap) error

func LanguageCount

func LanguageCount(txn *gorp.Transaction) (int64, error)

func UserCount

func UserCount(txn *gorp.Transaction) (int64, error)

Types

type DbVersionUndefinedError

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

func (DbVersionUndefinedError) Error

func (err DbVersionUndefinedError) Error() string

Jump to

Keyboard shortcuts

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