Closed GoogleCodeExporter closed 9 years ago
Thanks for an extensive bug report. Will fix soon.
-- Igor
Original comment by ser...@gmail.com
on 10 Aug 2010 at 9:09
I've attached a diff of my changes. But I'm not sure to handle all cases.
Original comment by olivier....@free.fr
on 16 Aug 2010 at 10:16
Attachments:
There's another method to change in SQLiteStatement: the checkColumn method.
Now, it's possible to retrieve column information when we don't have a row. So
the following code, line 1223, must be removed:
if (!myHasRow)
throw new SQLiteException(WRAPPER_NO_ROW, null);
But as a side effect, columnBlob/Double/Int/... must include this code. I've
created a checkHasRow() method.
New patch attached.
Original comment by olivier....@free.fr
on 16 Aug 2010 at 1:09
Attachments:
It appears that sqlite3_data_count is safer than sqlite3_column_count, because
it always returns the correct value or 0. In some cases sqlite3_column_count
may return incorrect value (an example of that later).
However, for the sake of convenience, I've changed to sqlite3_column_count and
documenting the edge cases.
Original comment by ser...@gmail.com
on 21 Aug 2010 at 10:15
[deleted comment]
I've fixed the column count, applied your patch (thanks) and did some
refactoring. See in revision >= 192.
The case where sqlite3_column_count would return incorrect result is
demonstrated in RegressionIssue13Tests.testUnstableColumnResult -
http://code.google.com/p/sqlite4java/source/browse/trunk/test/com/almworks/sqlit
e4java/RegressionIssue13Tests.java#46
Will be delivered on Monday.
Original comment by ser...@gmail.com
on 21 Aug 2010 at 10:39
Thanks.
I'm not sure the "testUnstableColumnResult" is really a bug. It's more like a
design feature. Maybe you can add a comment columnCount about that.
Original comment by olivier....@free.fr
on 23 Aug 2010 at 12:15
Original comment by ser...@gmail.com
on 23 Aug 2010 at 8:10
Original issue reported on code.google.com by
olivier....@free.fr
on 10 Aug 2010 at 8:35Attachments: