a

package
v0.0.0-...-dc806d7 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeCreateTable      = 1
	TypeFillTable        = 2
	TypeSelectAll        = 4
	TypeCreateFunction   = 8
	TypeSelectDumbNormal = 16
	TypeSelectDumbTest   = 32
	TypeCreateCreator    = 64
	TypeFinalization     = 128
)
View Source
const ErrfTypeUnrecognized = "Type is unrecognized: %v."
View Source
const QueryCreateCreator = `` /* 476-byte string literal not displayed */
View Source
const QueryCreateFunction = `CREATE FUNCTION add_name_clear(name text)
RETURNS integer
LANGUAGE sql
AS $$
	----------------------------------------------------------------------------
	--|	This is a demonstrative Function which inserts a Name into the Table |-- 
	--| which is cleared before the Insertion.                               |--
	----------------------------------------------------------------------------
    DELETE FROM ` + TableNameFull + ` WHERE TRUE;
    INSERT INTO ` + TableNameFull + ` ("Name")
    VALUES (name)
    RETURNING "Id";
$$;
`
View Source
const QueryCreateTable = `CREATE TABLE ` + TableNameFull + `
(
    "Id"   serial NOT NULL PRIMARY KEY,
    "Name" text   NOT NULL
);`
View Source
const QueryFillTable = `INSERT INTO ` + TableNameFull + ` ("Id", "Name")
VALUES 
	(1, 'Aaa'),
	(2, 'Bbb'),
	(3, 'Ccc'),
	(4, 'John'),
	(5, 'Jack'),
	(6, 'Gojoko'),
	(7, 'Fojo'),
	(8, 'Koho');
`
View Source
const QueryFinalization = `DROP TABLE ` + TableNameFull + `;
DROP FUNCTION create_object(text);
DROP FUNCTION add_name_clear(text);`
View Source
const QueryFormatDumb = `SELECT "Id", "Name"
FROM ` + TableNameFull + `
WHERE
	("Name" ILIKE '%%%s%%');`
View Source
const QuerySelectAll = `SELECT * 
FROM ` + TableNameFull + `;`
View Source
const TableNameFull = `public."TestA"`

Variables

This section is empty.

Functions

func Demo

func Demo(
	testName string,
	testDescription string,
	testDatabaseDsn string,
	testType int,
) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL