Skip to content

Commit

Permalink
Adding geospatial datatypes
Browse files Browse the repository at this point in the history
  • Loading branch information
phazonoverload committed Dec 6, 2024
1 parent 4f70f95 commit fbc70a8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions content/2.data-modeling/3.fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ Fields are database columns with additional metadata and configuration used by D

Directus supports various databases, though each vendor has their own simple data types. To standardize these differences, Directus has a single set of types that are mapped to the vendor-specific ones.

| Group | Types |
| ------------- | -------------------------------------------- |
| Text | `String`, `Text`, `UUID`, `Hash`, `Alias` |
| Numeric | `Integer`, `Big Integer`, `Float`, `Decimal` |
| Boolean | `Boolean` |
| Date and Time | `Timestamp`, `DateTime`, `Date`, `Time` |
| Binary | `Binary` |
| Structured | `JSON`, `CSV` |
| Group | Types |
| ------------- | --------------------------------------------------------------------------------- |
| Text | `String`, `Text`, `UUID`, `Hash`, `Alias` |
| Numeric | `Integer`, `Big Integer`, `Float`, `Decimal` |
| Boolean | `Boolean` |
| Date and Time | `Timestamp`, `DateTime`, `Date`, `Time` |
| Binary | `Binary` |
| Structured | `JSON`, `CSV` |
| Geospatial | `Point`, `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon` |

Fields that do not map directly to an actual database column are called "alias" fields, and include presentational fields and certain relational fields.

Geospatial fields are used to store data in [GeoJSON](https://geojson.org/) format. These types are only supported if your database supports spatial extensions.

## Creating Fields

When creating a new field, you must first select an [interface](/data-modeling/interfaces) and provide some basic configuration. Basic configuration will depend on the interface selected, but all fields have some common characteristics.
Expand Down

0 comments on commit fbc70a8

Please sign in to comment.