lua-users home
lua-l archive

Re: SQL syntax in Lua?

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


On Mar 08, 2006, at 17:32, Lisa Parratt wrote:
PA wrote:
And( Where( 'id', '>', 0 ), Where( 'id', '<', 10 ) )
I'd prefer the Scheme version ;) It's all getting a little... baroque :/
Fair enough :)
So how would you express the following SQL statement using regular Lua syntax?
"where id > 0 and id < 10"
Perhaps something like what KirbyBase does in Ruby:
result_set = plane_tbl.select { |r| r.country == 'USA' and r.speed > 350 }
http://www.netpromi.com/files/kirbybaserubymanual.html#select-method
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/

AltStyle によって変換されたページ (->オリジナル) /