storj/satellite/satellitedb/dbx/gen.go
Michal Niewrzal a819d819e3
Overlay Cache master db merge (#877)
* Overlay Cache master db merge

* test update

* review comments

* Fix transaction usage

* removed unused variable

* added better limit handling

* better error handling
2018-12-17 21:14:16 +01:00

23 lines
456 B
Go

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package satellitedb
import (
"github.com/zeebo/errs"
)
//go:generate dbx.v1 schema -d postgres -d sqlite3 satellitedb.dbx .
//go:generate dbx.v1 golang -d postgres -d sqlite3 satellitedb.dbx .
func init() {
// catch dbx errors
c := errs.Class("satellitedb")
WrapErr = func(e *Error) error {
if e.Code == ErrorCode_NoRows {
return e.Err
}
return c.Wrap(e)
}
}