Add tag to db_insert? I want to do some debugging with a db_insert query. I tried to use the addTag() method, but I got an error:

$query = db_insert('nodes') -&gt;addTag('my query');

PHP Fatal error:  Call to undefined method InsertQuery_mysql::addTag()


Is there a way I can tag this query or otherwise make it available to hook_query_alter?

Edit This query is not giving me the expected results, and I want to know why. To see why, I need to see the query with its values. Looking in the documentation for InsertQuery_mysql, it appears there's no getArguments() method. 

Is there any way to see the values that are being inserted?
There are the children classes of Query:


class DeleteQuery implements QueryConditionInterface
class InsertQuery
class MergeQuery implements QueryConditionInterface
class SelectQuery implements SelectQueryInterface
class TruncateQuery
class UpdateQuery implements QueryConditionInterface


Only SelectQuery implements addTag method. However, if you realyl are creating query object just there, you wouldn't need a tag anyway. Tags are only useful for hook_query_alter, and you shouldn't need to alter query you just created.



Your best options, as far as I know them, are:


Enable query log in your database
Devel module with it's query display