From 3f058f305888070c31c4dcaa1d3ddd43da6a6fb0 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 4 Oct 2023 23:05:20 -0400 Subject: [PATCH] wip --- Cargo.lock | 48 +++ Cargo.toml | 1 + martin-mbtiles/Cargo.toml | 1 + martin-mbtiles/src/mbtiles.rs | 2 +- martin-mbtiles/tests/mbtiles.rs | 367 +++++++++--------- ...=> mbtiles__convert@v1_z2__flat-flat.snap} | 11 +- ...=> mbtiles__convert@v1_z2__flat-hash.snap} | 11 +- ...=> mbtiles__convert@v1_z2__flat-norm.snap} | 17 +- ...=> mbtiles__convert@v1_z2__hash-flat.snap} | 11 +- ...=> mbtiles__convert@v1_z2__hash-hash.snap} | 11 +- ...=> mbtiles__convert@v1_z2__hash-norm.snap} | 17 +- ...=> mbtiles__convert@v1_z2__norm-flat.snap} | 11 +- ...=> mbtiles__convert@v1_z2__norm-hash.snap} | 11 +- ...=> mbtiles__convert@v1_z2__norm-norm.snap} | 17 +- ...at.snap => mbtiles__copy@v1_cp__flat.snap} | 17 +- ...sh.snap => mbtiles__copy@v1_cp__hash.snap} | 17 +- ...rm.snap => mbtiles__copy@v1_cp__norm.snap} | 21 +- ....snap => mbtiles__copy@v1_orig__flat.snap} | 15 +- ....snap => mbtiles__copy@v1_orig__hash.snap} | 16 +- ....snap => mbtiles__copy@v1_orig__norm.snap} | 19 +- ...__copy_and_convert@convert__flat-hash.snap | 52 --- ...__copy_and_convert@convert__flat-norm.snap | 90 ----- ...__copy_and_convert@convert__hash-flat.snap | 44 --- ...__copy_and_convert@convert__norm-flat.snap | 44 --- ...__copy_and_convert@convert__norm-norm.snap | 90 ----- ...les__copy_and_convert@cp-no_agg__hash.snap | 51 --- .../mbtiles__copy_and_convert@cp__flat.snap | 44 --- .../mbtiles__copy_and_convert@cp__hash.snap | 52 --- .../mbtiles__copy_and_convert@cp__norm.snap | 90 ----- ...iff_and_apply@applied__flat-hash=dflt.snap | 44 --- ...iff_and_apply@applied__flat-hash=flat.snap | 44 --- ...iff_and_apply@applied__flat-hash=hash.snap | 44 --- ...iff_and_apply@applied__flat-hash=norm.snap | 46 --- ...iff_and_apply@applied__flat-norm=dflt.snap | 44 --- ...iff_and_apply@applied__flat-norm=flat.snap | 44 --- ...iff_and_apply@applied__flat-norm=hash.snap | 44 --- ...iff_and_apply@applied__flat-norm=norm.snap | 46 --- ...iff_and_apply@applied__hash-flat=dflt.snap | 52 --- ...iff_and_apply@applied__hash-flat=flat.snap | 52 --- ...iff_and_apply@applied__hash-flat=hash.snap | 52 --- ...iff_and_apply@applied__hash-flat=norm.snap | 52 --- ...iff_and_apply@applied__hash-hash=dflt.snap | 52 --- ...iff_and_apply@applied__hash-hash=flat.snap | 52 --- ...iff_and_apply@applied__hash-hash=hash.snap | 52 --- ...iff_and_apply@applied__hash-hash=norm.snap | 52 --- ...iff_and_apply@applied__hash-norm=dflt.snap | 52 --- ...iff_and_apply@applied__hash-norm=flat.snap | 52 --- ...iff_and_apply@applied__hash-norm=hash.snap | 52 --- ...iff_and_apply@applied__hash-norm=norm.snap | 52 --- ...iff_and_apply@applied__norm-flat=dflt.snap | 90 ----- ...iff_and_apply@applied__norm-flat=flat.snap | 90 ----- ...iff_and_apply@applied__norm-flat=hash.snap | 90 ----- ...iff_and_apply@applied__norm-flat=norm.snap | 90 ----- ...iff_and_apply@applied__norm-hash=dflt.snap | 90 ----- ...iff_and_apply@applied__norm-hash=flat.snap | 90 ----- ...iff_and_apply@applied__norm-hash=hash.snap | 90 ----- ...iff_and_apply@applied__norm-hash=norm.snap | 90 ----- ...iff_and_apply@applied__norm-norm=dflt.snap | 90 ----- ...iff_and_apply@applied__norm-norm=flat.snap | 90 ----- ...iff_and_apply@applied__norm-norm=hash.snap | 90 ----- ...iff_and_apply@applied__norm-norm=norm.snap | 90 ----- ..._diff_and_apply@delta__flat-norm=dflt.snap | 45 --- ..._diff_and_apply@delta__flat-norm=flat.snap | 45 --- ..._diff_and_apply@delta__hash-flat=flat.snap | 45 --- ..._diff_and_apply@delta__hash-hash=dflt.snap | 53 --- ..._diff_and_apply@delta__hash-hash=flat.snap | 45 --- ..._diff_and_apply@delta__hash-hash=hash.snap | 53 --- ..._diff_and_apply@delta__hash-norm=dflt.snap | 53 --- ..._diff_and_apply@delta__hash-norm=flat.snap | 45 --- ..._diff_and_apply@delta__hash-norm=hash.snap | 53 --- ..._diff_and_apply@delta__norm-flat=flat.snap | 45 --- ..._diff_and_apply@delta__norm-hash=dflt.snap | 89 ----- ..._diff_and_apply@delta__norm-hash=flat.snap | 45 --- ..._diff_and_apply@delta__norm-hash=hash.snap | 53 --- ..._diff_and_apply@delta__norm-hash=norm.snap | 89 ----- ..._diff_and_apply@delta__norm-norm=dflt.snap | 89 ----- ..._diff_and_apply@delta__norm-norm=flat.snap | 45 --- ..._diff_and_apply@delta__norm-norm=hash.snap | 53 --- ..._diff_and_apply@delta__norm-norm=norm.snap | 89 ----- ...es__diff_apply@delta__flat@flat=dflt.snap} | 18 +- ...es__diff_apply@delta__flat@flat=flat.snap} | 18 +- ...es__diff_apply@delta__flat@flat=hash.snap} | 18 +- ...es__diff_apply@delta__flat@flat=norm.snap} | 21 +- ...es__diff_apply@delta__flat@hash=dflt.snap} | 18 +- ...es__diff_apply@delta__flat@hash=flat.snap} | 18 +- ...es__diff_apply@delta__flat@hash=hash.snap} | 18 +- ...es__diff_apply@delta__flat@hash=norm.snap} | 21 +- ...les__diff_apply@delta__flat@norm=dflt.snap | 45 +++ ...les__diff_apply@delta__flat@norm=flat.snap | 45 +++ ...es__diff_apply@delta__flat@norm=hash.snap} | 18 +- ...es__diff_apply@delta__flat@norm=norm.snap} | 21 +- ...es__diff_apply@delta__hash@flat=dflt.snap} | 18 +- ...les__diff_apply@delta__hash@flat=flat.snap | 45 +++ ...es__diff_apply@delta__hash@flat=hash.snap} | 18 +- ...es__diff_apply@delta__hash@flat=norm.snap} | 21 +- ...les__diff_apply@delta__hash@hash=dflt.snap | 53 +++ ...les__diff_apply@delta__hash@hash=flat.snap | 45 +++ ...les__diff_apply@delta__hash@hash=hash.snap | 53 +++ ...es__diff_apply@delta__hash@hash=norm.snap} | 21 +- ...les__diff_apply@delta__hash@norm=dflt.snap | 53 +++ ...les__diff_apply@delta__hash@norm=flat.snap | 45 +++ ...les__diff_apply@delta__hash@norm=hash.snap | 53 +++ ...es__diff_apply@delta__hash@norm=norm.snap} | 21 +- ...es__diff_apply@delta__norm@flat=dflt.snap} | 21 +- ...les__diff_apply@delta__norm@flat=flat.snap | 45 +++ ...es__diff_apply@delta__norm@flat=hash.snap} | 18 +- ...es__diff_apply@delta__norm@flat=norm.snap} | 21 +- ...les__diff_apply@delta__norm@hash=dflt.snap | 88 +++++ ...les__diff_apply@delta__norm@hash=flat.snap | 45 +++ ...les__diff_apply@delta__norm@hash=hash.snap | 53 +++ ...les__diff_apply@delta__norm@hash=norm.snap | 88 +++++ ...les__diff_apply@delta__norm@norm=dflt.snap | 88 +++++ ...les__diff_apply@delta__norm@norm=flat.snap | 45 +++ ...les__diff_apply@delta__norm@norm=hash.snap | 53 +++ ...les__diff_apply@delta__norm@norm=norm.snap | 88 +++++ ...lat@hash=norm__to__flat__bad_from_v1.snap} | 19 +- ...lat@norm=norm__to__flat__bad_from_v1.snap} | 19 +- ...ash@hash=norm__to__flat__bad_from_v1.snap} | 19 +- ...ash@norm=norm__to__flat__bad_from_v1.snap} | 19 +- ...norm@hash=dflt__to__flat__bad_from_v1.snap | 47 +++ ...norm@hash=norm__to__flat__bad_from_v1.snap | 47 +++ ...norm@norm=dflt__to__flat__bad_from_v1.snap | 47 +++ ...norm@norm=norm__to__flat__bad_from_v1.snap | 47 +++ 123 files changed, 1792 insertions(+), 4142 deletions(-) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__flat-flat.snap => mbtiles__convert@v1_z2__flat-flat.snap} (73%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__norm-hash.snap => mbtiles__convert@v1_z2__flat-hash.snap} (70%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__norm-norm.snap => mbtiles__convert@v1_z2__flat-norm.snap} (76%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__norm-flat.snap => mbtiles__convert@v1_z2__hash-flat.snap} (73%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__flat-hash.snap => mbtiles__convert@v1_z2__hash-hash.snap} (70%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__flat-norm.snap => mbtiles__convert@v1_z2__hash-norm.snap} (76%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__hash-flat.snap => mbtiles__convert@v1_z2__norm-flat.snap} (73%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__hash-hash.snap => mbtiles__convert@v1_z2__norm-hash.snap} (70%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert-z2__hash-norm.snap => mbtiles__convert@v1_z2__norm-norm.snap} (76%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert__flat-flat.snap => mbtiles__copy@v1_cp__flat.snap} (66%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert__norm-hash.snap => mbtiles__copy@v1_cp__hash.snap} (61%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert__hash-norm.snap => mbtiles__copy@v1_cp__norm.snap} (75%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@cp-no_agg__flat.snap => mbtiles__copy@v1_orig__flat.snap} (70%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@convert__hash-hash.snap => mbtiles__copy@v1_orig__hash.snap} (64%) rename martin-mbtiles/tests/snapshots/{mbtiles__copy_and_convert@cp-no_agg__norm.snap => mbtiles__copy@v1_orig__norm.snap} (77%) delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=norm.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=dflt.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=flat.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=hash.snap delete mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=norm.snap rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-flat=dflt.snap => mbtiles__diff_apply@delta__flat@flat=dflt.snap} (66%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-flat=flat.snap => mbtiles__diff_apply@delta__flat@flat=flat.snap} (66%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-flat=hash.snap => mbtiles__diff_apply@delta__flat@flat=hash.snap} (65%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-flat=norm.snap => mbtiles__diff_apply@delta__flat@flat=norm.snap} (76%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-hash=dflt.snap => mbtiles__diff_apply@delta__flat@hash=dflt.snap} (66%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-hash=flat.snap => mbtiles__diff_apply@delta__flat@hash=flat.snap} (66%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-hash=hash.snap => mbtiles__diff_apply@delta__flat@hash=hash.snap} (64%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__hash-hash=norm.snap => mbtiles__diff_apply@delta__flat@hash=norm.snap} (75%) create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=dflt.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=flat.snap rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-norm=hash.snap => mbtiles__diff_apply@delta__flat@norm=hash.snap} (64%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-hash=norm.snap => mbtiles__diff_apply@delta__flat@norm=norm.snap} (75%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__hash-flat=hash.snap => mbtiles__diff_apply@delta__hash@flat=dflt.snap} (65%) create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=flat.snap rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__norm-flat=hash.snap => mbtiles__diff_apply@delta__hash@flat=hash.snap} (65%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__norm-flat=dflt.snap => mbtiles__diff_apply@delta__hash@flat=norm.snap} (76%) create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=dflt.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=flat.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=hash.snap rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__flat-norm=norm.snap => mbtiles__diff_apply@delta__hash@hash=norm.snap} (75%) create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=dflt.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=flat.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=hash.snap rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__hash-norm=norm.snap => mbtiles__diff_apply@delta__hash@norm=norm.snap} (75%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__norm-flat=norm.snap => mbtiles__diff_apply@delta__norm@flat=dflt.snap} (76%) create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=flat.snap rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__hash-flat=dflt.snap => mbtiles__diff_apply@delta__norm@flat=hash.snap} (65%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@delta__hash-flat=norm.snap => mbtiles__diff_apply@delta__norm@flat=norm.snap} (76%) create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=dflt.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=flat.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=hash.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=norm.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=dflt.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=flat.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=hash.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=norm.snap rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@applied__flat-flat=dflt.snap => mbtiles__diff_apply@v2_applied__flat@hash=norm__to__flat__bad_from_v1.snap} (62%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@applied__flat-flat=flat.snap => mbtiles__diff_apply@v2_applied__flat@norm=norm__to__flat__bad_from_v1.snap} (62%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@applied__flat-flat=hash.snap => mbtiles__diff_apply@v2_applied__hash@hash=norm__to__flat__bad_from_v1.snap} (62%) rename martin-mbtiles/tests/snapshots/{mbtiles__diff_and_apply@applied__flat-flat=norm.snap => mbtiles__diff_apply@v2_applied__hash@norm=norm__to__flat__bad_from_v1.snap} (62%) create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=dflt__to__flat__bad_from_v1.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=norm__to__flat__bad_from_v1.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=dflt__to__flat__bad_from_v1.snap create mode 100644 martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=norm__to__flat__bad_from_v1.snap diff --git a/Cargo.lock b/Cargo.lock index 8353cc601..0b4380e0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1325,6 +1325,12 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +[[package]] +name = "futures-timer" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" + [[package]] name = "futures-util" version = "0.3.28" @@ -1380,6 +1386,12 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + [[package]] name = "globset" version = "0.4.13" @@ -1868,6 +1880,7 @@ dependencies = [ "log", "martin-tile-utils", "pretty_assertions", + "rstest", "serde", "serde_json", "serde_yaml", @@ -2509,6 +2522,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +[[package]] +name = "relative-path" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" + [[package]] name = "resvg" version = "0.34.1" @@ -2581,6 +2600,35 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rstest" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version", +] + +[[package]] +name = "rstest_macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" +dependencies = [ + "cfg-if", + "glob", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.37", + "unicode-ident", +] + [[package]] name = "rusqlite" version = "0.29.0" diff --git a/Cargo.toml b/Cargo.toml index 9f63add39..dab741e09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,7 @@ postgres = { version = "0.19", features = ["with-time-0_3", "with-uuid-1", "with postgres-protocol = "0.6" pretty_assertions = "1" regex = "1" +rstest = "0.18" rustls = { version = "0.21", features = ["dangerous_configuration"] } rustls-native-certs = "0.6" rustls-pemfile = "1" diff --git a/martin-mbtiles/Cargo.toml b/martin-mbtiles/Cargo.toml index 7d5f12003..957618f4d 100644 --- a/martin-mbtiles/Cargo.toml +++ b/martin-mbtiles/Cargo.toml @@ -39,6 +39,7 @@ ctor.workspace = true env_logger.workspace = true insta.workspace = true pretty_assertions.workspace = true +rstest.workspace = true [lib] path = "src/lib.rs" diff --git a/martin-mbtiles/src/mbtiles.rs b/martin-mbtiles/src/mbtiles.rs index ee9c6f08b..d0357ef37 100644 --- a/martin-mbtiles/src/mbtiles.rs +++ b/martin-mbtiles/src/mbtiles.rs @@ -62,7 +62,7 @@ pub const AGG_TILES_HASH: &str = "agg_tiles_hash"; /// describing the eventual AGG_TILES_HASH value once the diff is applied pub const AGG_TILES_HASH_IN_DIFF: &str = "agg_tiles_hash_after_apply"; -#[derive(Debug, Clone, Copy, PartialEq, Eq, EnumDisplay)] +#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, EnumDisplay)] #[enum_display(case = "Kebab")] #[cfg_attr(feature = "cli", derive(ValueEnum))] pub enum MbtType { diff --git a/martin-mbtiles/tests/mbtiles.rs b/martin-mbtiles/tests/mbtiles.rs index 4954da061..88cf91977 100644 --- a/martin-mbtiles/tests/mbtiles.rs +++ b/martin-mbtiles/tests/mbtiles.rs @@ -1,31 +1,39 @@ +use std::collections::HashMap; use std::path::PathBuf; use std::str::from_utf8; use ctor::ctor; -use insta::assert_toml_snapshot; use martin_mbtiles::MbtType::{Flat, FlatWithHash, Normalized}; use martin_mbtiles::{apply_diff, create_flat_tables, MbtResult, MbtType, Mbtiles, MbtilesCopier}; +use rstest::{fixture, rstest}; use serde::Serialize; use sqlx::{query, query_as, Executor as _, Row, SqliteConnection}; +use pretty_assertions::assert_eq as pretty_assert_eq; const TILES_V1: &str = " INSERT INTO tiles (zoom_level, tile_column, tile_row, tile_data) VALUES - (1, 0, 0, cast('same' as blob)) - , (1, 0, 1, cast('edit-v1' as blob)) - , (1, 1, 1, cast('remove' as blob)) - , (2, 0, 0, cast('z2-same' as blob)) - , (2, 0, 1, cast('z2-edit-v1' as blob)) - , (2, 1, 1, cast('z2-remove' as blob)) + (5, 0, 0, cast('same' as blob)) + , (5, 0, 1, cast('edit-v1' as blob)) + , (5, 1, 1, cast('remove' as blob)) + + -- Identical content gets modified differently in V2 + , (6, 0, 0, cast('same' as blob)) + , (6, 0, 1, cast('edit-v1' as blob)) + , (6, 1, 4, cast('one-keep-one-remove' as blob)) + , (6, 1, 5, cast('one-keep-one-remove' as blob)) ;"; const TILES_V2: &str = " INSERT INTO tiles (zoom_level, tile_column, tile_row, tile_data) VALUES - (1, 0, 0, cast('same' as blob)) - , (1, 0, 1, cast('edit-v2' as blob)) - , (1, 1, 0, cast('new' as blob)) - , (2, 0, 0, cast('z2-same' as blob)) - , (2, 0, 1, cast('z2-edit-v2' as blob)) - , (2, 1, 0, cast('z2-new' as blob)) + (5, 0, 0, cast('same' as blob)) + , (5, 0, 1, cast('edit-v2' as blob)) + , (5, 1, 0, cast('new' as blob)) + + -- Identical content gets modified differently in V2 + , (6, 0, 0, cast('same' as blob)) + , (6, 0, 1, cast('edit-v2a' as blob)) + , (6, 1, 4, cast('one-keep-one-remove' as blob)) + , (6, 1, 6, cast('new' as blob)) ;"; const METADATA_V1: &str = " @@ -55,203 +63,214 @@ fn copier(src: &Mbtiles, dst: &Mbtiles) -> MbtilesCopier { MbtilesCopier::new(path(src), path(dst)) } -async fn open(file: &str) -> MbtResult<(Mbtiles, SqliteConnection)> { - let mbtiles = Mbtiles::new(file)?; - let conn = mbtiles.open().await?; - Ok((mbtiles, conn)) -} - -fn shorten(v: &MbtType) -> &'static str { - match *v { +fn shorten(v: MbtType) -> &'static str { + match v { Flat => "flat", FlatWithHash => "hash", Normalized => "norm", } } -macro_rules! assert_snapshot { - ($prefix:expr, $name:expr, $actual:expr) => { - let mut settings = insta::Settings::clone_current(); - let name = if $name != "" { - format!("{}__{}", $prefix, $name) - } else { - $prefix.to_string() - }; - settings.set_snapshot_suffix(name); - let result = &$actual; - settings.bind(|| assert_toml_snapshot!(result)); - }; +async fn open(file: &str) -> MbtResult<(Mbtiles, SqliteConnection)> { + let mbtiles = Mbtiles::new(file)?; + let conn = mbtiles.open().await?; + Ok((mbtiles, conn)) } macro_rules! open { - ($function:tt, $name:expr) => {{ - let func = stringify!($function); - let file = format!("file:{func}_{}?mode=memory&cache=shared", $name); - open(&file).await? + ($function:tt, $($arg:tt)*) => { + open!(@"", $function, $($arg)*) + }; + (@$extra:literal, $function:tt, $($arg:tt)*) => {{ + let file = format!("file:{}_{}{}?mode=memory&cache=shared", stringify!($function), format_args!($($arg)*), $extra); + open(&file).await.unwrap() }}; } -macro_rules! new_source { - ($function:tt, $dst:expr, $sql_meta:expr, $sql_data:expr) => {{ - let func = stringify!($function); - let name = stringify!($dst); - let file = format!("file:{func}_{name}?mode=memory&cache=shared"); - let (dst, mut cn_dst) = open(&file).await?; - create_flat_tables(&mut cn_dst).await?; - cn_dst.execute($sql_data).await?; - cn_dst.execute($sql_meta).await?; - (dst, cn_dst) +/// Create a new SQLite file of given type without agg_tiles_hash metadata value +macro_rules! new_file_no_hash { + ($function:tt, $dst_type:expr, $sql_meta:expr, $sql_data:expr, $($arg:tt)*) => {{ + new_file!(@true, $function, $dst_type, $sql_meta, $sql_data, $($arg)*) }}; } -/// Copy SQLite from $src to $dst, and add agg_tiles_hash metadata value -/// Returns the destination Mbtiles, the SQLite connection, and the dump of the SQLite -macro_rules! cp_w_hash { - ($function:tt, $src:expr, $dst:tt, $dst_type:expr) => {{ - cp_exact!($function, $src, $dst, $dst_type, false) +/// Create a new SQLite file of type $dst_type with the given metadata and tiles +macro_rules! new_file { + ($function:tt, $dst_type:expr, $sql_meta:expr, $sql_data:expr, $($arg:tt)*) => { + new_file!(@false, $function, $dst_type, $sql_meta, $sql_data, $($arg)*) + }; + + (@$skip_agg:expr, $function:tt, $dst_type:expr, $sql_meta:expr, $sql_data:expr, $($arg:tt)*) => {{ + let (tmp_mbt, mut cn_tmp) = open!(@"temp", $function, $($arg)*); + create_flat_tables(&mut cn_tmp).await.unwrap(); + cn_tmp.execute($sql_data).await.unwrap(); + cn_tmp.execute($sql_meta).await.unwrap(); + + let (dst_mbt, cn_dst) = open!($function, $($arg)*); + let mut opt = copier(&tmp_mbt, &dst_mbt); + opt.dst_type = Some($dst_type); + opt.skip_agg_tiles_hash = $skip_agg; + opt.run().await.unwrap(); + + (dst_mbt, cn_dst) }}; } -/// Copy SQLite from $src to $dst, no changes by default, or add agg_tiles_hash metadata if last arg is false -/// The result is dumped to a snapshot -/// Returns the destination Mbtiles, the SQLite connection, and the dump of the SQLite -macro_rules! cp_exact { - ($function:tt, $src:expr, $dst:tt, $dst_type:expr) => {{ - cp_exact!($function, $src, $dst, $dst_type, true) +macro_rules! assert_snapshot { + ($actual_value:expr, $($arg:tt)*) => {{ + let mut settings = insta::Settings::clone_current(); + settings.set_snapshot_suffix(format!($($arg)*)); + let actual_value = &$actual_value; + settings.bind(|| insta::assert_toml_snapshot!(actual_value)); }}; - ($function:tt, $src:expr, $dst:tt, $dst_type:expr, $skip_agg:expr) => {{ - let func = stringify!($function); - let name = stringify!($dst); - let file = format!("file:{func}--{name}?mode=memory&cache=shared"); - let (dst, cn_dst) = open(&file).await?; - let mut opt = copier(&$src, &dst); - opt.skip_agg_tiles_hash = $skip_agg; - opt.dst_type = Some($dst_type); - let dmp = dump(&mut opt.run().await?).await?; - (dst, cn_dst, dmp) +} + +macro_rules! assert_dump { + ($connection:expr, $($arg:tt)*) => {{ + let dmp = dump($connection).await.unwrap(); + assert_snapshot!(&dmp, $($arg)*); + dmp }}; } +type Databases = HashMap<(&'static str, MbtType), Vec>; + +#[fixture] +#[once] +fn databases() -> Databases { + futures::executor::block_on(async { + let mut result = HashMap::new(); + for &typ in &[Flat, FlatWithHash, Normalized] { + let (_, mut cn) = + new_file_no_hash!(databases, typ, METADATA_V1, TILES_V1, "v1-no-hash-{typ}"); + result.insert(("v1_no_hash", typ), dump(&mut cn).await.unwrap()); + + let (_, mut cn) = new_file!(databases, typ, METADATA_V1, TILES_V1, "v1-{typ}"); + result.insert(("v1", typ), dump(&mut cn).await.unwrap()); + + let (_, mut cn) = new_file!(databases, typ, METADATA_V2, TILES_V2, "v2-{typ}"); + result.insert(("v2", typ), dump(&mut cn).await.unwrap()); + } + result + }) +} + +#[rstest] #[actix_rt::test] -async fn copy_and_convert() -> MbtResult<()> { +async fn copy( + #[values(Flat, FlatWithHash, Normalized)] frm_type: MbtType, + databases: &Databases, +) -> MbtResult<()> { + let frm = shorten(frm_type); let mem = Mbtiles::new(":memory:")?; + let (frm_mbt, mut frm_cn) = new_file_no_hash!(copy, frm_type, METADATA_V1, TILES_V1, "{frm}"); - let (orig, _cn_orig) = new_source!(cp_conv, orig, METADATA_V1, TILES_V1); - let (flat, _cn_flat, _) = cp_exact!(cp_conv, orig, flat, Flat); - let (hash, _cn_hash, _) = cp_exact!(cp_conv, orig, hash, FlatWithHash); - let (norm, _cn_norm, _) = cp_exact!(cp_conv, orig, norm, Normalized); - - let types = &[(Flat, &flat), (FlatWithHash, &hash), (Normalized, &norm)]; - - for (frm, src) in types { - // Same content, but also will include agg_tiles_hash metadata value - let frm_str = shorten(frm); - let opt = copier(src, &mem); - assert_snapshot!("cp", frm_str, dump(&mut opt.run().await?).await?); - - // Identical content to the source - let mut opt = copier(src, &mem); - opt.skip_agg_tiles_hash = true; - assert_snapshot!("cp-no_agg", frm_str, dump(&mut opt.run().await?).await?); - - // Convert to other types - for (to_type, _) in types { - let pair = format!("{}-{}", shorten(frm), shorten(to_type)); - let mut opt = copier(src, &mem); - opt.dst_type = Some(*to_type); - assert_snapshot!("convert", pair, dump(&mut opt.run().await?).await?); - - let mut opt = copier(src, &mem); - opt.dst_type = Some(*to_type); - opt.zoom_levels.insert(2); - let z2only = dump(&mut opt.run().await?).await?; - assert_snapshot!("convert-z2", pair, z2only); - - let mut opt = copier(src, &mem); - opt.dst_type = Some(*to_type); - opt.min_zoom = Some(2); - pretty_assertions::assert_eq!(&z2only, &dump(&mut opt.run().await?).await?); - - let mut opt = copier(src, &mem); - opt.dst_type = Some(*to_type); - opt.min_zoom = Some(2); - opt.max_zoom = Some(2); - pretty_assertions::assert_eq!(&z2only, &dump(&mut opt.run().await?).await?); - } - } + let dmp = assert_dump!(&mut frm_cn, "v1_orig__{frm}"); + pretty_assert_eq!(databases.get(&("v1_no_hash", frm_type)).unwrap(), &dmp); + + let opt = copier(&frm_mbt, &mem); + let dmp = assert_dump!(&mut opt.run().await?, "v1_cp__{frm}"); + pretty_assert_eq!(databases.get(&("v1", frm_type)).unwrap(), &dmp); Ok(()) } -/// Create v1 and v2 in-memory sqlite files, and copy them to flat, hash, and norm variants -/// Keep connection open to make sure they can be opened as regular files by the main code. -/// For different variants, create a delta v2-v1, and re-apply the diff to v1 to get v2a - which should be identical to v2. +#[rstest] +#[trace] #[actix_rt::test] -async fn diff_and_apply() -> MbtResult<()> { - let (orig_v1, _cn_orig_v1) = new_source!(dif_aply, orig_v1, METADATA_V1, TILES_V1); - let (flat_v1, _cn_flat_v1, _) = cp_w_hash!(dif_aply, orig_v1, flat_v1, Flat); - let (hash_v1, _cn_hash_v1, _) = cp_w_hash!(dif_aply, orig_v1, hash_v1, FlatWithHash); - let (norm_v1, _cn_norm_v1, _) = cp_w_hash!(dif_aply, orig_v1, norm_v1, Normalized); - - let (orig_v2, _cn_orig_v2) = new_source!(dif_aply, orig_v2, METADATA_V2, TILES_V2); - let (flat_v2, _cn_flat_v2, dmp_flat_v2) = cp_w_hash!(dif_aply, orig_v2, flat_v2, Flat); - let (hash_v2, _cn_hash_v2, dmp_hash_v2) = cp_w_hash!(dif_aply, orig_v2, hash_v2, FlatWithHash); - let (norm_v2, _cn_norm_v2, dmp_norm_v2) = cp_w_hash!(dif_aply, orig_v2, norm_v2, Normalized); - - let types = &[ - ("flat", &flat_v1, &flat_v2, dmp_flat_v2), - ("hash", &hash_v1, &hash_v2, dmp_hash_v2), - ("norm", &norm_v1, &norm_v2, dmp_norm_v2), - ]; - - for (frm_type, v1, _, _) in types { - for (dif_type, _, v2, dump_v2) in types { - for dst_type in &[None, Some(Flat), Some(FlatWithHash), Some(Normalized)] { - let pair = if let Some(dst_type) = dst_type { - format!("{frm_type}-{dif_type}={}", shorten(dst_type)) - } else { - format!("{frm_type}-{dif_type}=dflt") - }; - let (dff, _cn_dff) = open!(dif_aply, format!("{pair}-dff")); - let (v2a, mut cn_v2a) = open!(dif_aply, format!("{pair}-v2a")); - - // Diff v1 with v2, and copy to diff anything that's different (i.e. mathematically: v2-v1) - let mut diff_with = copier(v1, &dff); - diff_with.diff_with_file = Some(path(v2)); - if let Some(dst_type) = dst_type { - diff_with.dst_type = Some(*dst_type); - } - assert_snapshot!("delta", pair, dump(&mut diff_with.run().await?).await?); - - // Copy v1 -> v2a, and apply dff to v2a - copier(v1, &v2a).run().await?; - apply_diff(path(&v2a), path(&dff)).await?; - - let dump_v2a = dump(&mut cn_v2a).await?; - assert_snapshot!("applied", pair, &dump_v2a); - - let expected_dump = if frm_type != dif_type { - eprintln!("TODO: implement convert copying {frm_type} -> {dif_type}"); - continue; - } else if frm_type == &"norm" { - eprintln!("FIXME: norm->norm diff is not working yet"); - continue; - } else { - dump_v2 - }; - - pretty_assertions::assert_eq!( - &dump_v2a, - expected_dump, - "v2a should be identical to v2 (type {frm_type} -> {dif_type})" - ); - } +async fn convert( + #[values(Flat, FlatWithHash, Normalized)] frm_type: MbtType, + #[values(Flat, FlatWithHash, Normalized)] dst_type: MbtType, + databases: &Databases, +) -> MbtResult<()> { + let (frm, to) = (shorten(frm_type), shorten(dst_type)); + let mem = Mbtiles::new(":memory:")?; + let (frm_mbt, _frm_cn) = new_file!(convert, frm_type, METADATA_V1, TILES_V1, "{frm}-{to}"); + + let mut opt = copier(&frm_mbt, &mem); + opt.dst_type = Some(dst_type); + let dmp = dump(&mut opt.run().await?).await?; + pretty_assert_eq!(databases.get(&("v1", dst_type)).unwrap(), &dmp); + + let mut opt = copier(&frm_mbt, &mem); + opt.dst_type = Some(dst_type); + opt.zoom_levels.insert(6); + let z6only = dump(&mut opt.run().await?).await?; + assert_snapshot!(z6only, "v1_z2__{frm}-{to}"); + + let mut opt = copier(&frm_mbt, &mem); + opt.dst_type = Some(dst_type); + opt.min_zoom = Some(6); + pretty_assert_eq!(&z6only, &dump(&mut opt.run().await?).await?); + + let mut opt = copier(&frm_mbt, &mem); + opt.dst_type = Some(dst_type); + opt.min_zoom = Some(6); + opt.max_zoom = Some(6); + pretty_assert_eq!(&z6only, &dump(&mut opt.run().await?).await?); + + Ok(()) +} + +#[rstest] +#[trace] +#[actix_rt::test] +async fn diff_apply( + #[values(Flat, FlatWithHash, Normalized)] src_type: MbtType, + #[values(Flat, FlatWithHash, Normalized)] dif_type: MbtType, + #[values(None, Some(Flat), Some(FlatWithHash), Some(Normalized))] dst_type: Option, + databases: &Databases, +) -> MbtResult<()> { + let (src, dif) = (shorten(src_type), shorten(dif_type)); + let dst = dst_type.map(shorten).unwrap_or("dflt"); + + let (src_mbt, _src_cn) = + new_file! {diff_apply, src_type, METADATA_V1, TILES_V1, "v1__{src}@{dif}={dst}"}; + let (dif_mbt, _dif_cn) = + new_file! {diff_apply, dif_type, METADATA_V2, TILES_V2, "v2__{src}@{dif}={dst}"}; + let (dst_mbt, _dst_cn) = open!(diff_apply, "dif__{src}-{dst}={dif}"); + + // Diff v1 with v2, and copy to diff anything that's different (i.e. mathematically: v2-v1) + let mut opt = copier(&src_mbt, &dst_mbt); + opt.diff_with_file = Some(path(&dif_mbt)); + if let Some(dst_type) = dst_type { + opt.dst_type = Some(dst_type); + } + assert_dump!(&mut opt.run().await?, "delta__{src}@{dif}={dst}"); + + for target_type in &[Flat, FlatWithHash, Normalized] { + let tar = shorten(*target_type); + let expected_v2 = databases.get(&("v2", *target_type)).unwrap(); + + let (tar1_mbt, mut tar1_cn) = new_file! {diff_apply, *target_type, METADATA_V1, TILES_V1, "apply__{src}@{dif}={dst}__to__{tar}-v1"}; + apply_diff(path(&tar1_mbt), path(&dst_mbt)).await?; + let dmp = dump(&mut tar1_cn).await?; + // pretty_assert_eq!(databases.get(&("v2", *target_type)).unwrap(), &dmp); + if &dmp != expected_v2 { + assert_snapshot!(dmp, "v2_applied__{src}@{dif}={dst}__to__{tar}__bad_from_v1"); + } + + let (tar2_mbt, mut tar2_cn) = new_file! {diff_apply, *target_type, METADATA_V2, TILES_V2, "apply__{src}@{dif}={dst}__to__{tar}-v2"}; + apply_diff(path(&tar2_mbt), path(&dst_mbt)).await?; + let dmp = dump(&mut tar2_cn).await?; + if &dmp != expected_v2 { + assert_snapshot!(dmp, "v2_applied__{src}@{dif}={dst}__to__{tar}__bad_from_v2"); } } Ok(()) } +#[actix_rt::test] +#[ignore] +async fn test_one() { + let src_type = Flat; + let dif_type = FlatWithHash; + let dst_type = Some(Normalized); + let db = databases(); + diff_apply(src_type, dif_type, dst_type, &db).await.unwrap(); +} + #[derive(Debug, sqlx::FromRow, Serialize, PartialEq)] struct SqliteEntry { pub r#type: Option, diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-flat.snap similarity index 73% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-flat.snap index abb10b4e3..8df42b593 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-flat.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -27,9 +27,10 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v1) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-hash.snap similarity index 70% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-hash.snap index 00a882de2..6d3114833 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -28,9 +28,10 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 6, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-norm.snap similarity index 76% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-norm.snap index 0e9a93a1b..3a2a4b192 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__flat-norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,9 +10,9 @@ CREATE TABLE images ( tile_id text NOT NULL PRIMARY KEY, tile_data blob)''' values = [ - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', + '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', + '( "EFC416C7C53A81E7363BE6C1A389131A", blob(one-keep-one-remove) )', + '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', ] [[]] @@ -26,9 +26,10 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 6, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] @@ -39,7 +40,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-flat.snap similarity index 73% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-flat.snap index abb10b4e3..8df42b593 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__norm-flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-flat.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -27,9 +27,10 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v1) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-hash.snap similarity index 70% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-hash.snap index 00a882de2..6d3114833 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -28,9 +28,10 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 6, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-norm.snap similarity index 76% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-norm.snap index 0e9a93a1b..3a2a4b192 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__flat-norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__hash-norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,9 +10,9 @@ CREATE TABLE images ( tile_id text NOT NULL PRIMARY KEY, tile_data blob)''' values = [ - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', + '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', + '( "EFC416C7C53A81E7363BE6C1A389131A", blob(one-keep-one-remove) )', + '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', ] [[]] @@ -26,9 +26,10 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 6, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] @@ -39,7 +40,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-flat.snap similarity index 73% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-flat.snap index abb10b4e3..8df42b593 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-flat.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -27,9 +27,10 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v1) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-hash.snap similarity index 70% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-hash.snap index 00a882de2..6d3114833 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -28,9 +28,10 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 6, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-norm.snap similarity index 76% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-norm.snap index 0e9a93a1b..3a2a4b192 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert-z2__hash-norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__convert@v1_z2__norm-norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,9 +10,9 @@ CREATE TABLE images ( tile_id text NOT NULL PRIMARY KEY, tile_data blob)''' values = [ - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', + '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', + '( "EFC416C7C53A81E7363BE6C1A389131A", blob(one-keep-one-remove) )', + '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', ] [[]] @@ -26,9 +26,10 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 6, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] @@ -39,7 +40,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3EF965216C312B07314DB600E06EBCFE" )', + '( "agg_tiles_hash", "164703193C381226B1795E67C77CE35C" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__flat.snap similarity index 66% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__flat.snap index b57b97cbb..978c3ca08 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__flat.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', + '( "agg_tiles_hash", "1A058756F91D3E8EBA585E54601B1B12" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -27,12 +27,13 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v1) )', - '( 1, 1, 1, blob(remove) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v1) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v1) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__hash.snap similarity index 61% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__hash.snap index 44652f776..ab7d52802 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', + '( "agg_tiles_hash", "1A058756F91D3E8EBA585E54601B1B12" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -28,12 +28,13 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 5, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', + '( 5, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 5, 1, 1, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', + '( 6, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__norm.snap similarity index 75% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__norm.snap index 45baf03b7..740642e1c 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_cp__norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -12,9 +12,7 @@ CREATE TABLE images ( values = [ '( "0F6969D7052DA9261E31DDB6E88C136E", blob(remove) )', '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', + '( "EFC416C7C53A81E7363BE6C1A389131A", blob(one-keep-one-remove) )', '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', ] @@ -29,12 +27,13 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 5, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', + '( 5, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 5, 1, 1, "0F6969D7052DA9261E31DDB6E88C136E" )', + '( 6, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] @@ -45,7 +44,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', + '( "agg_tiles_hash", "1A058756F91D3E8EBA585E54601B1B12" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__flat.snap similarity index 70% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__flat.snap index 0f09c8afb..0628e8fa6 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__flat.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -26,12 +26,13 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v1) )', - '( 1, 1, 1, blob(remove) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v1) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v1) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__hash.snap similarity index 64% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__hash.snap index 44652f776..36956f8ce 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,6 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', '( "md-edit", "value - v1" )', '( "md-remove", "value - remove" )', '( "md-same", "value - same" )', @@ -28,12 +27,13 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 5, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', + '( 5, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 5, 1, 1, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', + '( 6, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, blob(one-keep-one-remove), "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__norm.snap similarity index 77% rename from martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__norm.snap index 16cdb5ccc..2eb958810 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__copy@v1_orig__norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -12,9 +12,7 @@ CREATE TABLE images ( values = [ '( "0F6969D7052DA9261E31DDB6E88C136E", blob(remove) )', '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', + '( "EFC416C7C53A81E7363BE6C1A389131A", blob(one-keep-one-remove) )', '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', ] @@ -29,12 +27,13 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', + '( 5, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', + '( 5, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 5, 1, 1, "0F6969D7052DA9261E31DDB6E88C136E" )', + '( 6, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', + '( 6, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', + '( 6, 1, 4, "EFC416C7C53A81E7363BE6C1A389131A" )', + '( 6, 1, 5, "EFC416C7C53A81E7363BE6C1A389131A" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-hash.snap deleted file mode 100644 index 44652f776..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-hash.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-norm.snap deleted file mode 100644 index 45baf03b7..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__flat-norm.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "0F6969D7052DA9261E31DDB6E88C136E", blob(remove) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', - '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-flat.snap deleted file mode 100644 index b57b97cbb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__hash-flat.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v1) )', - '( 1, 1, 1, blob(remove) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-flat.snap deleted file mode 100644 index b57b97cbb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-flat.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v1) )', - '( 1, 1, 1, blob(remove) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-norm.snap deleted file mode 100644 index 45baf03b7..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@convert__norm-norm.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "0F6969D7052DA9261E31DDB6E88C136E", blob(remove) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', - '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__hash.snap deleted file mode 100644 index d8f418577..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp-no_agg__hash.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__flat.snap deleted file mode 100644 index b57b97cbb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__flat.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v1) )', - '( 1, 1, 1, blob(remove) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v1) )', - '( 2, 1, 1, blob(z2-remove) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__hash.snap deleted file mode 100644 index 44652f776..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__hash.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v1), "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, blob(remove), "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v1), "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, blob(z2-remove), "625803A8AA8863AD897EA2F3716FB6D7" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__norm.snap deleted file mode 100644 index 45baf03b7..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__copy_and_convert@cp__norm.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "0F6969D7052DA9261E31DDB6E88C136E", blob(remove) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "625803A8AA8863AD897EA2F3716FB6D7", blob(z2-remove) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "EF0200E805A812D1A756F8E6B62BDFD4", blob(z2-edit-v1) )', - '( "EFE0AE5FD114DE99855BC2838BE97E1D", blob(edit-v1) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "EFE0AE5FD114DE99855BC2838BE97E1D" )', - '( 1, 1, 1, "0F6969D7052DA9261E31DDB6E88C136E" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "EF0200E805A812D1A756F8E6B62BDFD4" )', - '( 2, 1, 1, "625803A8AA8863AD897EA2F3716FB6D7" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "8C58185A2425C7F7E0694A40C895ADDF" )', - '( "md-edit", "value - v1" )', - '( "md-remove", "value - remove" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=dflt.snap deleted file mode 100644 index e9cf2caf9..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=dflt.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=flat.snap deleted file mode 100644 index e9cf2caf9..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=flat.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=hash.snap deleted file mode 100644 index e9cf2caf9..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=hash.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=norm.snap deleted file mode 100644 index a05a1adc0..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-hash=norm.snap +++ /dev/null @@ -1,46 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, blob(remove) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, blob(z2-remove) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=dflt.snap deleted file mode 100644 index e9cf2caf9..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=dflt.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=flat.snap deleted file mode 100644 index e9cf2caf9..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=flat.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=hash.snap deleted file mode 100644 index e9cf2caf9..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=hash.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=norm.snap deleted file mode 100644 index a05a1adc0..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-norm=norm.snap +++ /dev/null @@ -1,46 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, blob(remove) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, blob(z2-remove) )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=dflt.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=dflt.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=flat.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=flat.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=hash.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=hash.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=norm.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-flat=norm.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=dflt.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=dflt.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=flat.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=flat.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=hash.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=hash.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=norm.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-hash=norm.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=dflt.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=dflt.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=flat.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=flat.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=hash.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=hash.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=norm.snap deleted file mode 100644 index 5b384e4fb..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__hash-norm=norm.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, blob(same), "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, blob(z2-same), "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=dflt.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=dflt.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=flat.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=flat.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=hash.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=hash.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=norm.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-flat=norm.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=dflt.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=dflt.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=flat.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=flat.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=hash.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=hash.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=norm.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-hash=norm.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=dflt.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=dflt.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=flat.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=flat.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=hash.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=hash.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=norm.snap deleted file mode 100644 index 86fa00d4e..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__norm-norm=norm.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "51037A4A37730F52C8732586D3AAA316", blob(same) )', - '( "6F75FF79F5F1B1B50092156993AAAA70", blob(z2-same) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 0, "51037A4A37730F52C8732586D3AAA316" )', - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 2, 0, 0, "6F75FF79F5F1B1B50092156993AAAA70" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-same", "value - same" )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=dflt.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=dflt.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=flat.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=flat.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=flat.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=flat.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=dflt.snap deleted file mode 100644 index 52db8faf2..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=dflt.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=flat.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=flat.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=hash.snap deleted file mode 100644 index 52db8faf2..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=hash.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=dflt.snap deleted file mode 100644 index 52db8faf2..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=dflt.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=flat.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=flat.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=hash.snap deleted file mode 100644 index 52db8faf2..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=hash.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=flat.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=flat.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=dflt.snap deleted file mode 100644 index 2ca520d9f..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=dflt.snap +++ /dev/null @@ -1,89 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=flat.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=flat.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=hash.snap deleted file mode 100644 index 52db8faf2..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=hash.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=norm.snap deleted file mode 100644 index 2ca520d9f..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-hash=norm.snap +++ /dev/null @@ -1,89 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=dflt.snap deleted file mode 100644 index 2ca520d9f..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=dflt.snap +++ /dev/null @@ -1,89 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=flat.snap deleted file mode 100644 index f02405d19..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=flat.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles' -sql = ''' -CREATE TABLE tiles ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=hash.snap deleted file mode 100644 index 52db8faf2..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=hash.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'table' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE TABLE tiles_with_hash ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_data blob, - tile_hash text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', -] - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'index' -tbl_name = 'tiles_with_hash' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=norm.snap deleted file mode 100644 index 2ca520d9f..000000000 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-norm=norm.snap +++ /dev/null @@ -1,89 +0,0 @@ ---- -source: martin-mbtiles/tests/mbtiles.rs -expression: result ---- -[[]] -type = 'table' -tbl_name = 'images' -sql = ''' -CREATE TABLE images ( - tile_id text NOT NULL PRIMARY KEY, - tile_data blob)''' -values = [ - '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', - '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', -] - -[[]] -type = 'table' -tbl_name = 'map' -sql = ''' -CREATE TABLE map ( - zoom_level integer NOT NULL, - tile_column integer NOT NULL, - tile_row integer NOT NULL, - tile_id text, - PRIMARY KEY(zoom_level, tile_column, tile_row))''' -values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', -] - -[[]] -type = 'table' -tbl_name = 'metadata' -sql = ''' -CREATE TABLE metadata ( - name text NOT NULL PRIMARY KEY, - value text)''' -values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', - '( "md-edit", "value - v2" )', - '( "md-new", "value - new" )', - '( "md-remove", NULL )', -] - -[[]] -type = 'index' -tbl_name = 'images' - -[[]] -type = 'index' -tbl_name = 'map' - -[[]] -type = 'index' -tbl_name = 'metadata' - -[[]] -type = 'view' -tbl_name = 'tiles' -sql = ''' -CREATE VIEW tiles AS - SELECT map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data - FROM map - JOIN images ON images.tile_id = map.tile_id''' - -[[]] -type = 'view' -tbl_name = 'tiles_with_hash' -sql = ''' -CREATE VIEW tiles_with_hash AS - SELECT - map.zoom_level AS zoom_level, - map.tile_column AS tile_column, - map.tile_row AS tile_row, - images.tile_data AS tile_data, - images.tile_id AS tile_hash - FROM map - JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=dflt.snap similarity index 66% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=dflt.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=dflt.snap index f02405d19..ed5c42e2a 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=dflt.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=dflt.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -28,12 +28,12 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=flat.snap similarity index 66% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=flat.snap index f02405d19..ed5c42e2a 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=flat.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -28,12 +28,12 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=hash.snap similarity index 65% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=hash.snap index cc851eeb1..b1fd9ceac 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -29,12 +29,12 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, "" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, "" )', + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, "" )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, "" )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=norm.snap similarity index 76% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=norm.snap index 831daa68a..5830f5517 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-flat=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@flat=norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -11,9 +11,8 @@ CREATE TABLE images ( tile_data blob)''' values = [ '( "", NULL )', + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -28,12 +27,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, "" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, "" )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, "" )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, "" )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -44,8 +43,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=dflt.snap similarity index 66% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=dflt.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=dflt.snap index f02405d19..ed5c42e2a 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=dflt.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=dflt.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -28,12 +28,12 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=flat.snap similarity index 66% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=flat.snap index f02405d19..ed5c42e2a 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=flat.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -28,12 +28,12 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=hash.snap similarity index 64% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=hash.snap index 52db8faf2..75a514f5b 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -29,12 +29,12 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=norm.snap similarity index 75% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=norm.snap index 2ca520d9f..5853a7eab 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-hash=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@hash=norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,9 +10,8 @@ CREATE TABLE images ( tile_id text NOT NULL PRIMARY KEY, tile_data blob)''' values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -27,12 +26,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -43,8 +42,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=dflt.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=dflt.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=flat.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=flat.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=hash.snap similarity index 64% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=hash.snap index 52db8faf2..75a514f5b 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -29,12 +29,12 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, NULL )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, NULL )', + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=norm.snap similarity index 75% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=norm.snap index 2ca520d9f..5853a7eab 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-hash=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__flat@norm=norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,9 +10,8 @@ CREATE TABLE images ( tile_id text NOT NULL PRIMARY KEY, tile_data blob)''' values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -27,12 +26,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -43,8 +42,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=dflt.snap similarity index 65% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=dflt.snap index cc851eeb1..b1fd9ceac 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=dflt.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -29,12 +29,12 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, "" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, "" )', + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, "" )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, "" )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=flat.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=flat.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=hash.snap similarity index 65% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=hash.snap index cc851eeb1..b1fd9ceac 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -29,12 +29,12 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, "" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, "" )', + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, "" )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, "" )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=norm.snap similarity index 76% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=dflt.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=norm.snap index 831daa68a..5830f5517 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=dflt.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@flat=norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -11,9 +11,8 @@ CREATE TABLE images ( tile_data blob)''' values = [ '( "", NULL )', + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -28,12 +27,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, "" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, "" )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, "" )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, "" )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -44,8 +43,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=dflt.snap new file mode 100644 index 000000000..75a514f5b --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=dflt.snap @@ -0,0 +1,53 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE TABLE tiles_with_hash ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + tile_hash text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles_with_hash' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=flat.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=flat.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=hash.snap new file mode 100644 index 000000000..75a514f5b --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=hash.snap @@ -0,0 +1,53 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE TABLE tiles_with_hash ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + tile_hash text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles_with_hash' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=norm.snap similarity index 75% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=norm.snap index 2ca520d9f..5853a7eab 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__flat-norm=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@hash=norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,9 +10,8 @@ CREATE TABLE images ( tile_id text NOT NULL PRIMARY KEY, tile_data blob)''' values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -27,12 +26,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -43,8 +42,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=dflt.snap new file mode 100644 index 000000000..75a514f5b --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=dflt.snap @@ -0,0 +1,53 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE TABLE tiles_with_hash ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + tile_hash text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles_with_hash' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=flat.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=flat.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=hash.snap new file mode 100644 index 000000000..75a514f5b --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=hash.snap @@ -0,0 +1,53 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE TABLE tiles_with_hash ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + tile_hash text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles_with_hash' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=norm.snap similarity index 75% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=norm.snap index 2ca520d9f..5853a7eab 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-norm=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__hash@norm=norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,9 +10,8 @@ CREATE TABLE images ( tile_id text NOT NULL PRIMARY KEY, tile_data blob)''' values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -27,12 +26,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -43,8 +42,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "3ACB8D17AD79F56C7082281A258DBDA7" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=dflt.snap similarity index 76% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=dflt.snap index 831daa68a..5830f5517 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__norm-flat=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=dflt.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -11,9 +11,8 @@ CREATE TABLE images ( tile_data blob)''' values = [ '( "", NULL )', + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -28,12 +27,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, "" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, "" )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, "" )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, "" )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -44,8 +43,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=flat.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=flat.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=hash.snap similarity index 65% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=dflt.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=hash.snap index cc851eeb1..b1fd9ceac 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=dflt.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=hash.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,8 +10,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', @@ -29,12 +29,12 @@ CREATE TABLE tiles_with_hash ( tile_hash text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, NULL, "" )', - '( 2, 0, 1, blob(z2-edit-v2), "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, blob(z2-new), "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, NULL, "" )', + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, "" )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, "" )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=norm.snap similarity index 76% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=norm.snap index 831daa68a..5830f5517 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@delta__hash-flat=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@flat=norm.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -11,9 +11,8 @@ CREATE TABLE images ( tile_data blob)''' values = [ '( "", NULL )', + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', - '( "8FF2EF577CE68CA2A07E6382D8A4C5FF", blob(z2-new) )', - '( "E848A12B5761ED5E713D8286F7460C98", blob(z2-edit-v2) )', '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', ] @@ -28,12 +27,12 @@ CREATE TABLE map ( tile_id text, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 1, "FF76830FF90D79BB335884F256031731" )', - '( 1, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', - '( 1, 1, 1, "" )', - '( 2, 0, 1, "E848A12B5761ED5E713D8286F7460C98" )', - '( 2, 1, 0, "8FF2EF577CE68CA2A07E6382D8A4C5FF" )', - '( 2, 1, 1, "" )', + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, "" )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, "" )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', ] [[]] @@ -44,8 +43,8 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "14B153DD59C83002812530F047000CF1" )', - '( "agg_tiles_hash_after_apply", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-remove", NULL )', diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=dflt.snap new file mode 100644 index 000000000..5853a7eab --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=dflt.snap @@ -0,0 +1,88 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'images' +sql = ''' +CREATE TABLE images ( + tile_id text NOT NULL PRIMARY KEY, + tile_data blob)''' +values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', + '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', + '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', +] + +[[]] +type = 'table' +tbl_name = 'map' +sql = ''' +CREATE TABLE map ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_id text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'index' +tbl_name = 'images' + +[[]] +type = 'index' +tbl_name = 'map' + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data + FROM map + JOIN images ON images.tile_id = map.tile_id''' + +[[]] +type = 'view' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE VIEW tiles_with_hash AS + SELECT + map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data, + images.tile_id AS tile_hash + FROM map + JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=flat.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=flat.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=hash.snap new file mode 100644 index 000000000..75a514f5b --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=hash.snap @@ -0,0 +1,53 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE TABLE tiles_with_hash ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + tile_hash text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles_with_hash' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=norm.snap new file mode 100644 index 000000000..5853a7eab --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@hash=norm.snap @@ -0,0 +1,88 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'images' +sql = ''' +CREATE TABLE images ( + tile_id text NOT NULL PRIMARY KEY, + tile_data blob)''' +values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', + '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', + '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', +] + +[[]] +type = 'table' +tbl_name = 'map' +sql = ''' +CREATE TABLE map ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_id text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'index' +tbl_name = 'images' + +[[]] +type = 'index' +tbl_name = 'map' + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data + FROM map + JOIN images ON images.tile_id = map.tile_id''' + +[[]] +type = 'view' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE VIEW tiles_with_hash AS + SELECT + map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data, + images.tile_id AS tile_hash + FROM map + JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=dflt.snap new file mode 100644 index 000000000..5853a7eab --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=dflt.snap @@ -0,0 +1,88 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'images' +sql = ''' +CREATE TABLE images ( + tile_id text NOT NULL PRIMARY KEY, + tile_data blob)''' +values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', + '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', + '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', +] + +[[]] +type = 'table' +tbl_name = 'map' +sql = ''' +CREATE TABLE map ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_id text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'index' +tbl_name = 'images' + +[[]] +type = 'index' +tbl_name = 'map' + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data + FROM map + JOIN images ON images.tile_id = map.tile_id''' + +[[]] +type = 'view' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE VIEW tiles_with_hash AS + SELECT + map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data, + images.tile_id AS tile_hash + FROM map + JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=flat.snap new file mode 100644 index 000000000..ed5c42e2a --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=flat.snap @@ -0,0 +1,45 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=hash.snap new file mode 100644 index 000000000..75a514f5b --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=hash.snap @@ -0,0 +1,53 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "397DFD1A5FC67717672ECAB8375B20B3" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'table' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE TABLE tiles_with_hash ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + tile_hash text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, blob(edit-v2), "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL, NULL )', + '( 6, 0, 1, blob(edit-v2a), "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL, NULL )', + '( 6, 1, 6, blob(new), "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles_with_hash' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT zoom_level, tile_column, tile_row, tile_data FROM tiles_with_hash''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=norm.snap new file mode 100644 index 000000000..5853a7eab --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@delta__norm@norm=norm.snap @@ -0,0 +1,88 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'images' +sql = ''' +CREATE TABLE images ( + tile_id text NOT NULL PRIMARY KEY, + tile_data blob)''' +values = [ + '( "03132BFACDB00CC63D6B7DD98D974DD5", blob(edit-v2a) )', + '( "22AF645D1859CB5CA6DA0C484F1F37EA", blob(new) )', + '( "FF76830FF90D79BB335884F256031731", blob(edit-v2) )', +] + +[[]] +type = 'table' +tbl_name = 'map' +sql = ''' +CREATE TABLE map ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_id text, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 1, "FF76830FF90D79BB335884F256031731" )', + '( 5, 1, 0, "22AF645D1859CB5CA6DA0C484F1F37EA" )', + '( 5, 1, 1, NULL )', + '( 6, 0, 1, "03132BFACDB00CC63D6B7DD98D974DD5" )', + '( 6, 1, 5, NULL )', + '( 6, 1, 6, "22AF645D1859CB5CA6DA0C484F1F37EA" )', +] + +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "98FDF05532762EEECB59C141290E6E09" )', + '( "agg_tiles_hash_after_apply", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-remove", NULL )', +] + +[[]] +type = 'index' +tbl_name = 'images' + +[[]] +type = 'index' +tbl_name = 'map' + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'view' +tbl_name = 'tiles' +sql = ''' +CREATE VIEW tiles AS + SELECT map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data + FROM map + JOIN images ON images.tile_id = map.tile_id''' + +[[]] +type = 'view' +tbl_name = 'tiles_with_hash' +sql = ''' +CREATE VIEW tiles_with_hash AS + SELECT + map.zoom_level AS zoom_level, + map.tile_column AS tile_column, + map.tile_row AS tile_row, + images.tile_data AS tile_data, + images.tile_id AS tile_hash + FROM map + JOIN images ON images.tile_id = map.tile_id''' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=dflt.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__flat@hash=norm__to__flat__bad_from_v1.snap similarity index 62% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=dflt.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__flat@hash=norm__to__flat__bad_from_v1.snap index e9cf2caf9..6a48667f0 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=dflt.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__flat@hash=norm__to__flat__bad_from_v1.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-same", "value - same" )', @@ -27,12 +27,15 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=flat.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__flat@norm=norm__to__flat__bad_from_v1.snap similarity index 62% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=flat.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__flat@norm=norm__to__flat__bad_from_v1.snap index e9cf2caf9..6a48667f0 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=flat.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__flat@norm=norm__to__flat__bad_from_v1.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-same", "value - same" )', @@ -27,12 +27,15 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=hash.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__hash@hash=norm__to__flat__bad_from_v1.snap similarity index 62% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=hash.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__hash@hash=norm__to__flat__bad_from_v1.snap index e9cf2caf9..6a48667f0 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=hash.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__hash@hash=norm__to__flat__bad_from_v1.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-same", "value - same" )', @@ -27,12 +27,15 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=norm.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__hash@norm=norm__to__flat__bad_from_v1.snap similarity index 62% rename from martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=norm.snap rename to martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__hash@norm=norm__to__flat__bad_from_v1.snap index e9cf2caf9..6a48667f0 100644 --- a/martin-mbtiles/tests/snapshots/mbtiles__diff_and_apply@applied__flat-flat=norm.snap +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__hash@norm=norm__to__flat__bad_from_v1.snap @@ -1,6 +1,6 @@ --- source: martin-mbtiles/tests/mbtiles.rs -expression: result +expression: actual_value --- [[]] type = 'table' @@ -10,7 +10,7 @@ CREATE TABLE metadata ( name text NOT NULL PRIMARY KEY, value text)''' values = [ - '( "agg_tiles_hash", "E3919F24AF46757C7B060150071FB0D9" )', + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', '( "md-edit", "value - v2" )', '( "md-new", "value - new" )', '( "md-same", "value - same" )', @@ -27,12 +27,15 @@ CREATE TABLE tiles ( tile_data blob, PRIMARY KEY(zoom_level, tile_column, tile_row))''' values = [ - '( 1, 0, 0, blob(same) )', - '( 1, 0, 1, blob(edit-v2) )', - '( 1, 1, 0, blob(new) )', - '( 2, 0, 0, blob(z2-same) )', - '( 2, 0, 1, blob(z2-edit-v2) )', - '( 2, 1, 0, blob(z2-new) )', + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', ] [[]] diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=dflt__to__flat__bad_from_v1.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=dflt__to__flat__bad_from_v1.snap new file mode 100644 index 000000000..6a48667f0 --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=dflt__to__flat__bad_from_v1.snap @@ -0,0 +1,47 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-same", "value - same" )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=norm__to__flat__bad_from_v1.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=norm__to__flat__bad_from_v1.snap new file mode 100644 index 000000000..6a48667f0 --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@hash=norm__to__flat__bad_from_v1.snap @@ -0,0 +1,47 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-same", "value - same" )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=dflt__to__flat__bad_from_v1.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=dflt__to__flat__bad_from_v1.snap new file mode 100644 index 000000000..6a48667f0 --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=dflt__to__flat__bad_from_v1.snap @@ -0,0 +1,47 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-same", "value - same" )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles' diff --git a/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=norm__to__flat__bad_from_v1.snap b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=norm__to__flat__bad_from_v1.snap new file mode 100644 index 000000000..6a48667f0 --- /dev/null +++ b/martin-mbtiles/tests/snapshots/mbtiles__diff_apply@v2_applied__norm@norm=norm__to__flat__bad_from_v1.snap @@ -0,0 +1,47 @@ +--- +source: martin-mbtiles/tests/mbtiles.rs +expression: actual_value +--- +[[]] +type = 'table' +tbl_name = 'metadata' +sql = ''' +CREATE TABLE metadata ( + name text NOT NULL PRIMARY KEY, + value text)''' +values = [ + '( "agg_tiles_hash", "5364C57282B73C341D5D801B8F7675C4" )', + '( "md-edit", "value - v2" )', + '( "md-new", "value - new" )', + '( "md-same", "value - same" )', +] + +[[]] +type = 'table' +tbl_name = 'tiles' +sql = ''' +CREATE TABLE tiles ( + zoom_level integer NOT NULL, + tile_column integer NOT NULL, + tile_row integer NOT NULL, + tile_data blob, + PRIMARY KEY(zoom_level, tile_column, tile_row))''' +values = [ + '( 5, 0, 0, blob(same) )', + '( 5, 0, 1, blob(edit-v2) )', + '( 5, 1, 0, blob(new) )', + '( 5, 1, 1, blob(remove) )', + '( 6, 0, 0, blob(same) )', + '( 6, 0, 1, blob(edit-v2a) )', + '( 6, 1, 4, blob(one-keep-one-remove) )', + '( 6, 1, 5, blob(one-keep-one-remove) )', + '( 6, 1, 6, blob(new) )', +] + +[[]] +type = 'index' +tbl_name = 'metadata' + +[[]] +type = 'index' +tbl_name = 'tiles'