Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *pgxpool.Pool
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.
Click to show internal directories.
Click to hide internal directories.