
fbclient - issue #1
fbclient.wrapper.dsql_prepare optionally return tables, but fbclient.class expect them
Some methods from the OO interface expect that a statement, after prepared by tr:prepare(), to have "params" and "columns" fields. However, api.dsql_prepare only returns a table for in_t or out_t when there are actually need for them (i.e.: the query has params and result columns, respectively), thus breaking functions like st:setparams() called by st:exec().
I propose to either a) always return tables, regardless whether there is need for them or not, or b) check before use if they are set or not <if self.params then for i, c in ipairs(self.params) do..>
I'm using fbclient 0.4.0-1 from LuaRocks on a MacOS X
Comment #1
Posted on Jul 28, 2010 by Happy Hippohey, issue #1 :)
...actually I was preparing to commit v0.5 for a long time, which solves many issues from the todo list, including this bug. I just kept postponing it since I got no feedback from anyone. I'll try to finish it one of these days and will upload it. Thanks for the report.
Comment #2
Posted on Oct 12, 2010 by Happy Hippofixed in repository for 0.5
Status: Fixed
Labels:
Type-Defect
Priority-Medium