database

package
v0.0.0-...-6a1a954 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteDataStmt = `DELETE FROM %s WHERE %s IN (%s)`

statement to delete a single data record

View Source
var FindPkStmt = `
	SELECT column_name, constraint_name
	FROM information_schema.key_column_usage
	WHERE table_name=$1 AND constraint_name=$2
`

statement to get the PK field of a table by default constraint name

View Source
var GetColNumber = `
	SELECT attnum
	FROM pg_attribute
	WHERE attrelid='%s'::regclass AND attname='%s'
`

statement to distinguish char and file field

View Source
var GetCommentStmt = `SELECT col_description('%s'::regclass, %v)`

statement to distinguish char and file field

View Source
var GetFieldStmt = `SELECT %s FROM %s WHERE %s=$1`

statement to get a single value of a column field

View Source
var GetMetaDataStmt = `` /* 146-byte string literal not displayed */

statement to construct HTML form field definitions

View Source
var GetTotalObjStmt = `SELECT COUNT(*) FROM %s`
View Source
var InsertDataStmt = "INSERT INTO %s (%s) VALUES (%s)"

statement to insert dynamic data to dynamic column fields

View Source
var PkTypeStmt = `
	SELECT column_name, column_default
	FROM information_schema.columns
	WHERE table_name=$1 AND column_name=$2
`

get the PK field type (SERIAL or other else)

View Source
var RetrievePksStmt = `SELECT %s FROM %s ORDER BY %s LIMIT %d OFFSET %d`

statement to a list of PKs

View Source
var RetrieveTableStmt = `
	SELECT table_name
	FROM information_schema.tables
	WHERE table_schema='public'
	ORDER BY table_name
`

statement to get table names

View Source
var TableVerifyStmt = `
	SELECT table_name
	FROM information_schema.tables
	WHERE table_name=$1 AND table_schema='public'
`

statement to get the tables whose table schema is public

View Source
var UpdateDataStmt = "UPDATE %s SET %s WHERE %s=$1"

statement to update a single data record

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