# ActiveRecord - INSERT options for MySQL

**URL:** <https://www.ruby-forum.com/t/activerecord-insert-options-for-mysql/135706>\
**Category:** Rails\
**Created:** [April 24, 2008, 11:38am UTC](https://www.ruby-forum.com/t/activerecord-insert-options-for-mysql/135706 "2008-04-24T11:38:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_H.on](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@James\_H.on](https://www.ruby-forum.com/u/James_H.on)\
**Post date:** [April 24, 2008, 11:38am UTC](https://www.ruby-forum.com/t/activerecord-insert-options-for-mysql/135706/1 "2008-04-24T11:38:03Z")

</div>

Hi,

Excuse any mistakes I make in advance- this is my first post to the  
RoR list, and it’s going right in at the deep end…

I’ve been working with Rails for quite a bit now (8ish months or so)  
and I’ve worked on two projects where there are several points in  
which access to INSERT statement options would be extremely useful.  
I’m using MySQL, where there is scope for the INSERT DELAYED syntax,  
and I’ve been trying to work out how to write a patch to add the  
functionality to the MySQL ActiveRecord library for a new method-  
create\_delayed().

I am asking for advice on how best to write the method and integrate  
it. I don’t think passing an option in the same way as :includes is  
really the optimal solution as INSERT DELAYED does not return an ID  
value as .create or .new/.save does, and so to keep this assumption  
correct, so this will probably end up as a new .create\_delayed method  
for models.

How would I best go about implementing this? Will I need to create a  
method in AR base to forward the call to the MySQL adapter class?
