MCPcopy Index your code
hub / github.com/riverqueue/river / InsertMany

Method InsertMany

rivertype/river_type.go:465–465  ·  view source on GitHub ↗

InsertMany is invoked around a batch insert operation. Implementations must always include a call to doInner to call down the middleware stack and perform the batch insertion, and may run custom code before and after. Returning an error from this function will fail the overarching insert operation,

(ctx context.Context, manyParams []*JobInsertParams, doInner func(context.Context) ([]*JobInsertResult, error))

Source from the content-addressed store, hash-verified

463 // Returning an error from this function will fail the overarching insert
464 // operation, even if the inner insertion originally succeeded.
465 InsertMany(ctx context.Context, manyParams []*JobInsertParams, doInner func(context.Context) ([]*JobInsertResult, error)) ([]*JobInsertResult, error)
466}
467
468// WorkerMiddleware provides an interface for middleware that integrations can

Callers 6

Example_batchInsertFunction · 0.65
Test_Client_InsertManyFunction · 0.65
insertManySharedMethod · 0.65
insertJobsMethod · 0.65
TestRequireManyInsertedFunction · 0.65

Implementers 6

overridableJobMiddlewaremiddleware_test.go
JobBothInsertAndWorkMiddlewareexample_global_middleware_test.go
JobInsertMiddlewareexample_global_middleware_test.go
JobInsertMiddlewareDefaultsmiddleware_defaults.go
testMiddlewareJobInsertAndWorkerinternal/middlewarelookup/middleware_l
testMiddlewareJobInsertinternal/middlewarelookup/middleware_l

Calls

no outgoing calls

Tested by 3

Example_batchInsertFunction · 0.52
Test_Client_InsertManyFunction · 0.52
TestRequireManyInsertedFunction · 0.52