nidus-sync/db/dberrors/bob_errors.bob.go
Eli Ribble a68b8781e7
Add ability to make LLM agent forget the conversation history
This is extremely useful for testing.

In order to do this I needed to actually deploy the migration to a bob
fork so I could start to add support for behaviors I really want.
Specifically the ability to search for ids in a slice.
2026-01-27 18:44:02 +00:00

32 lines
987 B
Go

// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dberrors
import "github.com/lib/pq"
// ErrUniqueConstraint captures all unique constraint errors by explicitly leaving `s` empty.
var ErrUniqueConstraint = &UniqueConstraintError{s: ""}
type UniqueConstraintError struct {
// schema is the schema where the unique constraint is defined.
schema string
// table is the name of the table where the unique constraint is defined.
table string
// columns are the columns constituting the unique constraint.
columns []string
// s is a string uniquely identifying the constraint in the raw error message returned from the database.
s string
}
func (e *UniqueConstraintError) Error() string {
return e.s
}
func (e *UniqueConstraintError) Is(target error) bool {
err, ok := target.(*pq.Error)
if !ok {
return false
}
return err.Code == "23505" && (e.s == "" || err.Constraint == e.s)
}