More like at all, but it's supposed to be quoted rather than
escaped.
dbi_conn_quote_string() doesn't work well for database names,
so we do it directly. libdbi is also inconsistent about needing
quotes: They're required by mysql in SQL commands, and libdbi
requires them for internal commands that it turns into SQL
(e.g. db_conn_get_table_list) but not others (e.g dbi_conn_set_option).
GncDbiProvider can figure out the dbname for itself so change the
function signature to replace dbname with a particular table to
search for. Pass an empty string ("" works) to get the full list.
It actually needs the dbi_conn and that's known to its caller. Plus,
the backend's conn parameter hasn't actually been set so it was somewhat
coincidental that it worked.
By replacing all of the char*s on the heap to std::strings, mostly in
a new UriString struct. Also lets us simplify the call to
set_standard_connection_options.
Note that the QofQuery functions that sort-of used them are ifdefed out
instead of deleted to serve as place-holders since we'll be bringing
back backend querying later.
Unfortunately a rather massive change. Gets rid of GncSqlColumnTypeHandler
and its hideous run-time registry by making the handler functions members
of GncSqlColumnTableEntry. GncSqlColumnTableEntry becomes an abstract super-
class with a templatized subclass GncSqlColumnTableEntryImpl whose template
parameter is the GncSqlObjectType that's also the GncSqlColumnTableEntryImpl's
m_col_type member. That member is a candidate for future removal as it's not
necessary. An explicit specialization is provided for each GncSqlObjectType and
that's a candidate for future code-shrinkage as there's still a fair amount
of duplication in spite of adding several helper template functions to absorb
most of the meat. The abstract GncSqlColumnTableEntry class is motivated by
the need to have an iterable container which in turn requires runtime
polymorphism. This can probably be replaced with a variadic-template
pseudo-container.
The two major benefits of this change are that it gets rid of one more set
of macro functions and provides vtable dispatch that has only one level
of indirection instead of the cumbersome string-hash-table-lookup to
find the handler followed by invoking the handler's function.
The two header files are removed because they exposed only the initialization
function which in turn only registered the respective GncSqlColumnTypeHandler.