-
Notifications
You must be signed in to change notification settings - Fork 19
Add JGD2011 vertical compound CRS to srs.sql #754
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
Open
NEKOYASAN
wants to merge
2
commits into
main
Choose a base branch
from
fix/crs_6697-unsupported-gpkg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+38
−25
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| use assert_cmd::cargo::cargo_bin_cmd; | ||
|
|
||
| #[test] | ||
| fn test_run_cmd() { | ||
| let mut cmd = cargo_bin_cmd!("nusamai"); | ||
| let assert = cmd | ||
| .arg("../nusamai-plateau/tests/data/sendai-shi/udx/urf/574026_urf_6668_huchi_op.gml") | ||
| .arg("--sink") | ||
| .arg("noop") | ||
| .arg("--output") | ||
| .arg("dummy") | ||
| .arg("--rules") | ||
| .arg("./tests/rules.json") | ||
| .arg("--schema") | ||
| .arg("schema.json") | ||
| .assert(); | ||
| assert.success(); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Bug:
sqlx::query()executes only the first statement fromsrs.sql, preventing subsequentINSERTs, including new CRS entries, from being applied.Severity: CRITICAL | Confidence: 1.00
🔍 Detailed Analysis
The
srs.sqlfile contains multipleINSERTstatements, butsqlx::query()is used to execute it.sqlx::query()is designed to execute only a single SQL statement. As a result, only the firstINSERTstatement will be executed, and subsequent statements, including the new JGD2011 entry (SRID 6697) and other existing CRS definitions, will not be inserted into thegpkg_spatial_ref_systable. The database initialization will appear to succeed without error, but the new CRS will be unavailable for use.💡 Suggested Fix
Use
sqlx::raw_sql()for the multi-statement script, or splitsrs.sqlinto individual statements and execute them within a transaction, or use separateexecute()calls for each statement.🤖 Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.