mysql-native: preview2

Nick Sabalausky via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Feb 2 14:59:38 PST 2017


On 02/02/2017 09:46 AM, Suliman wrote:
> Could you explain real case if rangification of ResultSet
>
> http://semitwist.com/mysql-native-docs/v0.2.0-preview1/mysql/result/ResultSet.html
>
>
> Does it's mean that I can write
> foreach(x;result.empty) ? Or how to use it?

.empty just checks whether the range is empty, it returns true/false. 
You can't iterate over that. But yes, you can iterate over the ResultSet 
itself. Of course, ResultSet is random-access, so you can also index it 
like an array: "resultset[0]" returns the first row.


More information about the Digitalmars-d-announce mailing list