Type of returned rows when the insert uses RETURNING
The shard binding to execute the insert on
The INSERT statement to execute
Parameter values to bind to the statement
idColumn names the generated key column, table enables cleanup of a refused row
Promise resolving to the write result plus the generated id
Executes an insert directly on a named shard and returns the generated primary key.
Use this helper when you already know the shard you want to target. The helper still captures the generated id and stores the mapping so routed reads can find the new row later.
Throws
GENERATED_KEY_COLLISIONwhen another shard already owns the generated id. Cleanup of the row the refused INSERT wrote works as in insert: passoptions.tableto have it deleted, otherwise it is the caller's to remove.