StrawHat.Map v0.3.1 StrawHat.Map.County View Source
Defines functionality for counties management.
Link to this section Summary
Functions
Create a county
Destroy a county
Get a county by id
Get list of cities
Get the list of counties
Get list of counties
Get a county by id
Update a county
Link to this section Functions
Link to this function
create_county(county_attrs)
View Source
create_county(StrawHat.Map.Schema.County.county_attrs()) :: {:ok, StrawHat.Map.Schema.County.t()} | {:error, Ecto.Changeset.t()}
Create a county.
Link to this function
destroy_county(county)
View Source
destroy_county(StrawHat.Map.Schema.County.t()) :: {:ok, StrawHat.Map.Schema.County.t()} | {:error, Ecto.Changeset.t()}
Destroy a county.
Link to this function
find_county(county_id)
View Source
find_county(String.t()) :: {:ok, StrawHat.Map.Schema.County.t()} | {:error, StrawHat.Error.t()}
Get a county by id
.
Get list of cities.
Link to this function
get_counties(pagination \\ [])
View Source
get_counties(Scrivener.Config.t()) :: Scrivener.Page.t()
Get the list of counties.
Link to this function
get_counties_by_ids(county_ids)
View Source
get_counties_by_ids([integer()]) :: [StrawHat.Map.Schema.County.t()] | no_return()
Get list of counties.
Link to this function
get_county(county_id)
View Source
get_county(String.t()) :: StrawHat.Map.Schema.County.t() | nil | no_return()
Get a county by id
.
Link to this function
update_county(county, county_attrs)
View Source
update_county( StrawHat.Map.Schema.County.t(), StrawHat.Map.Schema.County.county_attrs() ) :: {:ok, StrawHat.Map.Schema.County.t()} | {:error, Ecto.Changeset.t()}
Update a county.