mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 04:41:46 +03:00
720b682b7e
* Add `MbtType::FlatWithHash` * Support copying, diffing and applying diffs to and from any `MbtTypes`s * Support validating tile data if hash is contained in `*.mbtiles` file (i.e it is of `MbtType::FlatWithHash` or `MbtType::Normalized`) --------- Co-authored-by: rstanciu <rstanciu@rivian.com> Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
21 lines
1.7 KiB
JSON
21 lines
1.7 KiB
JSON
{
|
|
"db_name": "SQLite",
|
|
"query": "SELECT (\n -- Has a \"map\" table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'map'\n AND type = 'table'\n --\n ) AND (\n -- \"map\" table's columns and their types are as expected:\n -- 4 columns (zoom_level, tile_column, tile_row, tile_id).\n -- The order is not important\n SELECT COUNT(*) = 4\n FROM pragma_table_info('map')\n WHERE ((name = \"zoom_level\" AND type = \"INTEGER\")\n OR (name = \"tile_column\" AND type = \"INTEGER\")\n OR (name = \"tile_row\" AND type = \"INTEGER\")\n OR (name = \"tile_id\" AND type = \"TEXT\"))\n --\n ) AND (\n -- Has a \"images\" table\n SELECT COUNT(*) = 1\n FROM sqlite_master\n WHERE name = 'images'\n AND type = 'table'\n --\n ) AND (\n -- \"images\" table's columns and their types are as expected:\n -- 2 columns (tile_id, tile_data).\n -- The order is not important\n SELECT COUNT(*) = 2\n FROM pragma_table_info('images')\n WHERE ((name = \"tile_id\" AND type = \"TEXT\")\n OR (name = \"tile_data\" AND type = \"BLOB\"))\n --\n ) AS is_valid;\n",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "is_valid",
|
|
"ordinal": 0,
|
|
"type_info": "Int"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 0
|
|
},
|
|
"nullable": [
|
|
null
|
|
]
|
|
},
|
|
"hash": "14f262aafedb8739ee403fe6fc67989d706ce91630c9332a600e8022c0d4b628"
|
|
}
|