queries

package
v0.0.0-...-b696ed4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET_ARTICLES = `` /* 219-byte string literal not displayed */

	GET_ARTICLE_DETAILS = `` /* 291-byte string literal not displayed */

	INSERT_ARTICLE = `` /* 145-byte string literal not displayed */

	UPDATE_ARTICLE = `` /* 147-byte string literal not displayed */

	DELETE_ARTICLE = `DELETE FROM articles 
						WHERE id = $1`
)
View Source
const (
	GET_CATEGORY_TREE = `SELECT id, title, slug, created_at, updated_at
                     FROM categories ORDER BY id LIMIT $1 OFFSET $2`

	GET_CATEGORY_DETAILS = `SELECT id, title, slug, created_at, updated_at
                        FROM categories WHERE id = $1`

	GET_CATEGORY_BY_IDS = `SELECT id, title, slug FROM categories WHERE id IN (
  								SELECT unnest($1::integer[]));`

	INSERT_CATEGORY = `INSERT INTO categories (title, slug, created_at, updated_at)
							VALUES ($1, $2, $3, $4) RETURNING id`

	UPDATE_CATEGORY = `UPDATE categories SET title = $1, slug = $2, updated_at = $3
							WHERE id = $4`

	// Query if Category Used by Article, Cancel Commit
	DELETE_CATEGORY = `` /* 272-byte string literal not displayed */

)

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