Why map return [] ?
Suliman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Apr 14 11:35:39 PDT 2017
On Friday, 14 April 2017 at 15:55:13 UTC, Rene Zwanenburg wrote:
> On Friday, 14 April 2017 at 15:49:00 UTC, Suliman wrote:
>> I found problem! ResultRange should be converted to array
>> before it can be `map`ed
>
> That shouldn't be necessary. Can you post your complete code?
ResultRange MySQLTablesRange = mysqlconnection.query(`SELECT
table_name FROM information_schema.tables;`);
auto x =
MySQLTablesRange.map!(a=>a[0].coerce!string.split("_")[1]);
writeln(x);
output: []
while: MySQLTablesRange.array.map!...
output result
More information about the Digitalmars-d-learn
mailing list