Mbtiles.DB.Queries (mbtiles v0.4.0)
This module defines functions for queries in queries.sql
Link to this section Summary
Functions
Gets all of metadata.
Gets all of metadata.. On error, fails (See function without bang for more information).
Selects a single tile from database.
Selects a single tile from database.. On error, fails (See function without bang for more information).
Runs the query
.
Runs the query
. On error, fails.
Link to this section Functions
get_metadata(params, options \\ [])
Specs
get_metadata(AyeSQL.Core.parameters(), AyeSQL.Core.options()) :: {:ok, AyeSQL.Query.t() | term()} | {:error, AyeSQL.Error.t() | term()}
Gets all of metadata.
Expected params
are:
[]
with the following options
:
run?
- Whether it should run the query or not. Defaults totrue
.
and generates/runs the query:
SELECT * FROM metadata
get_metadata!(params, options \\ [])
Specs
get_metadata!(AyeSQL.Core.parameters(), AyeSQL.Core.options()) :: AyeSQL.Query.t() | term() | no_return()
Gets all of metadata.. On error, fails (See function without bang for more information).
get_tile(params, options \\ [])
Specs
get_tile(AyeSQL.Core.parameters(), AyeSQL.Core.options()) :: {:ok, AyeSQL.Query.t() | term()} | {:error, AyeSQL.Error.t() | term()}
Selects a single tile from database.
Expected params
are:
[:zoom, :x, :y]
with the following options
:
run?
- Whether it should run the query or not. Defaults totrue
.
and generates/runs the query:
SELECT tile_data FROM tiles where zoom_level = :zoom and tile_column = :x and tile_row = :y
get_tile!(params, options \\ [])
Specs
get_tile!(AyeSQL.Core.parameters(), AyeSQL.Core.options()) :: AyeSQL.Query.t() | term() | no_return()
Selects a single tile from database.. On error, fails (See function without bang for more information).
run(query, options \\ [])
Specs
run(AyeSQL.Query.t(), keyword()) :: {:ok, term()} | {:error, term()}
Runs the query
.
run!(query, options \\ [])
Specs
run!(AyeSQL.Query.t(), keyword()) :: term() | no_return()
Runs the query
. On error, fails.