1package plans
2
3type Action rune
4
5const (
6	NoOp             Action = 0
7	Create           Action = '+'
8	Read             Action = '←'
9	Update           Action = '~'
10	DeleteThenCreate Action = '∓'
11	CreateThenDelete Action = '±'
12	Delete           Action = '-'
13)
14
15//go:generate stringer -type Action
16
17// IsReplace returns true if the action is one of the two actions that
18// represents replacing an existing object with a new object:
19// DeleteThenCreate or CreateThenDelete.
20func (a Action) IsReplace() bool {
21	return a == DeleteThenCreate || a == CreateThenDelete
22}
23