db

package
v0.0.0-...-953a791 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetUserByID    = "SELECT * FROM users WHERE id = $1;"
	GetUserByEmail = "SELECT * FROM users WHERE email = $1;"
	InsertUser     = `` /* 154-byte string literal not displayed */

	GetGistByID       = `SELECT * FROM gists WHERE file_id = $1`
	GetGistByShortURL = `UPDATE gists SET view_count = view_count + 1 WHERE short_url = $1 RETURNING *;`
	GetGistsByUserID  = `SELECT * FROM gists WHERE user_id = $1  and user_id = $2;`
	InsertGist        = `INSERT INTO gists ( user_id, file_id, gist_title, short_url, is_public) VALUES ( $1, $2, $3, $4, $5 );`
	UpdateGist        = `` /* 134-byte string literal not displayed */
	DeleteGist        = `UPDATE gists SET is_deleted = true, updated_at = $3 WHERE file_id = $1 AND user_id=$2 RETURNING file_id;`
)

KEEP queries constants here and then the functions that use them also here

Variables

This section is empty.

Functions

func CreateMinioClient

func CreateMinioClient() *minio.Client

func CreatePostgresConnection

func CreatePostgresConnection() *sqlx.DB

func InitMinioClient

func InitMinioClient(MinioClient *minio.Client)

Types

This section is empty.

Jump to

Keyboard shortcuts

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