Advertisement
MGT

ini

MGT
Jul 22nd, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. [hasBountyAccount]
  2. SQL1_1 = SELECT CASE WHEN EXISTS(SELECT uid FROM bounties WHERE uid = ?) THEN 'true' ELSE 'false' END
  3. SQL1_INPUTS = 1
  4. OUTPUT = 1
  5.  
  6. [createBountyAccount]
  7. SQL1_1 = INSERT INTO bounties SET uid = ?, name = ?, bounty = '[]', bountyLock = 0, bountyContract = '[]', bountyContractCompleted = '[]', friends = '[]'
  8. SQL1_INPUTS = 1,2
  9.  
  10. [hasImmunity]
  11. SQL1_1 = SELECT CASE WHEN (SELECT uid FROM bounties WHERE uid = ? AND last_immunity_applied_at < DATE_SUB(NOW(),INTERVAL ? DAY)) THEN 'false' ELSE 'true' END
  12. SQL1_INPUTS = 1,2
  13. OUTPUT = 1
  14.  
  15. [getBounty]
  16. SQL1_1 = SELECT bounty, bountyLock, bountyContract, bountyContractCompleted, friends FROM bounties WHERE uid = ?
  17. SQL1_INPUTS = 1
  18. OUTPUT = 1,2,3,4,5
  19.  
  20. [getAllBounties]
  21. SQL1_1 = SELECT name, uid, bounty FROM bounties
  22. OUTPUT = 1-STRING,2-STRING,3
  23.  
  24. [setBounty]
  25. SQL1_1 = UPDATE bounties SET bounty = ? WHERE uid = ?
  26. SQL1_INPUTS = 1,2
  27.  
  28. [setImmunityTime]
  29. SQL1_1 = UPDATE bounties SET last_immunity_applied_at = NOW() WHERE uid = ?
  30. SQL1_INPUTS = 1
  31.  
  32. [updateBountyLock]
  33. SQL1_1 = UPDATE bounties SET bountyLock = ? WHERE uid = ?
  34. SQL1_INPUTS = 1,2
  35.  
  36. [nullContract]
  37. SQL1_1 = UPDATE bounties SET bountyContract = '[]' WHERE bountyContract LIKE ?
  38. SQL1_INPUTS = 1
  39.  
  40. [updateContract]
  41. SQL1_1 = UPDATE bounties SET bountyContract = ? WHERE uid = ?
  42. SQL1_INPUTS = 1,2
  43.  
  44. [updateCompletedContracts]
  45. SQL1_1 = UPDATE bounties SET bountyContractCompleted = ? WHERE uid = ?
  46. SQL1_INPUTS = 1,2
  47.  
  48. [updateFriends]
  49. SQL1_1 = UPDATE bounties SET friends = ? WHERE uid = ?
  50. SQL1_INPUTS = 1,2
  51.  
  52. [resetFriends]
  53. SQL1_1 = UPDATE bounties SET friends = '[]' WHERE friend_last_reset_at < DATE_SUB(NOW(), INTERVAL ? DAY)
  54. SQL1_INPUTS = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement