fnlist.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {{/* Converts data/sql_funcs.yml into table. */}}
  2. {{ $parentPath := partial "relative-link.html" . }}
  3. {{$releasedVersions := dict}}
  4. {{range (where $.Site.RegularPages "Section" "releases")}}
  5. {{$releasedVersions = merge $releasedVersions (dict .File.ContentBaseName .) }}
  6. {{end}}
  7. {{ range $.Site.Data.sql_funcs }}
  8. {{ if not (isset $.Params 0) }}
  9. ### {{.type}} functions
  10. <p>{{ if .description }} {{ .description | $.Page.RenderString }} {{ end }}</p>
  11. {{end}}
  12. {{ if or (eq ($.Get 0) .type) (not (isset $.Params 0)) }}
  13. <!-- Keep table left-aligned to render since mix of md + html-->
  14. <table class="inline-headings">
  15. <tr>
  16. <th>
  17. <p class="heading">Function</p>
  18. </th>
  19. </tr>
  20. {{ range .functions }}
  21. <tr>
  22. {{/* Extract the function's name from its signature and use it as the ID
  23. to facilitate deeplinking. The `docsearch_l3` class is a special
  24. class that is scraped by our Algolia DocSearch configuration. */}}
  25. <td>
  26. {{/* We use clojure highlighting simply because it looks best with the
  27. components we want to highlight. In the future, this should be customized
  28. in some way. */}}
  29. <div class="heading {{if (not (isset $.Params 0))}}docsearch_l3{{end}}" id="{{ index (split .signature "(") 0 | urlize }}">
  30. {{ highlight .signature "clojure" "hl_inline=false" }}
  31. </div>
  32. <p>
  33. {{ .description | $.Page.RenderString }}
  34. {{ if .url }}
  35. <a href="{{ $parentPath }}{{ .url | relURL }}">(docs)</a>.
  36. {{ end }}
  37. </p>
  38. {{ if .unmaterializable }}
  39. <p><b>Note:</b> This function is <a href="#unmaterializable-functions">unmaterializable</a>.</p>
  40. {{ end }}
  41. {{ if .unmaterializable_unless_temporal_filter }}
  42. <p><b>Note:</b> This function is <a href="#unmaterializable-functions">unmaterializable</a>, but
  43. can be used in limited contexts in materialized views as a <a href="{{ $parentPath }}{{ "/transform-data/patterns/temporal-filters/" | relURL }}">temporal filter</a>.</p>
  44. {{ end }}
  45. {{ if .known_time_zone_limitation_cast }}
  46. <p><b>Known limitation:</b> You must explicitly cast the type for the time zone.</p>
  47. {{ end }}
  48. {{ if .side_effecting }}
  49. <p><b>Note:</b> This function is <a href="#side-effecting-functions">side-effecting</a>.</p>
  50. {{ end }}
  51. {{ $versionAdded := index . "version-added" }}
  52. {{ if $versionAdded }}
  53. {{ $releasePage := index $releasedVersions $versionAdded }}
  54. {{ if not $releasePage.Params.released }}
  55. <p>
  56. <b>Unreleased: </b> This function will be released in
  57. <a href="{{ printf "%s/releases#release-notes" $parentPath | relURL }}"><strong>{{$versionAdded}}</strong></a>.
  58. It may not be available in your region yet.
  59. The release is scheduled to complete by <strong>{{dateFormat "January 2, 2006" $releasePage.Params.date}}</strong>.
  60. </p>
  61. {{ end }}
  62. {{ end }}
  63. </td>
  64. </tr>
  65. {{ end }} {{/* {{ range .functions }} */}}
  66. </table>
  67. {{end}}
  68. {{ end }}{{/* {{ range $.Site.Data.sql_funcs }} */}}
  69. {{/* When someone is deeplinked to a td on the page, highlight the tr */}}
  70. <script type="text/javascript">
  71. $(function() {
  72. $(location.hash).parents('tr').css('background-color', '#FFFF5522');
  73. });
  74. </script>