database

package
v0.0.0-...-199751f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SQLQueryEntities list entities
	SQLQueryEntities = `` /* 208-byte string literal not displayed */

	// SQLQueryEntityMetadata list entity columns
	SQLQueryEntityMetadata = `` /* 291-byte string literal not displayed */

)
View Source
const (
	PgDatabaseConnectionString = "user=postgres dbname=developer sslmode=disable"
)
View Source
const (
	// SQLListEntityResults select / from / where for entity
	SQLListEntityResults = `
SELECT {FIELDS}
FROM {TABLE_NAME}
WHERE TRUE=true {WHERE_CONDITION}
LIMIT {LIMIT} OFFSET {OFFSET}`
)

Variables

This section is empty.

Functions

func CountResults

func CountResults(entity string) int64

CountResults Count items

func DescribeEntity

func DescribeEntity(d DbTyped, schemaName string, entityName string) []string

DescribeEntity return columns for an entity

func ListEntities

func ListEntities(d DbTyped) []string

ListEntities List postgress entities

func ListResults

func ListResults(entity string, limit int, offset int) []map[string]interface{}

ListResults List results for an entity

Types

type DbTyped

type DbTyped string

Jump to

Keyboard shortcuts

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