sql

package
v0.0.0-...-b8f4d2c Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const CreateLink = `
	INSERT INTO links (
		url, created_by, created_at
	)
	VALUES (
		$1, $2, NOW()
	)
	RETURNING id
`
View Source
const CreateSchema = `
	CREATE TABLE IF NOT EXISTS schema_migrations (
		version integer
	);
`
View Source
const GetLinkByID = `
	SELECT id, url, created_by, created_at
	FROM links
	WHERE id = $1
`
View Source
const GetLinkByURL = `
	SELECT id, url, created_by, created_at
	FROM links
	WHERE url = $1
`
View Source
const InsertSchema = `
	INSERT INTO schema_migrations (version) VALUES (0);
`
View Source
const SelectSchema = `
	SELECT * FROM schema_migrations;
`

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