sql_queries

package
v0.0.0-...-ef30428 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InsertUser = `INSERT INTO users(about, email, fullname, nickname)
				    VALUES($1,$2,$3,$4);`

	UpdateUser = `UPDATE users SET about = $1, email = $2, fullname = $3
					WHERE LOWER(nickname) = LOWER($4);`

	SelectUserByNickname = `SELECT u.about, u.email, u.fullname, u.nickname 
							  FROM users as u
							  WHERE LOWER(u.nickname) = LOWER($1);`

	SelectUserByEmail = `SELECT u.about, u.email, u.fullname, u.nickname 
						   FROM users as u
						   WHERE LOWER(u.email) = LOWER($1);`

	SelectUsersByNicknameAndEmail = `` /* 167-byte string literal not displayed */

	Truncate = `` /* 220-byte string literal not displayed */

	SelectAll = `` /* 258-byte string literal not displayed */

	InsertForum = `INSERT INTO forums(slug, title, user_nick)
					 VALUES($1,$2,$3);`

	SelectForum = `SELECT posts, slug, threads, title, user_nick
					 FROM forums
					 WHERE LOWER(slug) = LOWER($1);`

	InsertThread = `` /* 240-byte string literal not displayed */

	SelectThreadBySlug = `SELECT slug, title, message, forum, author, created, votes, id
							FROM threads 
							WHERE LOWER(slug) = LOWER($1)`

	SelectThreadById = `SELECT slug, title, message, forum, author, created, votes, id
							FROM threads 
							WHERE id=$1`

	QueryTemplateGetForumUsers = `` /* 235-byte string literal not displayed */

	SelectThreadsByForum = `` /* 149-byte string literal not displayed */

	SelectThreadIdBySlug = `SELECT id FROM threads WHERE lower(slug)=lower($1)`

	SelectThreadIdById = `SELECT id FROM threads WHERE id=$1`

	InsertVote = `` /* 197-byte string literal not displayed */

	SelectPostById = `SELECT author, created, forum, id, message, thread, isedited, parent 
						FROM posts 
						WHERE id = $1`
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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