postgres

package
v0.0.0-...-8d1786a Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DbFieldNameFromModelName

func DbFieldNameFromModelName(exampleStruct interface{}, fieldName string) (string, error)

DbFieldNameFromModelName gets the field name from db given postgres model struct

func InsertIntoDBQueryString

func InsertIntoDBQueryString(tableName string, dbModelStruct interface{}) string

InsertIntoDBQueryString creates the query to insert a given struct into a given table

func StructFieldsForQuery

func StructFieldsForQuery(exampleStruct interface{}, colon bool, tablePrefix string) (string, string)

StructFieldsForQuery is a generic Insert statement for any table tablePrefix="" is used to specify table name, i.e. "l" to get "l.name", etc.

Types

type JsonbPayload

type JsonbPayload map[string]interface{}

JsonbPayload is the jsonb payload

func (*JsonbPayload) Scan

func (jp *JsonbPayload) Scan(src interface{}) error

Scan is the scan interface implemented for the sql driver

func (JsonbPayload) Value

func (jp JsonbPayload) Value() (driver.Value, error)

Value is the value interface implemented for the sql driver

Jump to

Keyboard shortcuts

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