I'm using spoon to look for
Devices that have several attributes that define its location, and then create a
Cabinet in that location if one doesn't exist. Is there an operation that lets me get a cabinet.id value that is 1 greater than the highest currently in the table before each row is inserted.
Here's some pseudo code for what I want to do:
- Find Devices with location data AND not with cabinet_id
- Create a
Cabinetrecord in the location of the first
Devicerecord returned, using the next
- Get the next
Device, ensure a
Cabinetwas not created during this operation matching this Devices position, create a
Cabinetrecord with the next
Thanks for any guidance.