Is your feature request related to a problem? Please describe.
Add support for adding multiple records via code gen. This can take 2 forms either wrapped in a transaction or not.
This could be supported with a try naming prefix. Also this could be expanded to to single record inserts as well.
Describe the solution you'd like
Add a new set code gen operations:
// For type Foo
// Current
Operations.insertFoo ctx foo
// New
Operations.insertFooRecords ctx foos // Returns string, can throw exception
Operations.tryInsertFooRecords ctx foos // Returns Result<unit, string>, wraps in transaction.
Operations.tryInsertFooRecord ctx foo // Returns Result<unit, string>, wraps in transaction.
Also possible rename Operations.insertFoo to Operations.insertFooRecord to keep a standard naming convention.
Adding Record as a suffix deals with naming readability around plurals.
For example records called series where the name can both singular and plural or cases where the plural is not simply created by adding s to the end.
Describe alternatives you've considered
This can be achieve by the user reasonable easy, but this would be a nice convenience and move some potential boiler plating to generated code.
Additional context
This is a nice to have so doesn't need to hold anything else up.
Is your feature request related to a problem? Please describe. Add support for adding multiple records via code gen. This can take 2 forms either wrapped in a transaction or not.
This could be supported with a
try
naming prefix. Also this could be expanded to to single record inserts as well.Describe the solution you'd like Add a new set code gen operations:
Also possible rename
Operations.insertFoo
toOperations.insertFooRecord
to keep a standard naming convention.Adding
Record
as a suffix deals with naming readability around plurals.For example records called
series
where the name can both singular and plural or cases where the plural is not simply created by addings
to the end.Describe alternatives you've considered This can be achieve by the user reasonable easy, but this would be a nice convenience and move some potential boiler plating to generated code.
Additional context This is a
nice to have
so doesn't need to hold anything else up.