libtabula

Check-in [dc744e7800]
Login

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

Overview
Comment:Noted that Field and Row are still intimately tied into the MySQL C API.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dc744e7800564010ca8d91bdaefa18f4d9b28963
User & Date: etr 2015-08-12 21:45:25
Context
2015-08-12
21:53
Removed "Initializing result set objects" from the "tricky bits" section of the Wishlist section on DB independence, since it now basically boils down to the Row and Field items just added, and those are more specific. check-in: 97073e9aa4 user: etr tags: trunk
21:46
Merged Wishlist.md change in check-in: a6baa231d9 user: etr tags: mysql-type-info
21:45
Noted that Field and Row are still intimately tied into the MySQL C API. check-in: dc744e7800 user: etr tags: trunk
2015-08-11
03:30
Updated OS X and Cygwin cases in exrun to match new CMake build system. (Linux was done previously.) check-in: cf319f7c5b user: tangent tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Wishlist.md.

140
141
142
143
144
145
146


















147
148
149
150
151
152
153
...
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
    Library classes derive from vector and exception, which are much
    less likely to be a problem.

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

*   Database independence:



















    -   Pass a single string parameter to Connection::connect(), being
        a URL scheme which we pass to DBDriver::create(), a virtual
        ctor which looks at the bit before the colon to figure out which
        subclass to create.  Examples:

        -   `mysql://[user][:password][@][host][:port][/db]` = MySQL
................................................................................
            a SQLite DB.

    -   Map C API error numbers to libtabula constants in
        DBDriver::errnum().  Rename to error_code()?

    -   Must create at least two other DBDriver subclasses to
        ensure base class is reusable before releasing v4.0.
        PostgresDriver and SqlLiteDriver?

    -   Templatize all classes that use DBDriver interface with the
        DB driver type.  This lets you specify the driver type to use
        with a Connection and all its children without modifying the
        existing method parameter lists.  This also lets us worry less
        about C API types, as they can be hidden away behind typedefs:








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
...
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
    Library classes derive from vector and exception, which are much
    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.

        If we want to expose schema exploration, we can do so via
        DBDriver.

        Having done this, maybe rename String to Field, since that
        makes Row a vector-of-Field, which makes more sense than
        vector-of-String.  It also solves the old quandary about the
        difference between libtabula::String vs std::string.

    -   Pass a single string parameter to Connection::connect(), being
        a URL scheme which we pass to DBDriver::create(), a virtual
        ctor which looks at the bit before the colon to figure out which
        subclass to create.  Examples:

        -   `mysql://[user][:password][@][host][:port][/db]` = MySQL
................................................................................
            a SQLite DB.

    -   Map C API error numbers to libtabula constants in
        DBDriver::errnum().  Rename to error_code()?

    -   Must create at least two other DBDriver subclasses to
        ensure base class is reusable before releasing v4.0.
        PostgresDriver and SQLiteDriver?

    -   Templatize all classes that use DBDriver interface with the
        DB driver type.  This lets you specify the driver type to use
        with a Connection and all its children without modifying the
        existing method parameter lists.  This also lets us worry less
        about C API types, as they can be hidden away behind typedefs: