Returning With Sequel
DB[:floors].returning(:id).insert(hotel_id: 4, id: 1, ...)
# [{id: 1}]DB[:floors].returning(:id, :hotel_id).insert(hotel_id: 4, id: 1, ...)
# [{id: 1, hotel_id: 4}]Last updated
DB[:floors].returning(:id).insert(hotel_id: 4, id: 1, ...)
# [{id: 1}]DB[:floors].returning(:id, :hotel_id).insert(hotel_id: 4, id: 1, ...)
# [{id: 1, hotel_id: 4}]Last updated