Skip to content

Commit 83e06b5

Browse files
authored
website: Docs for DuckDB SQL (#1005)
1 parent 68fc3aa commit 83e06b5

9 files changed

Lines changed: 646 additions & 1 deletion

File tree

website/docs/api/directededge.mdx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Determines whether or not the provided H3 cells are neighbors.
2323
{label: 'Java', value: 'java'},
2424
{label: 'JavaScript (Live)', value: 'javascript'},
2525
{label: 'Python', value: 'python'},
26+
{label: 'DuckDB', value: 'duckdb'},
2627
{label: 'Shell', value: 'shell'},
2728
]
2829
}>
@@ -66,6 +67,13 @@ function example() {
6667
h3.are_neighbor_cells(origin, destination)
6768
```
6869

70+
</TabItem>
71+
<TabItem value="duckdb">
72+
73+
```sql
74+
h3_are_neighbor_cells(origin, destination)
75+
```
76+
6977
</TabItem>
7078
<TabItem value="shell">
7179

@@ -103,6 +111,7 @@ destination.
103111
{label: 'Java', value: 'java'},
104112
{label: 'JavaScript (Live)', value: 'javascript'},
105113
{label: 'Python', value: 'python'},
114+
{label: 'DuckDB', value: 'duckdb'},
106115
{label: 'Shell', value: 'shell'},
107116
]
108117
}>
@@ -144,6 +153,13 @@ function example() {
144153
h3.cells_to_directed_edge(origin, destination)
145154
```
146155
156+
</TabItem>
157+
<TabItem value="duckdb">
158+
159+
```sql
160+
h3_cells_to_directed_edge(origin, destination)
161+
```
162+
147163
</TabItem>
148164
<TabItem value="shell">
149165
@@ -179,6 +195,7 @@ Determines if the provided H3Index is a valid unidirectional edge index.
179195
{label: 'Java', value: 'java'},
180196
{label: 'JavaScript (Live)', value: 'javascript'},
181197
{label: 'Python', value: 'python'},
198+
{label: 'DuckDB', value: 'duckdb'},
182199
{label: 'Shell', value: 'shell'},
183200
]
184201
}>
@@ -219,6 +236,13 @@ function example() {
219236
h3.is_valid_directed_edge(edge)
220237
```
221238
239+
</TabItem>
240+
<TabItem value="duckdb">
241+
242+
```sql
243+
h3_is_valid_directed_edge(edge)
244+
```
245+
222246
</TabItem>
223247
<TabItem value="shell">
224248
@@ -253,6 +277,7 @@ Provides the origin hexagon from the directed edge H3Index.
253277
{label: 'Java', value: 'java'},
254278
{label: 'JavaScript (Live)', value: 'javascript'},
255279
{label: 'Python', value: 'python'},
280+
{label: 'DuckDB', value: 'duckdb'},
256281
{label: 'Shell', value: 'shell'},
257282
]
258283
}>
@@ -293,6 +318,13 @@ function example() {
293318
h3.get_directed_edge_origin(edge)
294319
```
295320
321+
</TabItem>
322+
<TabItem value="duckdb">
323+
324+
```sql
325+
h3_get_directed_edge_origin(edge)
326+
```
327+
296328
</TabItem>
297329
<TabItem value="shell">
298330
@@ -327,6 +359,7 @@ Provides the destination hexagon from the directed edge H3Index.
327359
{label: 'Java', value: 'java'},
328360
{label: 'JavaScript (Live)', value: 'javascript'},
329361
{label: 'Python', value: 'python'},
362+
{label: 'DuckDB', value: 'duckdb'},
330363
{label: 'Shell', value: 'shell'},
331364
]
332365
}>
@@ -367,6 +400,13 @@ function example() {
367400
h3.get_directed_edge_destination(edge)
368401
```
369402
403+
</TabItem>
404+
<TabItem value="duckdb">
405+
406+
```sql
407+
h3.get_directed_edge_destination(edge)
408+
```
409+
370410
</TabItem>
371411
<TabItem value="shell">
372412
@@ -402,6 +442,7 @@ Provides the origin-destination pair of cells for the given directed edge.
402442
{label: 'Java', value: 'java'},
403443
{label: 'JavaScript (Live)', value: 'javascript'},
404444
{label: 'Python', value: 'python'},
445+
{label: 'DuckDB', value: 'duckdb'},
405446
{label: 'Shell', value: 'shell'},
406447
]
407448
}>
@@ -445,6 +486,13 @@ function example() {
445486
h3.directed_edge_to_cells(edge)
446487
```
447488
489+
</TabItem>
490+
<TabItem value="duckdb">
491+
492+
```sql
493+
h3_directed_edge_to_cells(edge)
494+
```
495+
448496
</TabItem>
449497
<TabItem value="shell">
450498
@@ -479,6 +527,7 @@ Provides all of the directed edges from the current cell.
479527
{label: 'Java', value: 'java'},
480528
{label: 'JavaScript (Live)', value: 'javascript'},
481529
{label: 'Python', value: 'python'},
530+
{label: 'DuckDB', value: 'duckdb'},
482531
{label: 'Shell', value: 'shell'},
483532
]
484533
}>
@@ -523,6 +572,13 @@ function example() {
523572
h3.origin_to_directed_edges(h)
524573
```
525574
575+
</TabItem>
576+
<TabItem value="duckdb">
577+
578+
```sql
579+
h3_origin_to_directed_edges(h)
580+
```
581+
526582
</TabItem>
527583
<TabItem value="shell">
528584
@@ -559,6 +615,7 @@ Note that this may be more than two points for complex edges.
559615
{label: 'Java', value: 'java'},
560616
{label: 'JavaScript (Live)', value: 'javascript'},
561617
{label: 'Python', value: 'python'},
618+
{label: 'DuckDB', value: 'duckdb'},
562619
{label: 'Shell', value: 'shell'},
563620
]
564621
}>
@@ -599,6 +656,13 @@ function example() {
599656
h3.directed_edge_to_boundary(edge)
600657
```
601658
659+
</TabItem>
660+
<TabItem value="duckdb">
661+
662+
```sql
663+
h3_directed_edge_to_boundary(edge)
664+
```
665+
602666
</TabItem>
603667
<TabItem value="shell">
604668

website/docs/api/hierarchy.mdx

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ the provided resolution. If the input cell has resolution `r`, then
2626
{label: 'Java', value: 'java'},
2727
{label: 'JavaScript (Live)', value: 'javascript'},
2828
{label: 'Python', value: 'python'},
29+
{label: 'DuckDB', value: 'duckdb'},
2930
{label: 'Shell', value: 'shell'},
3031
]
3132
}>
@@ -69,6 +70,13 @@ h3.cell_to_parent(h, res=None)
6970
If `res = None`, we set `res = resolution(h) - 1`.
7071
See the [h3-py docs](https://uber.github.io/h3-py/api_verbose.html#h3.cell_to_parent).
7172

73+
</TabItem>
74+
<TabItem value="duckdb">
75+
76+
```sql
77+
h3_cell_to_parent(h, res)
78+
```
79+
7280
</TabItem>
7381
<TabItem value="shell">
7482

@@ -106,6 +114,7 @@ resolution `childRes`.
106114
{label: 'Java', value: 'java'},
107115
{label: 'JavaScript (Live)', value: 'javascript'},
108116
{label: 'Python', value: 'python'},
117+
{label: 'DuckDB', value: 'duckdb'},
109118
{label: 'Shell', value: 'shell'},
110119
]
111120
}>
@@ -151,6 +160,13 @@ h3.cell_to_children(h, res=None)
151160
If `res = None`, we set `res = resolution(h) + 1`.
152161
See the [h3-py docs](https://uber.github.io/h3-py/api_verbose.html#h3.cell_to_children).
153162

163+
</TabItem>
164+
<TabItem value="duckdb">
165+
166+
```sql
167+
h3_cell_to_children(h, res)
168+
```
169+
154170
</TabItem>
155171
<TabItem value="shell">
156172

@@ -187,6 +203,7 @@ Provides the number of children at a given resolution of the given cell.
187203
{label: 'Java', value: 'java'},
188204
{label: 'JavaScript (Live)', value: 'javascript'},
189205
{label: 'Python', value: 'python'},
206+
{label: 'DuckDB', value: 'duckdb'},
190207
{label: 'Shell', value: 'shell'},
191208
]
192209
}>
@@ -221,14 +238,19 @@ This function exists for memory management and is not exposed.
221238
</TabItem>
222239
<TabItem value="python">
223240
224-
225241
```py
226242
h3.cell_to_children_size(h, res=None)
227243
```
228244

229245
If `res = None`, we set `res = resolution(h) + 1`.
230246
See the [h3-py docs](https://uber.github.io/h3-py/api_verbose.html#h3.cell_to_children_size).
231247

248+
</TabItem>
249+
<TabItem value="duckdb">
250+
251+
```sql
252+
h3_cell_to_children_size(h, res)
253+
```
232254

233255
</TabItem>
234256
<TabItem value="shell">
@@ -265,6 +287,7 @@ Provides the center child (finer) cell contained by `cell` at resolution `childR
265287
{label: 'Java', value: 'java'},
266288
{label: 'JavaScript (Live)', value: 'javascript'},
267289
{label: 'Python', value: 'python'},
290+
{label: 'DuckDB', value: 'duckdb'},
268291
{label: 'Shell', value: 'shell'},
269292
]
270293
}>
@@ -309,6 +332,13 @@ h3.cell_to_center_child(h, res=None)
309332
If `res = None`, we set `res = resolution(h) + 1`.
310333
See the [h3-py docs](https://uber.github.io/h3-py/api_verbose.html#h3.cell_to_center_child).
311334

335+
</TabItem>
336+
<TabItem value="duckdb">
337+
338+
```sql
339+
h3_cell_to_center_child(h, res)
340+
```
341+
312342
</TabItem>
313343
<TabItem value="shell">
314344

@@ -347,6 +377,7 @@ This is the complement of `childPosToCell`.
347377
{label: 'Java', value: 'java'},
348378
{label: 'JavaScript (Live)', value: 'javascript'},
349379
{label: 'Python', value: 'python'},
380+
{label: 'DuckDB', value: 'duckdb'},
350381
{label: 'Shell', value: 'shell'},
351382
]
352383
}>
@@ -387,6 +418,13 @@ function example() {
387418
h3.cell_to_child_pos(child, res_parent)
388419
```
389420

421+
</TabItem>
422+
<TabItem value="duckdb">
423+
424+
```sql
425+
h3_cell_to_child_pos(child, res_parent)
426+
```
427+
390428
</TabItem>
391429
<TabItem value="shell">
392430

@@ -424,6 +462,7 @@ This is the complement of `cellToChildPos`.
424462
{label: 'Java', value: 'java'},
425463
{label: 'JavaScript (Live)', value: 'javascript'},
426464
{label: 'Python', value: 'python'},
465+
{label: 'DuckDB', value: 'duckdb'},
427466
{label: 'Shell', value: 'shell'},
428467
]
429468
}>
@@ -466,6 +505,13 @@ function example() {
466505
h3.child_pos_to_cell(parent, res_child, child_pos)
467506
```
468507

508+
</TabItem>
509+
<TabItem value="duckdb">
510+
511+
```sql
512+
h3_child_pos_to_cell(parent, res_child, child_pos)
513+
```
514+
469515
</TabItem>
470516
<TabItem value="shell">
471517

@@ -505,6 +551,7 @@ Input cells must all share the same resolution.
505551
{label: 'Java', value: 'java'},
506552
{label: 'JavaScript (Live)', value: 'javascript'},
507553
{label: 'Python', value: 'python'},
554+
{label: 'DuckDB', value: 'duckdb'},
508555
{label: 'Shell', value: 'shell'},
509556
]
510557
}>
@@ -549,6 +596,13 @@ function example() {
549596
h3.compact_cells(cells)
550597
```
551598

599+
</TabItem>
600+
<TabItem value="duckdb">
601+
602+
```sql
603+
h3_compact_cells(cells)
604+
```
605+
552606
</TabItem>
553607
<TabItem value="shell">
554608

@@ -585,6 +639,7 @@ Uncompacts the set `compactedSet` of indexes to the resolution `res`.
585639
{label: 'Java', value: 'java'},
586640
{label: 'JavaScript (Live)', value: 'javascript'},
587641
{label: 'Python', value: 'python'},
642+
{label: 'DuckDB', value: 'duckdb'},
588643
{label: 'Shell', value: 'shell'},
589644
]
590645
}>
@@ -627,6 +682,13 @@ function example() {
627682
h3.uncompact_cells(cells, res)
628683
```
629684
685+
</TabItem>
686+
<TabItem value="duckdb">
687+
688+
```sql
689+
h3_uncompact_cells(cells, res)
690+
```
691+
630692
</TabItem>
631693
<TabItem value="shell">
632694
@@ -665,6 +727,7 @@ a given resolution.
665727
{label: 'Java', value: 'java'},
666728
{label: 'JavaScript (Live)', value: 'javascript'},
667729
{label: 'Python', value: 'python'},
730+
{label: 'DuckDB', value: 'duckdb'},
668731
{label: 'Shell', value: 'shell'},
669732
]
670733
}>
@@ -705,6 +768,15 @@ This function exists for memory management and is not exposed.
705768
706769
:::
707770
771+
</TabItem>
772+
<TabItem value="duckdb">
773+
774+
:::note
775+
776+
This function exists for memory management and is not exposed.
777+
778+
:::
779+
708780
</TabItem>
709781
<TabItem value="shell">
710782

0 commit comments

Comments
 (0)