lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


----- Original Message -----
From: Petite Abeille
Date: 2/3/2010 11:13 AM
On Feb 3, 2010, at 4:36 PM, Joshua Jensen wrote
I've always found it bothersome that LuaSQL doesn't support prepared statements.  That has forced me to find alternatives.
True, but even without proper prepared statements support, you can get by with LuaSQL binding for 'escape':

Each argument is transparently escaped using the appropriate 'escape' function provided by the connection:
Sure, but I deal in lots of binary data. While I don't understand the network protocols of the databases I use, there is a much better chance my binary data bound to the prepared statement is going to be handled in a much more optimal way than escaping the binary and compiling/sending it that way.

Plus, with prepared statements, you don't have to deal with escaping anything. It's a double win... ease of use and performance.

Josh