Skip to content

Commit

Permalink
Add docs for DoubleRange and IntegerRange
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetit committed Apr 18, 2017
1 parent a6db9bd commit 82925e8
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/1.2/DoubleRange.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: docs
title: DoubleRange
permalink: /docs/1.2/DoubleRange/
---

Sorry, this function does not exist in this version of H2GIS.
7 changes: 7 additions & 0 deletions docs/1.2/IntegerRange.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: docs
title: IntegerRange
permalink: /docs/1.2/IntegerRange/
---

Sorry, this function does not exist in this version of H2GIS.
7 changes: 7 additions & 0 deletions docs/1.3/DoubleRange.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: docs
title: DoubleRange
permalink: /docs/1.3/DoubleRange/
---

Sorry, this function does not exist in this version of H2GIS.
7 changes: 7 additions & 0 deletions docs/1.3/IntegerRange.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: docs
title: IntegerRange
permalink: /docs/1.3/IntegerRange/
---

Sorry, this function does not exist in this version of H2GIS.
50 changes: 50 additions & 0 deletions docs/dev/DoubleRange.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
layout: docs
title: DoubleRange
category: system/version
is_function: true
description: Return an array of doubles
prev_section: system
next_section: H2GISversion
permalink: /docs/dev/DoubleRange/
---

### Signatures

{% highlight mysql %}
DOUBLE DoubleRange(DOUBLE begin, DOUBLE end);
DOUBLE DoubleRange(DOUBLE begin, DOUBLE end, DOUBLE step);
{% endhighlight %}

### Description

Return an array of doubles within the range [`start`-`end`[.

The default increment value is 1 but the user can set another one specifying the `step` parameter.

##### Remarks

* `end` is excluded from the array,
* `end` has to be greater than `begin` otherwise `DoubleRange` will throw an exception.

### Examples

{% highlight mysql %}
SELECT DoubleRange(2, 7);
-- Answer:
2, 3, 4, 5, 6

SELECT DoubleRange(0, 6, 2);
-- Answer:
0, 2, 4

SELECT DoubleRange(0, 1, 0.5);
-- Answer:
0, 0.5
{% endhighlight %}

##### See also

* [`IntegerRange`](../IntegerRange)

* <a href="https://github.com/orbisgis/h2gis/blob/master/h2gis-functions/src/main/java/org/h2gis/functions/system/DoubleRange.java" target="_blank">Source code</a>
4 changes: 2 additions & 2 deletions docs/dev/H2GISversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: H2GISversion
category: system/version
is_function: true
description: Return H2GIS version
prev_section: system
next_section: applications
prev_section: DoubleRange
next_section: IntegerRange
permalink: /docs/dev/H2GISversion/
---

Expand Down
54 changes: 54 additions & 0 deletions docs/dev/IntegerRange.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
layout: docs
title: IntegerRange
category: system/version
is_function: true
description: Return an array of integers
prev_section: H2GISversion
next_section: applications
permalink: /docs/dev/IntegerRange/
---

### Signatures

{% highlight mysql %}
INTEGER IntegerRange(DOUBLE begin, DOUBLE end);
INTEGER IntegerRange(DOUBLE begin, DOUBLE end, DOUBLE step);
{% endhighlight %}

### Description

Return an array of integers within the range [`start`-`end`[.

The default increment value is 1 but the user can set another one specifying the `step` parameter.

##### Remarks

* `end` is excluded from the array,
* `end` has to be greater than `begin` otherwise `IntegerRange` will throw an exception.

### Examples

{% highlight mysql %}
SELECT IntegerRange(2, 7);
-- Answer:
2, 3, 4, 5, 6

SELECT IntegerRange(0, 6, 2);
-- Answer:
0, 2, 4

SELECT IntegerRange(0, 1, 0.5);
-- Answer:
0

SELECT IntegerRange(0, 4, 0.5);
-- Answer:
0, 1, 2, 3
{% endhighlight %}

##### See also

* [`DoubleRange`](../DoubleRange)

* <a href="https://github.com/orbisgis/h2gis/blob/master/h2gis-functions/src/main/java/org/h2gis/functions/system/IntegerRange.java" target="_blank">Source code</a>

0 comments on commit 82925e8

Please sign in to comment.