StrawHat.Map v1.2.0 StrawHat.Map.Counties View Source
Defines functionality for counties management.
Link to this section Summary
Functions
Creates a county
Destroys a county
Gets a county by id
Return the list of cities from counties
Returns the list of counties
Returns a list of counties
Gets a county by id
Updates a county
Link to this section Functions
Link to this function
create_county(county_attrs)
View Source
create_county(StrawHat.Map.County.county_attrs()) :: {:ok, StrawHat.Map.County.t()} | {:error, Ecto.Changeset.t()}
Creates a county.
Link to this function
destroy_county(county)
View Source
destroy_county(StrawHat.Map.County.t()) :: {:ok, StrawHat.Map.County.t()} | {:error, Ecto.Changeset.t()}
Destroys a county.
Link to this function
find_county(county_id)
View Source
find_county(String.t()) :: {:ok, StrawHat.Map.County.t()} | {:error, StrawHat.Error.t()}
Gets a county by id
.
Return the list of cities from counties.
Link to this function
get_counties(pagination \\ [])
View Source
get_counties(Scrivener.Config.t()) :: Scrivener.Page.t()
Returns the list of counties.
Link to this function
get_counties_by_ids(county_ids)
View Source
get_counties_by_ids([integer()]) :: [StrawHat.Map.County.t()] | no_return()
Returns a list of counties.
Link to this function
get_county(county_id)
View Source
get_county(String.t()) :: StrawHat.Map.County.t() | nil | no_return()
Gets a county by id
.
Link to this function
update_county(county, county_attrs)
View Source
update_county(StrawHat.Map.County.t(), StrawHat.Map.County.county_attrs()) :: {:ok, StrawHat.Map.County.t()} | {:error, Ecto.Changeset.t()}
Updates a county.