From bc3c9b82745ea4fbb25e2d60fc18cd5ada66dc56 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 25 Jun 2024 14:53:44 -0400 Subject: [PATCH] cleanup --- Cargo.lock | 6 +++--- Cargo.toml | 4 ++-- martin-tile-utils/Cargo.toml | 2 +- martin/Cargo.toml | 2 +- mbtiles/Cargo.toml | 2 +- mbtiles/src/bindiff.rs | 4 ++-- mbtiles/src/queries.rs | 4 ++-- mbtiles/tests/snapshots/copy__databases@flat__bdr.snap | 2 +- mbtiles/tests/snapshots/copy__databases@hash__bdr.snap | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48ad3bd23..50ee96887 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2337,7 +2337,7 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "martin" -version = "0.13.0" +version = "0.14.0" dependencies = [ "actix-cors", "actix-http", @@ -2391,7 +2391,7 @@ dependencies = [ [[package]] name = "martin-tile-utils" -version = "0.4.1" +version = "0.5.0" dependencies = [ "approx", "brotli 6.0.0", @@ -2401,7 +2401,7 @@ dependencies = [ [[package]] name = "mbtiles" -version = "0.9.1" +version = "0.10.0" dependencies = [ "actix-rt", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index d7fca5320..5500b6e8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,8 +51,8 @@ json-patch = "2.0" lambda-web = { version = "0.2.1", features = ["actix4"] } libsqlite3-sys = { version = ">=0.27", features = ["bundled"] } log = "0.4" -martin-tile-utils = { path = "./martin-tile-utils", version = "0.4.0" } -mbtiles = { path = "./mbtiles", version = "0.9.0" } +martin-tile-utils = { path = "./martin-tile-utils", version = "0.5.0" } +mbtiles = { path = "./mbtiles", version = "0.10.0" } md5 = "0.7.0" moka = { version = "0.12", features = ["future"] } num_cpus = "1" diff --git a/martin-tile-utils/Cargo.toml b/martin-tile-utils/Cargo.toml index 9fc81854d..9ee6e5c24 100644 --- a/martin-tile-utils/Cargo.toml +++ b/martin-tile-utils/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "martin-tile-utils" -version = "0.4.1" +version = "0.5.0" authors = ["Yuri Astrakhan ", "MapLibre contributors"] description = "Utilities to help with map tile processing, such as type and compression detection. Used by the MapLibre's Martin tile server." keywords = ["maps", "tiles", "mvt", "tileserver"] diff --git a/martin/Cargo.toml b/martin/Cargo.toml index d9cc42a84..0c3a871a8 100644 --- a/martin/Cargo.toml +++ b/martin/Cargo.toml @@ -3,7 +3,7 @@ lints.workspace = true [package] name = "martin" # Once the release is published with the hash, update https://github.com/maplibre/homebrew-martin -version = "0.13.0" +version = "0.14.0" authors = ["Stepan Kuzmin ", "Yuri Astrakhan ", "MapLibre contributors"] description = "Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support" keywords = ["maps", "tiles", "mbtiles", "pmtiles", "postgis"] diff --git a/mbtiles/Cargo.toml b/mbtiles/Cargo.toml index 573441a6e..d56fbdee8 100644 --- a/mbtiles/Cargo.toml +++ b/mbtiles/Cargo.toml @@ -2,7 +2,7 @@ lints.workspace = true [package] name = "mbtiles" -version = "0.9.1" +version = "0.10.0" authors = ["Yuri Astrakhan ", "MapLibre contributors"] description = "A simple low-level MbTiles access and processing library, with some tile format detection and other relevant heuristics." keywords = ["mbtiles", "maps", "tiles", "mvt", "tilejson"] diff --git a/mbtiles/src/bindiff.rs b/mbtiles/src/bindiff.rs index 178613fb7..e6ad0dbe3 100644 --- a/mbtiles/src/bindiff.rs +++ b/mbtiles/src/bindiff.rs @@ -155,7 +155,7 @@ impl BinDiffDiffer { ) -> Self { assert_ne!(patch_type, Whole, "Invalid for BinDiffDiffer"); let insert_sql = format!( - "INSERT INTO {}(zoom_level, tile_column, tile_row, patch_data, uncompressed_tile_xxh3_64) VALUES (?, ?, ?, ?, ?)", + "INSERT INTO {}(zoom_level, tile_column, tile_row, patch_data, tile_xxh3_64_hash) VALUES (?, ?, ?, ?, ?)", get_bsdiff_tbl_name(patch_type)); Self { src_mbt, @@ -302,7 +302,7 @@ impl BinDiffer for BinDiffPatcher { , srcTiles.tile_row , srcTiles.tile_data , patch_data - , uncompressed_tile_xxh3_64 + , tile_xxh3_64_hash FROM tiles AS srcTiles JOIN diffDb.{tbl} AS difTiles ON srcTiles.zoom_level = difTiles.zoom_level AND srcTiles.tile_column = difTiles.tile_column diff --git a/mbtiles/src/queries.rs b/mbtiles/src/queries.rs index f8fa202b6..7443a406e 100644 --- a/mbtiles/src/queries.rs +++ b/mbtiles/src/queries.rs @@ -231,7 +231,7 @@ where tile_column integer NOT NULL, tile_row integer NOT NULL, patch_data blob NOT NULL, - uncompressed_tile_xxh3_64 integer NOT NULL, + tile_xxh3_64_hash integer NOT NULL, PRIMARY KEY(zoom_level, tile_column, tile_row));" ); @@ -260,7 +260,7 @@ where OR (name = 'tile_column' AND type = 'INTEGER') OR (name = 'tile_row' AND type = 'INTEGER') OR (name = 'patch_data' AND type = 'BLOB') - OR (name = 'uncompressed_tile_xxh3_64' AND type = 'INTEGER')) + OR (name = 'tile_xxh3_64_hash' AND type = 'INTEGER')) -- ) as is_valid;" ); diff --git a/mbtiles/tests/snapshots/copy__databases@flat__bdr.snap b/mbtiles/tests/snapshots/copy__databases@flat__bdr.snap index 4a131a6ff..3c5481e33 100644 --- a/mbtiles/tests/snapshots/copy__databases@flat__bdr.snap +++ b/mbtiles/tests/snapshots/copy__databases@flat__bdr.snap @@ -11,7 +11,7 @@ CREATE TABLE bsdiffraw ( tile_column integer NOT NULL, tile_row integer NOT NULL, patch_data blob NOT NULL, - uncompressed_tile_xxh3_64 integer NOT NULL, + tile_xxh3_64_hash integer NOT NULL, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ '( 5, 1, 1, blob(1B1E00F80799700B0AE100F45284A210A00708A0C03B), 479130493 )', diff --git a/mbtiles/tests/snapshots/copy__databases@hash__bdr.snap b/mbtiles/tests/snapshots/copy__databases@hash__bdr.snap index 498051906..3a569b0ff 100644 --- a/mbtiles/tests/snapshots/copy__databases@hash__bdr.snap +++ b/mbtiles/tests/snapshots/copy__databases@hash__bdr.snap @@ -11,7 +11,7 @@ CREATE TABLE bsdiffraw ( tile_column integer NOT NULL, tile_row integer NOT NULL, patch_data blob NOT NULL, - uncompressed_tile_xxh3_64 integer NOT NULL, + tile_xxh3_64_hash integer NOT NULL, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ '( 5, 1, 1, blob(1B1E00F80799700B0AE100F45284A210A00708A0C03B), 479130493 )',