mysql

package
v0.0.0-...-ba48316 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QUERY_GET_USERS            = "SELECT * FROM auth"
	QUERY_GET_USER             = "SELECT * FROM auth WHERE id = ? "
	QUERY_GET_USER_EMAIL       = "SELECT id,username,email,password,role FROM auth WHERE email  like  ? limit 1 "
	QUERY_CREATE_USER          = "INSERT INTO auth (username, email,password,role, created, modified) VALUES (?, ?, ?, ?,?,?)"
	QUERY_UPDATE_USER          = "UPDATE auth SET username = ?,role = ? , modified = ? WHERE id = ?"
	QUERY_UPDATE_USER_PASSWORD = "UPDATE auth SET password = ? , modified = ? WHERE id = ?"
	QUERY_DELETE_USER          = "DELETE FROM auth WHERE id = ?"
)

Variables

This section is empty.

Functions

func Connect

func Connect(url string) (*sql.DB, error)

func NewRepository

func NewRepository(db *sql.DB) domain.Repository

Types

This section is empty.

Jump to

Keyboard shortcuts

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