Skip to content

omeid/pgerror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgerror GoDoc Build Status Go Report Card

pgerror is a collection of helper functions to use with github.com/lib/pq Postgresql Database driver for Go Programming language.

// example use:
_, err = stmt.Exec(SomeInsertStateMent, params...)
if err != nil {
  if e := pgerror.UniqueViolation(err); e != nil {
  // you can use e here to check the fields et al
    return SomeThingAlreadyExists
  }

  return err // other cases.
}

LICENSE

MIT.

About

github.com/lib/pq's little helper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages