# ActiveRecord & SQLite3 Blobs

**URL:** <https://www.ruby-forum.com/t/activerecord-sqlite3-blobs/136897>\
**Category:** Rails\
**Created:** [May 7, 2008, 7:15am UTC](https://www.ruby-forum.com/t/activerecord-sqlite3-blobs/136897 "2008-05-07T07:15:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ed8c4c/32.png) [@jay](https://www.ruby-forum.com/u/jay)\
**Post date:** [May 7, 2008, 7:15am UTC](https://www.ruby-forum.com/t/activerecord-sqlite3-blobs/136897/1 "2008-05-07T07:15:50Z")

</div>

There is a problem with blobs in ActiveRecord when you’re using  
sqlite3: sql length limits. Sqlite3 limits the size of the sql  
queries to 1mb. Because AR puts everything into the sql text, you  
can’t insert a blob or a clob that is larger than about a meg.

That sucks.

So I’m trying to fix that, but there’s a problem (obviously, or I  
wouldn’t be here…). The sql is created before it gets to the  
sqlite3 adapter. That means that I would have to parse the sql text  
to pull out the data fields. I would also have to un-escape all that  
data.

Is there something I’ve missed? Some way to override the behavior of  
create and update w/o changing the relationship between  
ActiveRecord::Base and the connection adapter?
