api-server: github.com/DevMine/api-server/util/pgutil Index | Files

package pgutil

import "github.com/DevMine/api-server/util/pgutil"

Package pgutil provides utilities to deal with PostgreSQL specific data types.


Package Files


func ParsePgArray Uses

func ParsePgArray(array string) []string

ParsePgArray parses the output string from the array type. Regex used: (((?P<value>(([^",\\{}\s(NULL)])+|"([^"\\]|\\"|\\\\)*")))(,)?) Thanks to adharris: https://gist.github.com/adharris/4163702

func ParsePgRow Uses

func ParsePgRow(row string) []string

ParsePgRow a pg row which looks like "(12,\"foo, bar\", 12)" (unquoted)

func TimestampTZToTime Uses

func TimestampTZToTime(t string) (time.Time, error)

TimestampTZToTime converts a pg timestamp with timezone datetime formatted string to a time.Time

Package pgutil imports 7 packages (graph) and is imported by 1 packages. Updated 2016-07-21. Refresh now. Tools for package owners.