File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ auto con = db.connection();
3737auto stmt = con.statement("select * from table");
3838auto rows = stmt.query.rows;
3939foreach (row; rows) {
40- for(size_t col = 0; col != row.columns ; ++col) write(rowr [col]) , " ");
40+ for(size_t col = 0; col != row.width ; ++col) write(row [col], " ");
4141 writeln();
4242}
4343
Original file line number Diff line number Diff line change @@ -268,6 +268,7 @@ struct BasicStatement(D,P) {
268268
269269 auto into (A... ) (ref A args) {
270270 if (state != State.Executed) throw new DatabaseException (" not executed" );
271+ rows.into(args);
271272 return this ;
272273 }
273274
@@ -438,7 +439,6 @@ struct BasicRowSet(D,P) {
438439
439440 auto into (A... ) (ref A args) {
440441 if (! result_.rowsFetched()) throw new DatabaseException (" no data" );
441-
442442 auto row = front();
443443 foreach (i, ref a; args) {
444444 alias T = A[i];
@@ -480,7 +480,7 @@ struct BasicRowSet(D,P) {
480480 }
481481
482482
483- bool empty () {return result_.rowsFetched_ ! = 0 ;}
483+ bool empty () {return result_.rowsFetched_ = = 0 ;}
484484 auto front () {return Row(this );}
485485 void popFront () {result_.next();}
486486}
You can’t perform that action at this time.
0 commit comments