Skip to content

Instantly share code, notes, and snippets.

@dayweek

dayweek/ar7.sql Secret

Last active April 29, 2016 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dayweek/bb33c72e548eac715ce142807b1a5ee6 to your computer and use it in GitHub Desktop.
Save dayweek/bb33c72e548eac715ce142807b1a5ee6 to your computer and use it in GitHub Desktop.
isets = ItemSet.includes(:items)
ItemSet Load (1.8ms)
SELECT "item_sets".* FROM "item_sets" Item Load (9.2ms)
SELECT "items".* FROM "items" WHERE "items"."item_set_id" IN(1, 41, 65, 81, ... 639, 640, 644, 645, 647, 648, 650, 651, 653, 654, 655, 658, 659, 660, 661, 662, 663, 664, 697, 698, 717, 718, 737, 761, 785, 812, 908)
=> #<ActiveRecord::Relation [#<ItemSet id: 1, name: "The Gladiator">,
#<ItemSet id: 41, name: "Dal'Rend's Arms">, #<ItemSet id: 65, name: "Spider's Kiss">,
#<ItemSet id: 81, name: "The Postmaster">, #<ItemSet id: 121, name: "Cadaverous Garb">,
#<ItemSet id: 122, name: "Necropile Raiment">, #<ItemSet id: 123, name: "Bloodmail Regalia">,
#<ItemSet id: 124, name: "Deathbone Guardian">, #<ItemSet id: 141, name: "Volcanic Armor">,
#<ItemSet id: 142, name: "Stormshroud Armor">, ...]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment