12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- {{/* Converts data/sql_funcs.yml into table. */}}
- {{ $parentPath := partial "relative-link.html" . }}
- {{$releasedVersions := dict}}
- {{range (where $.Site.RegularPages "Section" "releases")}}
- {{$releasedVersions = merge $releasedVersions (dict .File.ContentBaseName .) }}
- {{end}}
- {{ range $.Site.Data.sql_funcs }}
- {{ if not (isset $.Params 0) }}
- ### {{.type}} functions
- <p>{{ if .description }} {{ .description | $.Page.RenderString }} {{ end }}</p>
- {{end}}
- {{ if or (eq ($.Get 0) .type) (not (isset $.Params 0)) }}
- <!-- Keep table left-aligned to render since mix of md + html-->
- <table class="inline-headings">
- <tr>
- <th>
- <p class="heading">Function</p>
- </th>
- </tr>
- {{ range .functions }}
- <tr>
- {{/* Extract the function's name from its signature and use it as the ID
- to facilitate deeplinking. The `docsearch_l3` class is a special
- class that is scraped by our Algolia DocSearch configuration. */}}
- <td>
- {{/* We use clojure highlighting simply because it looks best with the
- components we want to highlight. In the future, this should be customized
- in some way. */}}
- <div class="heading {{if (not (isset $.Params 0))}}docsearch_l3{{end}}" id="{{ index (split .signature "(") 0 | urlize }}">
- {{ highlight .signature "clojure" "hl_inline=false" }}
- </div>
- <p>
- {{ .description | $.Page.RenderString }}
- {{ if .url }}
- <a href="{{ $parentPath }}{{ .url | relURL }}">(docs)</a>.
- {{ end }}
- </p>
- {{ if .unmaterializable }}
- <p><b>Note:</b> This function is <a href="#unmaterializable-functions">unmaterializable</a>.</p>
- {{ end }}
- {{ if .unmaterializable_unless_temporal_filter }}
- <p><b>Note:</b> This function is <a href="#unmaterializable-functions">unmaterializable</a>, but
- can be used in limited contexts in materialized views as a <a href="{{ $parentPath }}{{ "/transform-data/patterns/temporal-filters/" | relURL }}">temporal filter</a>.</p>
- {{ end }}
- {{ if .known_time_zone_limitation_cast }}
- <p><b>Known limitation:</b> You must explicitly cast the type for the time zone.</p>
- {{ end }}
- {{ if .side_effecting }}
- <p><b>Note:</b> This function is <a href="#side-effecting-functions">side-effecting</a>.</p>
- {{ end }}
- {{ $versionAdded := index . "version-added" }}
- {{ if $versionAdded }}
- {{ $releasePage := index $releasedVersions $versionAdded }}
- {{ if not $releasePage.Params.released }}
- <p>
- <b>Unreleased: </b> This function will be released in
- <a href="{{ printf "%s/releases#release-notes" $parentPath | relURL }}"><strong>{{$versionAdded}}</strong></a>.
- It may not be available in your region yet.
- The release is scheduled to complete by <strong>{{dateFormat "January 2, 2006" $releasePage.Params.date}}</strong>.
- </p>
- {{ end }}
- {{ end }}
- </td>
- </tr>
- {{ end }} {{/* {{ range .functions }} */}}
- </table>
- {{end}}
- {{ end }}{{/* {{ range $.Site.Data.sql_funcs }} */}}
- {{/* When someone is deeplinked to a td on the page, highlight the tr */}}
- <script type="text/javascript">
- $(function() {
- $(location.hash).parents('tr').css('background-color', '#FFFF5522');
- });
- </script>
|