Skip to content

Instantly share code, notes, and snippets.

@dayweek

dayweek/ar9.sql Secret

Last active April 29, 2016 09:55
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/ba2d925ce0f9accda99d2873bdf5d056 to your computer and use it in GitHub Desktop.
Save dayweek/ba2d925ce0f9accda99d2873bdf5d056 to your computer and use it in GitHub Desktop.
iset = ItemSet.includes(:item_set_bonuses,:items).where(name: "The Gladiator").first
ItemSet Load (0.1ms) SELECT "item_sets".* FROM "item_sets" WHERE "item_sets"."name" = ?
ORDER BY "item_sets"."id" ASC LIMIT ? [["name", "The Gladiator"], ["LIMIT", 1]]
ItemSetBonus Load (0.2ms) SELECT "item_set_bonuses".* FROM "item_set_bonuses"
WHERE "item_set_bonuses"."item_set_id" = 1
Item Load (0.1ms) SELECT "items".* FROM "items"
WHERE "items"."item_set_id" = 1
=> #<ItemSet id: 1, name: "The Gladiator">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment