Open FraMecca opened 7 years ago
Sorry, can you elaborate on where you would like to have a length property ?
I'd like to have a lenght on ResultEntities instances that could be useful for tests and other conditions. At the current state it is only possible to know if the range is empty or not.
You mean a length property that returns the total number of Rows
in a ResultRange
, right?
There's no API to do that in SQLite: the rows are just stepped over until there is none.
You should use SQL for this (or maybe use the deprecated not-recommended sqlite_get_table
function).
This can be simulated by using: SELECT count(*) FROM...
which gives you the length of the result set. SQLite is pretty quick so the costs are not to high.
It is useful for test, currently WalkLength pops elements