pgutil

package
v0.0.0-...-d26fc85 Latest Latest
Warning

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

Go to latest
Published: May 2, 2015 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePgArray

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

func ParsePgRow(row string) []string

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

func TimestampTZToTime

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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