good morning!!!!

Skip to content
Snippets Groups Projects
Commit b03f75b3 authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Adding interface Constraint{}.

parent 36bd0830
Branches
Tags
No related merge requests found
......@@ -47,6 +47,7 @@ var (
ErrUnsupportedDestination = errors.New(`Unsupported destination type.`)
ErrUnsupportedType = errors.New(`This type does not support marshaling.`)
ErrUnsupportedValue = errors.New(`This value does not support unmarshaling.`)
ErrUnknownConditionType = errors.New(`Arguments of type %s can't be used as constraints.`)
)
// Deprecated but kept for backwards compatibility. See: https://github.com/upper/db/issues/18
......
......@@ -330,8 +330,14 @@ type Unmarshaler interface {
UnmarshalDB(interface{}) error
}
// ID is the interface implemented by structs that can set its own ID after
// ID is the interface implemented by structs that can set their own ID after
// calling Append().
type ID interface {
SetID(...interface{}) error
}
// Constraint is the interface implemented by structs that can delimit
// themselves.
type Constraint interface {
Constraint() Cond
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment