query

package
v0.0.0-...-e8836e2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const CountCreate = `
INSERT INTO count (count_id, date, link_id) VALUES ($1, now(), $2)
`
View Source
const CountGet = `
SELECT count(*) FROM count where link_id=$1`
View Source
const CreatePostgresql = `` /* 1302-byte string literal not displayed */
View Source
const LinkAllByUser = `` /* 337-byte string literal not displayed */
View Source
const LinkByAPIPoint = `` /* 133-byte string literal not displayed */
View Source
const LinkById = `
SELECT link_id, title, url, api_point, created_at, links.user_id
    FROM links
    WHERE link_id=$1 AND deleted_at is null
`
View Source
const LinkCreate = `
INSERT INTO links (link_id, title, url, api_point, created_at, user_id) VALUES ($1, $2, $3, $4, now(), $5)
`
View Source
const LinkDelete = `
UPDATE links
    SET deleted_at=now()
    WHERE link_id=$1 AND user_id=$2 AND deleted_at is NULL
`
View Source
const LinkIsApiPointExist = `
SELECT count(*)
    FROM links WHERE api_point=$1
`
View Source
const UserById = `
SELECT user_id, name FROM user WHERE user_id=$1 AND deleted_at IS NULL
`
View Source
const UserConnection = `
SELECT user_id, count(*) from users where name=lower($1) and password=$2 and deleted_at is null group by user_id
`
View Source
const UserCreate = `
INSERT INTO users (user_id, name, password, created_at) VALUES ($1, lower($2), $3, now())
`
View Source
const UserExist = `
SELECT count(*) FROM users WHERE user_id=$1 and name=lower($2) AND deleted_at is null
`

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