libtabula

Check-in [06939e737d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merged the contents of a FIXME comment into the relevant Wishlist item.
Timelines: family | ancestors | descendants | both | mysql-type-info
Files: files | file ages | folders
SHA1: 06939e737d82a5d15062855bf00ee1faa2d19982
User & Date: tangent 2015-08-14 06:05:58
Context
2015-08-14
06:08
Merged mysql-type-info branch into trunk, now that dtest runs to completion on two major platforms and all FIXME comments are dealt with. check-in: ac763fd4ac user: tangent tags: trunk
06:05
Merged the contents of a FIXME comment into the relevant Wishlist item. Closed-Leaf check-in: 06939e737d user: tangent tags: mysql-type-info
06:01
Comment fix check-in: 69c9023a1a user: tangent tags: mysql-type-info
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Wishlist.md.

137
138
139
140
141
142
143
144
145




146
147
148
149
150
151
152
    less likely to be a problem.

*   Convert from Bakefile to CMake.  See the TODO list in the top-level
    `CMakeLists.txt` file.

*   Database independence:

    -   Row remains implemented in terms of MYSQL_ROW.  Need to do some
        kind of pimpl trick here to push that off into the DBDriver.





    -   Field is entirely MySQL-specific.  Rather than pimpl it,
        consider just ripping it out, along with the only other
        users of it, Result::fetch_field*().  All it does is let the
        library user iterate through a thinly-wrapped version of the
        C API's view of the table schema.  That's basically a form
        of reflection, which isn't really a key use case for libtabula.







|
|
>
>
>
>







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
    less likely to be a problem.

*   Convert from Bakefile to CMake.  See the TODO list in the top-level
    `CMakeLists.txt` file.

*   Database independence:

    -   `Row` remains implemented in terms of `MYSQL_ROW`.  Need to
	    create a `[MySQL]RowImpl` class hierarchy and pass instances
	    of them via the pimpl idiom to `Row` instead of `MYSQL_ROW`.
	    An easy case is `MySQLDriver::fetch_row()`, part of the
	    low-level implementation of "use" queries, but the real
	    trick is doing it for "store" queries.

    -   Field is entirely MySQL-specific.  Rather than pimpl it,
        consider just ripping it out, along with the only other
        users of it, Result::fetch_field*().  All it does is let the
        library user iterate through a thinly-wrapped version of the
        C API's view of the table schema.  That's basically a form
        of reflection, which isn't really a key use case for libtabula.

Changes to src/mysql/driver.h.

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212

	/// \brief Returns the next DB row from the given result set.
	///
	/// Wraps \c mysql_fetch_row() in MySQL C API.
	Row fetch_row(ResultBase& res, ResultBase::Impl& impl)
	{
		if (MYSQL_ROW raw = mysql_fetch_row(MYSQL_RES_FROM_IMPL(impl))) {
			// FIXME: Create MySQLRowImpl here from MYSQL_ROW, and
			//        make Row() take a RowImpl* as the first param.
			return Row(raw, &res, fetch_lengths(impl),
					res.throw_exceptions());
		}
		else {
			return Row();
		}
	}







<
<







197
198
199
200
201
202
203


204
205
206
207
208
209
210

	/// \brief Returns the next DB row from the given result set.
	///
	/// Wraps \c mysql_fetch_row() in MySQL C API.
	Row fetch_row(ResultBase& res, ResultBase::Impl& impl)
	{
		if (MYSQL_ROW raw = mysql_fetch_row(MYSQL_RES_FROM_IMPL(impl))) {


			return Row(raw, &res, fetch_lengths(impl),
					res.throw_exceptions());
		}
		else {
			return Row();
		}
	}