[Dbix-class] Adding comments to generated queries

Bill Moseley moseley at hank.org
Wed May 30 11:03:52 GMT 2012


This 37signals posting got passed around the office lately about adding
comments to SQL to make it easy to find where the query comes from in a
Rails app.

http://37signals.com/svn/posts/3130-mini-tech-note-mysql-query-comments-in-=
rails

Of course, with DBIC it's a bit more difficult to define "where" a query
comes from since it can get built in parts and doesn't get executed until
it's used.  Plus, we already have code that reports on "slow" queries (or
excessive queries) in a given web request.

Still, Is there any existing module that would do something like this this?
  I'm not sure what it would put in outside of a stack trace.

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120530/45f=
8506c/attachment.htm


More information about the DBIx-Class mailing list