jdaugherty commented on PR #16631:
URL: https://github.com/apache/grails-core/pull/16631#issuecomment-6372943846
sql-tail now covers the other two stores GORM runs statements on, in
9f418b2417:
- **Neo4j.** A `SqlTailDriver` wraps the driver each connection source
builds, so every session, transaction and transaction function records its
Cypher before it runs; parameters are never recorded. Cypher gets a syntax of
its own, `SqlTailSyntax.CYPHER`, verified against Neo4j 5 in a container and
the embedded 3.5 the tests run on. The two versions differ on two points and
the syntax takes neither side: whether a `//` comment ends at a carriage return
is read both ways, and a backslash outside a string or comment, which Neo4j 5
decodes into a quote before parsing, withholds the statement.
- **MongoDB.** A `SqlTailCommandListener` on each client records a command
as its name, namespace and entries with every value replaced, e.g. `find
shop.book {"filter": {"title": ?}, "limit": ?}`. Since a command is a document,
the only place data can hide is a key, so below the top level a key is kept
only where the mapping knows it as a field, resolved through embedded entities;
the keys of a map property, a dynamic attribute or an unmapped collection are
recorded as `?` too. The connection source owns the capture, so a client
stopped for a CRaC checkpoint keeps recording after the restore.
- **Command.** Cypher is typed by the clauses that write in it, Mongo
commands by their name, and both are shown whole. Guide and reference updated.
Each store has an integration spec against a real server (embedded Neo4j, a
mongod) covering values, multiple and runtime-added connection sources, and
capture lifecycle, plus a table-driven spec for the Mongo redactor; the Cypher
rows joined the redactor spec.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]