pgcom.commuter.Commuter.insert_return¶
- Commuter.insert_return(cmd: Union[str, psycopg2.sql.Composed], values: Optional[Union[Sequence[Any], Mapping[str, Any]]] = None, return_id: Optional[str] = None) int [source]¶
Insert a new row to the table and return the serial key of the newly inserted row.
- Parameters
cmd – INSERT INTO command.
values – Collection of values to be inserted.
return_id – Name of the returned serial key.