clair: github.com/coreos/clair/database/pgsql/util Index | Files

package util

import "github.com/coreos/clair/database/pgsql/util"

Index

Package Files

error.go queries.go

func HandleError Uses

func HandleError(desc string, err error) error

HandleError logs an error with an extra description and masks the error if it's an SQL one. The function ensures we never return plain SQL errors and leak anything. The function should be used for every database query error.

func IsErrUniqueViolation Uses

func IsErrUniqueViolation(err error) bool

IsErrUniqueViolation determines is the given error is a unique contraint violation.

func QueryInsert Uses

func QueryInsert(count int, table string, columns ...string) string

func QueryPersist Uses

func QueryPersist(count int, table, constraint string, columns ...string) string

func QueryString Uses

func QueryString(keySize, arraySize int) string

size of key and array should be both greater than 0

Package util imports 8 packages (graph) and is imported by 18 packages. Updated 2019-03-27. Refresh now. Tools for package owners.