Documentation
¶
Index ¶
- Constants
- Variables
- func PinMode(ctx context.Context) (context.Context, error)
- func WriterDatlyType() reflect.Type
- func WriterHandlerCurrentWriterIndexByIdKey(value *CurrentWriterView) (string, bool)
- type BulkDelete
- type BulkDeleteComponent
- type CurrentWriterView
- type Input
- func (input *Input) Init(ctx context.Context) error
- func (input *Input) PrepareReadIndexes(ctx context.Context) error
- func (input *Input) ReadIndexes(ctx context.Context) (*WriterHandlerReadIndexes, error)
- func (input *Input) SetCurrentWriter(value []*CurrentWriterView)
- func (input *Input) SetDeleteUnreferenced(value bool)
- func (input *Input) SetPayloads(value []*PayloadDelete)
- func (input *Input) SetWriterKeys(value []WriterKeysRow)
- type InputHas
- type Mode
- type Output
- type PayloadDelete
- type PayloadDeleteHas
- type WriterComponent
- type WriterHandlerCurrentWriterGroupedById
- type WriterHandlerCurrentWriterIndexedById
- type WriterHandlerCurrentWriterSlice
- type WriterHandlerReadIndexes
- type WriterKeysRow
Constants ¶
const MaxBatchSize = 400
MaxBatchSize bounds the private cleanup contract, not ordinary payload writes.
const ModeEnvironment = "AGENTLY_DELETE_PAYLOAD_MODE"
const WriterDatlyResourceNamespace = "datly_payload_delete_writer"
DatlyResourceNamespace identifies this package's generated resource filesystem.
Variables ¶
var BulkDeleteDatly = new(BulkDeleteComponent)
var WriterDatly = new(WriterComponent)
The public value supports explicit component wiring.
var WriterDatlyResources embed.FS
Functions ¶
func PinMode ¶
PinMode selects once before the enclosing deletion transaction begins. Nested graph/chunk invocations inherit it; invalid settings never fall back.
func WriterDatlyType ¶
WriterDatlyType returns the public component type.
func WriterHandlerCurrentWriterIndexByIdKey ¶
func WriterHandlerCurrentWriterIndexByIdKey(value *CurrentWriterView) (string, bool)
Types ¶
type BulkDelete ¶
type BulkDelete struct{}
func (*BulkDelete) Execute ¶
func (*BulkDelete) Execute(ctx context.Context, invocation rh.Invocation) (_ any, retErr error)
func (*BulkDelete) InputType ¶
func (*BulkDelete) InputType() reflect.Type
func (*BulkDelete) OutputType ¶
func (*BulkDelete) OutputType() reflect.Type
func (*BulkDelete) RequiresPreBindingTransaction ¶
func (*BulkDelete) RequiresPreBindingTransaction() bool
type BulkDeleteComponent ¶
type BulkDeleteComponent struct {
Contract xdatly.Component[Input, Output] `` /* 196-byte string literal not displayed */
}
BulkDeleteComponent is authored, not generated. It shares the row writer's trusted contract and key-only pre-read; one guarded row anchors the flush.
func (BulkDeleteComponent) DatlyHandler ¶
func (BulkDeleteComponent) DatlyHandler(name string) func() (rh.TypedHandler, error)
func (BulkDeleteComponent) EmbedFS ¶
func (BulkDeleteComponent) EmbedFS() *embed.FS
func (BulkDeleteComponent) EmbedNamespace ¶
func (BulkDeleteComponent) EmbedNamespace() string
type CurrentWriterView ¶
type CurrentWriterView struct {
Id string `validate:"required" sqlx:"id,primaryKey" json:"id"`
}
CurrentWriterView is generated canonical view metadata for writer.
type Input ¶
type Input struct {
DeleteUnreferenced bool `` /* 976-byte string literal not displayed */
Payloads []*PayloadDelete `` /* 189-byte string literal not displayed */
WriterKeys []WriterKeysRow `` /* 133-byte string literal not displayed */
CurrentWriter []*CurrentWriterView `` /* 170-byte string literal not displayed */
Has *InputHas `setMarker:"true" typeName:"InputHas" json:"-" sqlx:"-"`
// contains filtered or unexported fields
}
Input is the generated input scaffold for writer.
func (*Input) Init ¶
Init restricts this private key-only writer to explicitly marked deletions authorized by the trusted payloadaccess provider. Ordinary payload mutations still use payload/write. Reference predicates are also enforced by DELETE, so a reference arriving after the pre-read aborts the caller's transaction.
func (*Input) PrepareReadIndexes ¶
func (*Input) ReadIndexes ¶
func (input *Input) ReadIndexes(ctx context.Context) (*WriterHandlerReadIndexes, error)
func (*Input) SetCurrentWriter ¶
func (input *Input) SetCurrentWriter(value []*CurrentWriterView)
func (*Input) SetDeleteUnreferenced ¶
func (*Input) SetPayloads ¶
func (input *Input) SetPayloads(value []*PayloadDelete)
func (*Input) SetWriterKeys ¶
func (input *Input) SetWriterKeys(value []WriterKeysRow)
type Mode ¶
type Mode string
func PinnedMode ¶
PinnedMode is only consumed after PinMode at a deletion entry point.
type Output ¶
type Output struct {
Data []*PayloadDelete `parameter:"Data,kind=output,in=body,dataType=[]*PayloadDelete" json:"data,omitempty"`
}
Output is the generated output scaffold for writer.
type PayloadDelete ¶
type PayloadDelete struct {
ShouldDelete bool `sqlx:"-" writer:"delete" json:"shouldDelete,omitempty"`
Id string `validate:"required" sqlx:"id,primaryKey" json:"id"`
Has *PayloadDeleteHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-" typeName:"PayloadDeleteHas"`
}
PayloadDelete is generated canonical view metadata for writer.
func (*PayloadDelete) GetId ¶
func (entity *PayloadDelete) GetId() string
func (*PayloadDelete) GetShouldDelete ¶
func (entity *PayloadDelete) GetShouldDelete() bool
func (*PayloadDelete) SetId ¶
func (entity *PayloadDelete) SetId(value string)
func (*PayloadDelete) SetShouldDelete ¶
func (entity *PayloadDelete) SetShouldDelete(value bool)
type PayloadDeleteHas ¶
type WriterComponent ¶
type WriterComponent struct {
Contract xdatly.Component[Input, Output] "" /* 176-byte string literal not displayed */
}
Component is the generated component scaffold for writer.
func (WriterComponent) EmbedFS ¶
func (WriterComponent) EmbedFS() *embed.FS
func (WriterComponent) EmbedNamespace ¶
func (WriterComponent) EmbedNamespace() string
type WriterHandlerCurrentWriterGroupedById ¶
type WriterHandlerCurrentWriterGroupedById map[string][]*CurrentWriterView
func (WriterHandlerCurrentWriterGroupedById) Has ¶
func (index WriterHandlerCurrentWriterGroupedById) Has(key string) bool
type WriterHandlerCurrentWriterIndexedById ¶
type WriterHandlerCurrentWriterIndexedById map[string]*CurrentWriterView
func (WriterHandlerCurrentWriterIndexedById) Has ¶
func (index WriterHandlerCurrentWriterIndexedById) Has(key string) bool
type WriterHandlerCurrentWriterSlice ¶
type WriterHandlerCurrentWriterSlice []*CurrentWriterView
func (WriterHandlerCurrentWriterSlice) GroupById ¶
func (rows WriterHandlerCurrentWriterSlice) GroupById() WriterHandlerCurrentWriterGroupedById
func (WriterHandlerCurrentWriterSlice) IndexById ¶
func (rows WriterHandlerCurrentWriterSlice) IndexById() (WriterHandlerCurrentWriterIndexedById, error)
type WriterHandlerReadIndexes ¶
type WriterHandlerReadIndexes struct {
CurrentWriter WriterHandlerCurrentWriterSlice
CurrentWriterById WriterHandlerCurrentWriterIndexedById
}
func BuildWriterHandlerReadIndexes ¶
func BuildWriterHandlerReadIndexes(ctx context.Context, input *Input) (*WriterHandlerReadIndexes, error)
type WriterKeysRow ¶
type WriterKeysRow struct {
Id string `sqlx:"id"`
}