Skip to content

SlideShareInc/sql_tagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql_tagger

Build Status

sql_tagger is a gem that inserts comments into SQL queries. These comments include a string from Kernel#caller that (hopefully) reveals what Ruby code was responsible for performing the query.

To use this, just require the appropriate file. For example, to use this with the mysql2 gem, write require 'sql_tagger/mysql2' instead of require 'mysql2'.

Before:

SELECT 1

After:

/* program.rb:25:in `some_method' */ SELECT 1