[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaSQL and binary data
- From: Scott Morgan <blumf@...>
- Date: Thu, 30 Oct 2008 15:38:57 +0000
Greg Hill wrote:
I'm using LuaSQL with a sqlite3 database. I would like to store binary data in
the database or at least some data with singles quotes. Can someone point me to
an example of how to do this?
Use the connection's 'escape' method to deal with single quotes and any
other DB specific problem chars in a string:
safe_str = con:escape("can't")
Binary data itself is rather awkward and not something LuaSQL
specifically handles in it's current state. The queries are passed as
strings, so embedded zeros can cause problems when handling BLOBs.