sqlboiler
sqlboiler copied to clipboard
Support sqlcommenter comments
https://google.github.io/sqlcommenter/ makes it possible to add tracing comments that can be interpreted by e.g. GCPs query analyser.
https://github.com/volatiletech/sqlboiler/pull/872 added support for comments but they are prepended on a separate line and sqlcommenter requires the form /* … */ to be added on the same line as the query which is why I’ve added this PR and the qm.AppendComment function.
For example:
q := shop.Customers(
qm.AppendComment("shop.getAllCustomers"),
qm.Select("id", "name"),
qm.From("customers"),
)
will be:
SELECT id, name FROM customers; /* shop.getAllCustomers /*
You show this: qm.AppendComment("shop.getAllCustomers")
but I can't find that function in the PR?