Use a database specific function in dbtng (e.g. uuid in db_insert) I have a table that contains a char(36) field for a uuid. It seems like I can insert data into that field with a mysql query like: INSERT INTO mytable (uid, event_guid) VALUES (1, uuid());. I'd like to make a query like that in DBTNG syntax, but I believe I will just insert the string "uuid()" into the column.

db_insert('mytable')
  -&gt;fields(array('uid' =&gt; $uid, 'event_guid' =&gt; 'uuid()'))
  -&gt;execute();


So...do I just use db_query? Is there some magic in dbtng to handle this?
Here's what I ultimately did:

db_query("INSERT INTO {mytable} (uid, event_guid) VALUES (:uid, uuid())",
array(':uid' =&gt; $uid));


And that works to use the mysql uuid() function in an insert.

I've created an issue to add this to Drupal 8 http://drupal.org/node/1858188