D Language DSTDDB Library using SQLite will be less of a first line problem

Source: Internet
Author: User
Tags sqlite

When using DSTDDB to manipulate SQLite databases, routines:

 import std.database.front;import std.database.sqlite.database;auto url  = Span style= "COLOR: #800000" > " path://./core.sdb   " ;auto db  = new  database!defaultpolicy (URL); auto conn  = db.connection (); auto data  = Conn.query ( " select * from cfg  "   = data.rows;  foreach   (r; rows) {auto tmp  = R[0 ].as ! string     ; WRITELN (TMP);}  

The first row of data is missing in the Data.rows row because query queries the first row of data when querying for rows, while the Result.fetch function fetches the data, because the first row is removed, the first row of data is lost, and a simple modification can be added to the query function into one line of Sqlite3_reset (ST). Such as:

D Language DSTDDB Library using SQLite will be less of a first line problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.