Advertisement
Guest User

SqlCommand.xml

a guest
Jan 2nd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.13 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <SqlCommands>
  3. <!-- ACCOUNT -->
  4. <SqlCommand name="GetAccountId">SELECT A.Id FROM account A WHERE A.Username = VAR1 AND A.Password = VAR2;</SqlCommand>
  5. <SqlCommand name="GetAccountHeroes">SELECT A.Name, A.Gender, A.Race, A.World, A.Location, A.Level, A.Position_X, A.Position_Y, A.Position_Z, A.Orientation_W, A.Orientation_X, A.Orientation_Y, A.Orientation_Z FROM hero A WHERE A.Account_Id = VAR1;</SqlCommand>
  6. <!-- LOCATION -->
  7. <SqlCommand name="CreateLocation">INSERT INTO location (World, Name, Scene) VALUES(VARIABLES);</SqlCommand>
  8. <SqlCommand name="GetLocationScene">SELECT A.Scene FROM location A WHERE A.Name = VAR2;</SqlCommand>
  9. <SqlCommand name="UpdateLocationScene">UPDATE location AS A SET A.Scene = VAR1 WHERE A.Name = VAR2;</SqlCommand>
  10. <!-- HERO -->
  11. <SqlCommand name="CreateHero">INSERT INTO hero (Name, Gender, Race, World, Location, Level, Position_X, Position_Y, Position_Z, Orientation_W, Orientation_X, Orientation_Y, Orientation_Z, Account_Id) VALUES(VARIABLES);</SqlCommand>
  12. <SqlCommand name="GetHero">SELECT hero.Id, hero.Race FROM hero WHERE hero.Name = VAR1</SqlCommand>
  13. <!-- CAREER SKILL -->
  14. <SqlCommand name="GetAllCareerSkills">SELECT hero.Id, hero.Name, career.idx as careeridx, career.tier, career.unlocked, career.codedef AS careercodedef, skills.idx AS skillidx, skills.codedef AS skillcodedef, skills.progress FROM hero RIGHT JOIN career ON hero.Id = career.hero LEFT JOIN skills ON hero.Id = skills.hero WHERE hero.Name = VAR1;</SqlCommand>
  15. <SqlCommand name="GetAllCareerSkillsUpdate">SELECT hero.Id, hero.Name, career.idx as careeridx, career.tier, career.unlocked, career.codedef AS careercodedef FROM hero RIGHT JOIN career ON hero.Id = career.hero WHERE hero.Name = VAR1;</SqlCommand>
  16. <SqlCommand name="GetAllCareerSkillsMatienance">SELECT career.codedef AS careercodedef FROM hero JOIN career ON hero.Id = career.hero WHERE hero.Name = VAR1 and hero.Id=VAR2</SqlCommand>
  17. <SqlCommand name="InsertCareer">INSERT INTO career (tier, hero, unlocked, codedef) VALUES(VARIABLES);</SqlCommand>
  18. <!-- QUESTS -->
  19. <SqlCommand name="GetAllQuests">SELECT hero.Id, hero.Name, quest.idx as questidx, quest.codedef, quest.iscompleted, questtask.idx as questtaskidx, questtask.questcodedef, questtask.codedef, questtask.progress, questtask.goal, questtask.iscompleted FROM hero RIGHT JOIN quest ON hero.Id = quest.hero LEFT JOIN questtask ON quest.codedef = questtask.questcodedef WHERE hero.Name = 'alex';</SqlCommand>
  20. <SqlCommand name="CreateQuest">INSERT INTO quest (hero, uniqueid, codedef, iscompleted) VALUES
  21. (VARIABLES);</SqlCommand>
  22. <SqlCommand name="CreateQuestTask">INSERT INTO questtask (hero, questcodedef, task, codedef, progress, goal, iscompleted) VALUES
  23. (VARIABLES);</SqlCommand>
  24. <SqlCommand name="GetQuest">SELECT hero.Id, hero.Name, quest.idx, quest.codedef, quest.hero FROM hero JOIN quest ON hero.Name = VAR1 AND hero.Id = quest.hero AND quest.codedef=VAR2;</SqlCommand>
  25. <SqlCommand name="UpdateQuestTaskComplete">UPDATE questtask SET iscompleted = VAR1 WHERE (questtask.codedef = VAR3 AND questtask.hero = VAR4 AND questtask.questcodedef = VAR2 AND questtask.idx ;lth;)</SqlCommand>
  26. <SqlCommand name="UpdateQuestComplete">UPDATE quest SET iscompleted = VAR1 WHERE (quest.codedef = VAR2 AND quest.hero = VAR3 AND questtask.idx ;lth; );</SqlCommand>
  27. <SqlCommand name="DeleteQuestTask">DELETE FROM questtask WHERE (questtask.hero = VAR1 AND questtask.questcodedef = VAR2 AND questtask.Idx ;lth; );</SqlCommand>
  28. <SqlCommand name="DeleteQuest">DELETE FROM quest WHERE (quest.hero = VAR1 AND quest.codedef = VAR2 AND quest.idx ;lth; );</SqlCommand>
  29. <!--SKILLS -->
  30. <SqlCommand name="GetAllSkills">SELECT hero.Id, hero.Name, skills.idx, skills.codedef, skills.hero FROM hero JOIN skills ON hero.Name = VAR1 AND hero.Id = skills.hero;</SqlCommand>
  31. <SqlCommand name="GetAllSkillsUpdate">SELECT hero.Id, hero.Name, skills.idx, skills.codedef, skills.progress FROM hero JOIN skills ON hero.Name = VAR1 AND hero.Id = skills.hero;</SqlCommand>
  32. <SqlCommand name="GetSkill">SELECT hero.Id, hero.Name, skills.idx, skills.codedef, skills.hero FROM hero JOIN skills ON hero.Name = VAR1 AND hero.Id = skills.hero AND skills.codedef=VAR2;</SqlCommand>
  33. <SqlCommand name="CreateSkill">INSERT INTO skills (hero, codedef, progress) VALUES(VARIABLES);</SqlCommand>
  34. <!-- TRAITS-->
  35. <SqlCommand name="GetAllTraits">SELECT hero.Id, hero.Name, traits.idx as traitidx, traits.active_traits, traits.available_traits FROM hero RIGHT JOIN traits ON hero.Id = traits.hero WHERE hero.Name = VAR1;</SqlCommand>
  36. <SqlCommand name="GetTrait">SELECT hero.Id, hero.Name, traits.idx, traits.hero FROM hero JOIN traits ON hero.Name = VAR1 AND hero.Id = traits.hero;</SqlCommand>
  37. <SqlCommand name="CreateTrait">INSERT INTO traits (hero, active_traits, available_traits) VALUES(VARIABLES);</SqlCommand>
  38. <SqlCommand name="UpdateActiveTrait">UPDATE traits SET active_traits = VAR1 WHERE traits.hero = VAR2;</SqlCommand>
  39. <!-- CAREER -->
  40. <SqlCommand name="GetCareer">SELECT hero.Id, hero.Name, careers.idx, careers.hero FROM hero JOIN careers ON hero.Name = VAR1 AND hero.Id = careers.hero;</SqlCommand>
  41. <SqlCommand name="CreateCareer">INSERT INTO careers (description, tier, hero,unlocked, codedef) VALUES(VARIABLES);</SqlCommand>
  42. <!-- STORY -->
  43. <SqlCommand name="GetPlayerStory">SELECT hero.Id, hero.Name, stories.storycodedef, stories.storypointcodedef, stories.completed FROM hero JOIN stories ON hero.Name = VAR1 AND hero.Id = stories.hero LIMIT 1;</SqlCommand>
  44. <SqlCommand name="InsertPlayerStory">INSERT INTO stories (hero, storycodedef, storypointcodedef, completed) VALUES(VARIABLES);</SqlCommand>
  45. <SqlCommand name="UpdateStoryPoint">UPDATE stories SET completed = VAR1 WHERE (stories.hero = VAR2 AND stories.idx ;lth; );</SqlCommand>
  46. <SqlCommand name="UpdateStory">UPDATE stories SET storycodedef = VAR1, storypointcodedef= VAR2, completed = VAR3 WHERE stories.hero = VAR4;</SqlCommand>
  47. <!-- CRAFTING/INVENTORY -->
  48. <SqlCommand name="InsertInventoryAsset">INSERT INTO inventories(hero,location,position,resource,source,progress) VALUES(VARIABLES);</SqlCommand>
  49. <SqlCommand name="GetInventoryAsset">SELECT hero.Id, hero.Name FROM hero JOIN inventory WHERE hero.Name = VAR1 and hero.Id = inventory.hero and inventory.resource = VAR2 LIMIT 1;</SqlCommand>
  50. <SqlCommand name="GetAllInventory">SELECT hero.Id, hero.Name, inventory.idx , inventory.location, inventory.position, inventory.resource, inventory.source, inventory.progress FROM hero RIGHT JOIN inventory ON hero.Id = inventory.hero WHERE hero.Name = VAR1;</SqlCommand>
  51. <SqlCommand name="UpdateInventoryLocation">UPDATE inventory SET location = VAR1, position = VAR2 WHERE (inventory.hero = VAR3 and inventory.resource = VAR4 AND inventory.idx ;lth;);</SqlCommand>
  52. <SqlCommand name="UpdateInventoryNameAndSource">UPDATE inventory SET resource = VAR1, source = VAR2 WHERE (inventory.hero = VAR3 and inventory.resource = VAR4 AND inventory.idx ;lth;);</SqlCommand>
  53. <SqlCommand name="DeleteInventory">DELETE FROM inventory WHERE inventory.hero = VAR1 and inventory.resource = VAR2;</SqlCommand>
  54. </SqlCommands>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement