Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding geospatial datatypes #71

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading