question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Geolocation/Spatial types support

See original GitHub issue

Currently prisma2 does not support spatial types. This is not exactly an edge case since according to google 9% of sql files on github carry out spatial queries.

I was thinking how that feature could work but it’s probably a bit naive given I don’t know the implementation details of prisma2 :

  • Have a schema annotation @@spatial so that migrate would create a geometry type in postGIS, a geojson field in mongo etc.
  • generate could type this to a geoJSON definition
  • client would translate queries to St_FromGeoJSON in postGIS, leave the geoJSON as is in Mongo

The rationale behind this is that you basically want migrate to create the right spatial type in your db, currently schema/code-first does not work and introspect detects spatial as a string. Yuo also want client to perform CRUD on tables containing spatial types, currently CRUD fails if the spatial type is in the select so a .raw request is the only workaround.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:243
  • Comments:50 (12 by maintainers)

github_iconTop GitHub Comments

58reactions
floelhoeffelcommented, Jul 6, 2022

Hello everyone 👋

We are kicking off design of GIS support for Prisma!

If you would like to help, please let us learn about your GIS needs!

Via survey: Please fill out our GIS User Research Survey

Via email: Alternatively, just shoot us an an email to feedback@prisma.io. The questions we have are (all in the context of GIS):

  • what is your GIS use case?
  • what database do you use?
  • what column types do you use?
  • what queries do you use?
  • what indexes do you use?
  • what kind of defaults do you use?

Thank you!

36reactions
garretteklofcommented, Dec 7, 2021

Please, for the love of all that is good and holy, get this feature in.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Geolocation/Spatial types support · Issue #1798 · prisma ...
Currently prisma2 does not support spatial types. This is not exactly an edge case since according to google 9% of sql files on...
Read more >
Spatial Data Types Overview - SQL Server - Microsoft Learn
There are two types of spatial data. The geometry data type supports planar, or Euclidean (flat-earth), data. The geometry data type both ...
Read more >
Geospatial Data Types - Snowflake Documentation
Snowflake provides the following data types for geospatial data: ... The GEOGRAPHY and GEOMETRY data types support the following standard industry formats ......
Read more >
7 Spatial Databases for Your Enterprise (in 2021)
Spatial data comes in all shapes and sizes. All databases typically support points, lines, and polygons, but some support many more spatial data ......
Read more >
MySQL 8.0 Reference Manual :: 11.4 Spatial Data Types
The spatial data types and functions are available for MyISAM , InnoDB , NDB , and ARCHIVE tables. For indexing spatial columns, MyISAM...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found