Hey Lukas,
So I have a basic way to extract tables from the queries our application
uses through some regex in MockDataProvider, but I wanted to try using the
VisitListener to do this instead, as that seems a more extensible way of
implementing this. I was messing around with the Visit Listener, and I had
a few questions on an example I've been running:
This is the original query: insert into "org2"."accounts" ("name") values
('acct4'), ('acct5')
And this is some of the output I've printed:
-----------------------------------------
BEGIN CLAUSE LISTING:
INSERT
INSERT_INSERT_INTO
TABLE
TABLE_REFERENCE
END LISTING
QUERYPART LISTING:
insert into "org2"."accounts" ("name") values ('acct4'), ('acct5')
"org2"."accounts"
"org2"."accounts"
END QUERYPART LISTING
-----------------------------------------
-----------------------------------------
BEGIN CLAUSE LISTING:
INSERT
INSERT_INSERT_INTO
TABLE
TABLE_REFERENCE
END LISTING
QUERYPART LISTING:
insert into "org2"."accounts" ("name") values ('acct4'), ('acct5')
"org2"."accounts"
END QUERYPART LISTING
-----------------------------------------
-----------------------------------------
BEGIN CLAUSE LISTING:
INSERT
INSERT_INSERT_INTO
FIELD
END LISTING
QUERYPART LISTING:
insert into "org2"."accounts" ("name") values ('acct4'), ('acct5')
"name"
"name"
END QUERYPART LISTING
-----------------------------------------
-----------------------------------------
BEGIN CLAUSE LISTING:
INSERT
INSERT_INSERT_INTO
FIELD
END LISTING
QUERYPART LISTING:
insert into "org2"."accounts" ("name") values ('acct4'), ('acct5')
"name"
END QUERYPART LISTING
-----------------------------------------
The first listing is the result of VisitContext.clauses(), and the second
is the result of VisitContext.queryParts(). This isn't all of the output;
just the first few iterations. Can you give me a general overview of what's
happening here? I'm really not understanding.
Thank you!
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.