xquery.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ace.define("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) {
  2. "use strict";
  3. exports.snippetText = "snippet for\n\
  4. for $${1:item} in ${2:expr}\n\
  5. snippet return\n\
  6. return ${1:expr}\n\
  7. snippet import\n\
  8. import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\
  9. snippet some\n\
  10. some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
  11. snippet every\n\
  12. every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
  13. snippet if\n\
  14. if(${1:true}) then ${2:expr} else ${3:true}\n\
  15. snippet switch\n\
  16. switch(${1:\"foo\"})\n\
  17. case ${2:\"foo\"}\n\
  18. return ${3:true}\n\
  19. default return ${4:false}\n\
  20. snippet try\n\
  21. try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\
  22. snippet tumbling\n\
  23. for tumbling window $${1:varname} in ${2:expr}\n\
  24. start at $${3:start} when ${4:expr}\n\
  25. end at $${5:end} when ${6:expr}\n\
  26. return ${7:expr}\n\
  27. snippet sliding\n\
  28. for sliding window $${1:varname} in ${2:expr}\n\
  29. start at $${3:start} when ${4:expr}\n\
  30. end at $${5:end} when ${6:expr}\n\
  31. return ${7:expr}\n\
  32. snippet let\n\
  33. let $${1:varname} := ${2:expr}\n\
  34. snippet group\n\
  35. group by $${1:varname} := ${2:expr}\n\
  36. snippet order\n\
  37. order by ${1:expr} ${2:descending}\n\
  38. snippet stable\n\
  39. stable order by ${1:expr}\n\
  40. snippet count\n\
  41. count $${1:varname}\n\
  42. snippet ordered\n\
  43. ordered { ${1:expr} }\n\
  44. snippet unordered\n\
  45. unordered { ${1:expr} }\n\
  46. snippet treat \n\
  47. treat as ${1:expr}\n\
  48. snippet castable\n\
  49. castable as ${1:atomicType}\n\
  50. snippet cast\n\
  51. cast as ${1:atomicType}\n\
  52. snippet typeswitch\n\
  53. typeswitch(${1:expr})\n\
  54. case ${2:type} return ${3:expr}\n\
  55. default return ${4:expr}\n\
  56. snippet var\n\
  57. declare variable $${1:varname} := ${2:expr};\n\
  58. snippet fn\n\
  59. declare function ${1:ns}:${2:name}(){\n\
  60. ${3:expr}\n\
  61. };\n\
  62. snippet module\n\
  63. module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\
  64. ";
  65. exports.scope = "xquery";
  66. });