Geo Coordinate latitude & longitude support

Am I correct to say, there is no support for handling coordinates?

It is extremely common to need latitude & longitude.

The simplest way to handle this, is to support the “point” datatype in Postgres.

This is a simple data type; the value looks like:

(49.013434, 53.023343)

If dbdesign & dbml and dbml2sql supports the ‘point’ datatype, then we can compile the dbml to postgres, for prototyping databases. The python Faker library also provides a nice way to generate fake data for coordinates that fit the ‘point’ datatype.

Any advice for accelerating the process to update the dbml2sql compiler? Can I update the compiler myself on my local machine?

Hi @shan_newton, there is no type limit in DBML. Can you try this?

Table restaurants {
  id int [pk]
  location point
}
1 Like

Oh! Thanks Huy, yes this works.

My editor did not provide color for the ‘point’ type, so I thought it would not compile. Now I know. :slight_smile:

1 Like