Skip to content

Commit

Permalink
Type Geometry (#173)
Browse files Browse the repository at this point in the history
* type Geometry

* actually just delegate to Geo.geometry()
  • Loading branch information
RudolfMan authored Sep 23, 2023
1 parent 905faeb commit 7dcd892
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/geo_postgis/geometry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ if Code.ensure_loaded?(Ecto.Type) do
GeometryCollection
]

@type t :: Geo.geometry()

if macro_exported?(Ecto.Type, :__using__, 1) do
use Ecto.Type
else
Expand Down
3 changes: 1 addition & 2 deletions test/ecto_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ defmodule Geo.Ecto.Test do
setup _ do
{:ok, pid} = Postgrex.start_link(Geo.Test.Helper.opts())

{:ok, _} =
Postgrex.query(pid, "CREATE EXTENSION IF NOT EXISTS postgis", [])
{:ok, _} = Postgrex.query(pid, "CREATE EXTENSION IF NOT EXISTS postgis", [])

{:ok, _} =
Postgrex.query(pid, "DROP TABLE IF EXISTS locations, geographies, location_multi", [])
Expand Down

0 comments on commit 7dcd892

Please sign in to comment.