You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

219 lines
5.5 KiB

  1. {
  2. "meta": {
  3. "$_GET": [
  4. {
  5. "type": "text",
  6. "name": "sort"
  7. },
  8. {
  9. "type": "text",
  10. "name": "dir"
  11. }
  12. ]
  13. },
  14. "exec": {
  15. "steps": [
  16. {
  17. "name": "identity",
  18. "module": "auth",
  19. "action": "identify",
  20. "options": {
  21. "provider": "auth"
  22. },
  23. "output": true,
  24. "meta": []
  25. },
  26. {
  27. "name": "query",
  28. "module": "dbconnector",
  29. "action": "single",
  30. "options": {
  31. "connection": "authdb",
  32. "sql": {
  33. "type": "select",
  34. "columns": [
  35. {
  36. "table": "users",
  37. "column": "id"
  38. },
  39. {
  40. "table": "users",
  41. "column": "email"
  42. },
  43. {
  44. "table": "users",
  45. "column": "firstname"
  46. },
  47. {
  48. "table": "users",
  49. "column": "lastname"
  50. },
  51. {
  52. "table": "users",
  53. "column": "validated"
  54. }
  55. ],
  56. "params": [
  57. {
  58. "operator": "equal",
  59. "type": "expression",
  60. "name": ":P1",
  61. "value": "{{identity}}",
  62. "test": ""
  63. }
  64. ],
  65. "table": {
  66. "name": "users"
  67. },
  68. "primary": "id",
  69. "joins": [],
  70. "wheres": {
  71. "condition": "AND",
  72. "rules": [
  73. {
  74. "id": "users.id",
  75. "field": "users.id",
  76. "type": "double",
  77. "operator": "equal",
  78. "value": "{{identity}}",
  79. "data": {
  80. "table": "users",
  81. "column": "id",
  82. "type": "number",
  83. "columnObj": {
  84. "type": "increments",
  85. "primary": true,
  86. "unique": false,
  87. "nullable": false,
  88. "name": "id"
  89. }
  90. },
  91. "operation": "="
  92. }
  93. ],
  94. "conditional": null,
  95. "valid": true
  96. },
  97. "query": "select `id`, `email`, `firstname`, `lastname`, `validated` from `users` where `users`.`id` = ?"
  98. }
  99. },
  100. "output": true,
  101. "meta": [
  102. {
  103. "type": "number",
  104. "name": "id"
  105. },
  106. {
  107. "type": "text",
  108. "name": "email"
  109. },
  110. {
  111. "type": "text",
  112. "name": "firstname"
  113. },
  114. {
  115. "type": "text",
  116. "name": "lastname"
  117. },
  118. {
  119. "type": "boolean",
  120. "name": "validated"
  121. }
  122. ],
  123. "outputType": "object"
  124. },
  125. {
  126. "name": "query1",
  127. "module": "dbconnector",
  128. "action": "select",
  129. "options": {
  130. "connection": "authdb",
  131. "sql": {
  132. "type": "select",
  133. "columns": [],
  134. "params": [
  135. {
  136. "operator": "equal",
  137. "type": "expression",
  138. "name": ":P1",
  139. "value": "{{identity}}",
  140. "test": ""
  141. }
  142. ],
  143. "table": {
  144. "name": "roles"
  145. },
  146. "primary": "id",
  147. "joins": [
  148. {
  149. "table": "xuserrole",
  150. "column": "*",
  151. "type": "INNER",
  152. "clauses": {
  153. "condition": "AND",
  154. "rules": [
  155. {
  156. "table": "xuserrole",
  157. "column": "roleid",
  158. "operator": "equal",
  159. "operation": "=",
  160. "value": {
  161. "table": "roles",
  162. "column": "id"
  163. }
  164. }
  165. ]
  166. },
  167. "primary": "id"
  168. }
  169. ],
  170. "wheres": {
  171. "condition": "AND",
  172. "rules": [
  173. {
  174. "id": "xuserrole.userid",
  175. "field": "xuserrole.userid",
  176. "type": "double",
  177. "operator": "equal",
  178. "value": "{{identity}}",
  179. "data": {
  180. "table": "xuserrole",
  181. "column": "userid",
  182. "type": "number",
  183. "columnObj": {
  184. "type": "integer",
  185. "primary": false,
  186. "unique": false,
  187. "nullable": true,
  188. "name": "userid"
  189. }
  190. },
  191. "operation": "="
  192. }
  193. ],
  194. "conditional": null,
  195. "valid": true
  196. },
  197. "query": "select * from `roles` inner join `xuserrole` on `xuserrole`.`roleid` = `roles`.`id` where `xuserrole`.`userid` = ?"
  198. }
  199. },
  200. "output": true,
  201. "meta": [
  202. {
  203. "type": "number",
  204. "name": "id"
  205. },
  206. {
  207. "type": "text",
  208. "name": "name"
  209. },
  210. {
  211. "type": "boolean",
  212. "name": "isDepartment"
  213. }
  214. ],
  215. "outputType": "array"
  216. }
  217. ]
  218. }
  219. }