a819d819e3
* Overlay Cache master db merge * test update * review comments * Fix transaction usage * removed unused variable * added better limit handling * better error handling
23 lines
456 B
Go
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)
|
|
}
|
|
}
|