mysql-native: preview2

Suliman via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu Feb 2 22:16:19 PST 2017


On Thursday, 2 February 2017 at 22:59:38 UTC, Nick Sabalausky 
wrote:
> 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.

But how by looking at docs I can understand what data can be 
iterable, and what do not?


More information about the Digitalmars-d-announce mailing list