Attaches a database-assigned id to a Draft, producing the persisted element.
id
Use this instead of inlining { ...draft, id } after an insert returns the new row id.
{ ...draft, id }
A persisted element type whose id is a required number
number
The draft to promote
The database-assigned id to attach
The persisted element with its id set
Attaches a database-assigned
idto a Draft, producing the persisted element.Use this instead of inlining
{ ...draft, id }after an insert returns the new row id.