Skip to content

Commit 8529912

Browse files
committed
Tabor 4.0 doc update
1 parent 55a389b commit 8529912

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

topics/tabor.adoc

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ image::Tabor-Logo.png["Tabor Logo", 250, 250]
55
Tabor is a database modeling language for GIS based on YAML, but with additional syntax restrictions. The goal of Tabor is to allow GIS users to create and maintain complex database rules using plain-text configuration files. The following is an example of a Tabor configuration file for a PostGIS database:
66

77
```
8-
tabor: 0.3.0
8+
tabor: 4.0
99
layers:
1010

1111
- name: grass
@@ -85,7 +85,12 @@ Tabor supports the following primitive field types:
8585
- `text` -> for unlimited length character strings
8686
- `boolean` -> for true or false values
8787

88-
Tabor also supports arrays of primitive data. You can define an array as `type: <primitive> array`
88+
Tabor also supports arrays of primitive data. You can define an array as `type: <primitive> array`.
89+
90+
Tabor has support for several temporal data fields:
91+
- `date` -> for date values
92+
- `time` -> for time values
93+
- `timestamp` -> for timestamp values
8994

9095
It is strongly recommended that you have a primary key (pk) on each of your layers. You can define a field as a primary key using `pk: true`.
9196

@@ -123,3 +128,29 @@ constraints:
123128
distance: 15.6
124129
layer: other_layer
125130
```
131+
132+
=== Domain Values
133+
134+
Domain values are commonly used in GIS databases to apply specific constraints on fields. Tabor allows you to create domain values for use in your database schema.
135+
136+
ex.
137+
```yaml
138+
domains:
139+
- name: _confidence
140+
type: text
141+
values:
142+
- High
143+
- Medium
144+
- Low
145+
146+
layers:
147+
- name: table_with_domain
148+
schema: public
149+
owner: postgres
150+
fields:
151+
- name: level_of_confidence
152+
type: _confidence
153+
```
154+
155+
This example creates a domain value named `_confidence` which constrains a field to the following values: High, Medium, and Low. Note that the domain value begins with a `_`--this is a requirement for domain values in Tabor. You can use the domain value as a field type when defining a layer.
156+

0 commit comments

Comments
 (0)