Conversation
The Node and Java agents record MongoDB collection operations as
sql_query events with database_type "mongodb". Their "sql" is a
statement whose argument values are already replaced with placeholders:
db.users.updateOne({"_id": ?}, {"$set": {"name": ?}, "$inc": {"n": ?}})
normalizeSQL had no case for that database type, so the fallback
obfuscation applied. It treats the quoted keys as string literals and a
pair of $operators as a dollar-quoted string, which turned the statement
above into `db.users.updateOne({?: ?}, {?: {?: ?}, ?: {?: ?}})` in the
sqlNormalized index and in change reports. Return the statement as it is
for that database type.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LntddoBsqjRDRBepBx7oLZ
This was referenced Sep 17, 2026
evlawler
marked this pull request as ready for review
September 17, 2026 16:16
Contributor
Author
|
Closing. This change only existed to let MongoDB statements pass through Generated by Claude Code |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The Node and Java agents are gaining
sql_queryevents for MongoDB operations, withdatabase_type: "mongodb"and a statement whose argument values are already placeholders:normalizeSQLhas no case for that database type, so the fallback obfuscation applies. It treats the quoted keys as string literals and a pair of$operatorsas a dollar-quoted string, and the statement above becomesdb.users.updateOne({?: ?}, {?: {?: ?}, ?: {?: ?}})in thesqlNormalizedindex, in the sequence diagram digest (throughabstractSqlAstJSON, which falls back tonormalizeSQLwhen the parser fails) and in change reports.Fix. Return the statement unchanged for
mongodb.analyzeSQLstill returns null for it, so no tables are reported, which is the existing behavior for anything the SQL parser cannot read.Test.
sql.normalize.spec.jscovers a known dialect, the fallback, and MongoDB statements passing through untouched.Companion changes: getappmap/appmap-node#239 and getappmap/appmap-java#330 emit the events.
Written by Claude in a Claude Code session for Elizabeth Lawler. The commit carries Claude as author.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LntddoBsqjRDRBepBx7oLZ