-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to copy to existing mbtiles files #778
Add ability to copy to existing mbtiles files #778
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor feedbacks, will review more later
8c7670d
to
b3a2cce
Compare
b3a2cce
to
6ed3195
Compare
martin-mbtiles/src/mbtiles.rs
Outdated
}; | ||
|
||
let mut unique_idx_cols = HashSet::new(); | ||
let query_string = format!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently this can actually be done in a "safer" way (the whole point of sqlx as oppose to calling sqlite directly) - https://docs.rs/sqlx-conditional-queries/0.1.3/sqlx_conditional_queries/macro.conditional_query_as.html
Should we try to use that approach? Could be a separate PR though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conditional_query_as!
macro seems to use the query_as!
macro. This query is a PRAGMA
query which doesn't work with sqlx macros.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor fix, and should be good to go :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thank you!!!
* Allow the `dst` in `mbtiles copy <src> <dst>` command to already contain data, merging tilesets * Add `mbtiles copy --on-duplicate (override|ignore|abort)` --------- Co-authored-by: rstanciu <[email protected]> Co-authored-by: Yuri Astrakhan <[email protected]>
dst
inmbtiles copy <src> <dst>
command to already contain data, merging tilesetsmbtiles copy --on-duplicate (override|ignore|abort)