repository

package
v0.0.0-...-da803b4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InsertUserQuery = `
	INSERT INTO
    users (email, password, is_staff)
	VALUES
    ($1, $2, $3)
	RETURNING id
	`

	FindUserByIdQuery = `
	SELECT 
		email, 
		is_staff 
	FROM 
		users 
	WHERE 
		id = $1;
	`

	FindByEmailUserQuery = `
	SELECT 
		id,
		email,
		password,
		is_staff
	FROM
		users
	WHERE
		email = $1;
	`

	DeleteUserQuery = `
	DELETE FROM 
		users
	WHERE
		id = $1;
	`
)

Variables

This section is empty.

Functions

func NewUsersRepo

func NewUsersRepo(db *sqlx.DB) domain.UserRepository

Types

This section is empty.

Jump to

Keyboard shortcuts

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