gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Oct 29 16:20:18 EDT 2016


Updated	 via  https://github.com/Gnucash/gnucash/commit/472b585f (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b8024fa9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/00880cd8 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/70c803d6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/afb57d0e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0bc35eb3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/10ff71b2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0baff455 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7ff6e51a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/02d173d2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/451f3ffe (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5065bce4 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c1417114 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5d38c7a7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/314a5e10 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/00e0a6e8 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/fc47b632 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/61beed56 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/31c73a14 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/37d42573 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5074bd59 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b38be9fe (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d8556ca7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/431b704c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ccc1cc49 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c2082bea (commit)
	 via  https://github.com/Gnucash/gnucash/commit/54acef27 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a303ae68 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/4b62deee (commit)
	 via  https://github.com/Gnucash/gnucash/commit/cb464da5 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/885470b3 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d1fd223f (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6f67e2dd (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d1063463 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/97b6e3a6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e0d5cc5b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/583c951a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/5823bf0d (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ccbfb69c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c0a193c5 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/eed4a012 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1f528392 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3894a2e8 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/faf59964 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7fe40480 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/cfa3ab24 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/12e76388 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/64c1fda6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/92f2f276 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6e84ccac (commit)
	 via  https://github.com/Gnucash/gnucash/commit/e20c17b6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a716636e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0d548da2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/a0ae59a9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/576bc8ae (commit)
	 via  https://github.com/Gnucash/gnucash/commit/8078c41a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/2f0b5ec8 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7e3ba421 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7d4ca43f (commit)
	 via  https://github.com/Gnucash/gnucash/commit/96a8a7b9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/be1a5f56 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/72ac25d7 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/611f210a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/049b905d (commit)
	from  https://github.com/Gnucash/gnucash/commit/a808525d (commit)



commit 472b585feb3fd87ac41809a5c7e466ae335a40af
Merge: a808525 b8024fa
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Oct 29 13:16:29 2016 -0700

    Interim merge of c++-backend to expose C++ interface.

commit b8024fa9eae3514cf1e7ba47463b2bb475dfbdc0
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Oct 29 12:40:57 2016 -0700

    Fix review comment errors.

commit 00880cd8f505e80479fc97bc673db0e6050ed109
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Oct 29 11:42:55 2016 -0700

    Fix another initializer list error.

commit 70c803d6aab75531c992014dee958c67745d741f
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Oct 28 12:56:13 2016 -0700

    Fix unsigned-signed comparison mismatch.

commit afb57d0e7b86a19b58baddcddd00d727fc0041b7
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Oct 28 12:31:49 2016 -0700

    Initialize a variable to appease travis-ci.

commit 0bc35eb3e28288858bb208c4067021f8343dbc6d
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Oct 28 11:38:29 2016 -0700

    Fix two C++11 initializer list errors.

commit 10ff71b29a430ccfc166129ceb20372534245cee
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Oct 25 14:15:43 2016 -0700

    Fix passing std::string to PWARN.

commit 0baff455a2b60d049f9dd2cf6bbf5e9a510a49c2
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Aug 9 10:05:33 2016 -0700

    Bug 769115 - db name isn't escaped well
    
    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).

commit 7ff6e51a725cbeddb9d3e0f99d4ec42c0653d448
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Aug 9 09:30:46 2016 -0700

    Use GncDbiProvider::get_table_list instead of calling out to libdbi.
    
    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.

commit 02d173d2e781d371d6648a2a97e58a19efc5de4e
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jul 29 14:23:36 2016 -0700

    Replace g_str functions in dbi_library_test with std::stringstream.

commit 451f3ffe4df5229d0fe597ec52a0b28dd3ecf382
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jul 29 13:36:45 2016 -0700

    DBI: Convert all of the gchar to char, remove a few gratuitous g_funcs.
    
    Except where we're explicitly using other GLib functions.

commit 5065bce45c39c6281904139b63954947c3bdf552
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jul 29 13:29:51 2016 -0700

    Combine Postgres and MySql gnc_dbi_session_begin into a single template.

commit c141711425fd337aaa24efc4eca4c5702a89b5ba
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jul 29 13:10:40 2016 -0700

    Move creation of the provider to GncDbiSqlConnection's constructor.
    
    Making GncDbiProviderImpl private to GncDbiSqlConnection.

commit 5d38c7a7291cef83246bc0652d3e78fa44b995b5
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jul 29 10:44:46 2016 -0700

    Make conn_setup and the error handler functions templates on DbType.

commit 314a5e10c2380bc29398d91afd3fdfcc2ae28146
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jul 28 15:45:38 2016 -0700

    Make gnc_lock_database a GncDbiSqlConnection member function.
    
    Called from the constructor, so effective RAII with unlock_database called
    from the destructor.

commit 00e0a6e8b62cab8be1c2a4503fcecd056c28ee63
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jul 28 09:18:25 2016 -0700

    Change parameter of save_may_clobber_data from QofBackend to dbi_conn.
    
    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.

commit fc47b63265f33794720c5988e65da798000c35a5
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 17:40:29 2016 -0700

    Templatize the session_begin functions and new_backend().
    
    Thus removing the need for specializations of
    QofDbiBackendProvider::create_backend().

commit 61beed5686d840405325a278d2835e72fe927230
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 17:38:11 2016 -0700

    Make sure that all of the GncDbiProviderImpl functions are in the right file.
    
    Also merge create_table_ddl back into the only function that used it.

commit 31c73a141e94d8ff1ff1cf4a12d44defe70eb616
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 16:15:14 2016 -0700

    Extract functions conn_setup and create_database.

commit 37d425733613aaf9c11272989d7d7305f9b075dd
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 13:54:45 2016 -0700

    Extract-function conn_test_dbi_library.
    
    Renaming the previous so-named function dbi_library_test.

commit 5074bd590fdf9604781b1cf193e2f6a40a793d2f
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 13:28:22 2016 -0700

    Don't leak the quoted string returned from dbi_conn_quote_string_copy.

commit b38be9fe20689cdc0e1e6dac4236de47d5e70ce1
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 11:50:51 2016 -0700

    Get rid of gotos.
    
    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.

commit d8556ca7b540cceb7aa82e75f63b518b797dc112
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 10:13:55 2016 -0700

    Reformat adjust_sql_options a bit to reduce nesting.

commit 431b704c92f4d2abc90b07ebc9a2c42c9a8a2d52
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 26 10:13:16 2016 -0700

    Abstract setting database string-value options to function set_options.

commit ccc1cc49ab542fb96660d81af354e96c4a20c1e1
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 25 11:29:30 2016 -0700

    Separate DBI classes into their own files.

commit c2082bea99bdb5bf144daad675f155b34abeea79
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 24 15:16:15 2016 -0700

    Convert upgrade_table to member, remove some convenience functions.
    
    To wit, gnc_sql_execute_select_sql, gnc_sql_execute_nonselect_sql,
    gnc_sql_create_temp_table, and gnc_sql_create_select_statement.

commit 54acef27c2b265f14364c1a47808899c644f6f66
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 24 12:12:27 2016 -0700

    Remove a bunch of free functions already implemented as GncSqlBackend members.

commit a303ae688afae1a972ad91a4aa4ea7cfdf6f79e6
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 24 10:40:09 2016 -0700

    Remove some GList and GSList uses from tests.

commit 4b62deee42db1734922bb255d3d86e1883f9271e
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 24 10:39:14 2016 -0700

    Rework gnc_sql_append_guid_list_to_sql to eliminate GString and GList.
    
    Which in turn forced rework of its users since the GString and GList were
    passed-in parameters.

commit cb464da599ec3dabead4427a3ff47b975b925317
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 23 14:33:34 2016 -0700

    Replace GHashTable in GncSqlConnection with a std::vector.

commit 885470b3e7c437e5f3b437d8be084c5f6b5017a9
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 23 13:38:40 2016 -0700

    Replace std::vector<std::string> with StrVec.

commit d1fd223f9fd947e168a5ac5ab2842bc09ef7b23e
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 23 12:52:17 2016 -0700

    Make conn_table_operation and add_columns_ddl members of GncDbiSqlConnection.
    
    So they don't need to be friends.

commit 6f67e2dd1a52b5ddacab1178d93c1ae761197561
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jul 21 16:21:59 2016 -0700

    Convert GncSqlBackend and GncDbiBackend into a class hierarchy.
    
    This is a rather complex change, because it also begins to separate the
    responsibilities of the backends and GncSqlConnection.

commit d1063463163645ba3c55fdf72bd4c1807e34843b
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 18 15:28:37 2016 -0700

    Minimally document GncDbiResult.

commit 97b6e3a6c6cf0c7389e120cae2d47e926293408c
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 18 15:28:08 2016 -0700

    Pass ownership of the dbi_conn to GncDbiSqlConnection.

commit e0d5cc5b0bb0020e9f61eca12de425028a2679fc
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 18 15:11:35 2016 -0700

    New function GncSqlConnection::dberror().
    
    GncDbiSqlResult::dberror() just calls it instead of retrieving the dbi_conn
    to call dbi_conn_error() itself.

commit 583c951adcab34f74447b41e5f9a886ba053bc15
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 18 15:04:41 2016 -0700

    Use the right include delineators, it's not in the current source dir.

commit 5823bf0d9ab327ce7725649f7fcc0a3d9f11f4b8
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 18 15:01:55 2016 -0700

    Move GncDbiSqlConnection into a separate file.
    
    The declaration stays in gnc-backend-dbi.h because the dependencies are
    still a little too tangled to be able to separate it.

commit ccbfb69cf1419e100c7b83c1f54b4b2c73024804
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 18 10:31:20 2016 -0700

    Delete unused or duplicated member variables from GncSqlBackend & GncDbiBackend.

commit c0a193c593d5e28d403373186e06a773ee397441
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jul 18 09:49:41 2016 -0700

    Remove unused/never implemented QofBackend functions.
    
    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.

commit eed4a012c3d73b8d1364282dde5531702e887258
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 16 17:22:29 2016 -0700

    Remove no-longer-needed gnc_table_slist_free.

commit 1f52839271e5ebb981a793706bc5db3be6fdec42
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 16 17:21:25 2016 -0700

    Templatize QofDbiBackendProvider.

commit 3894a2e8b76d766b881111688454b2ed262ab5e9
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 16 16:39:09 2016 -0700

    Convert struct provider_functions_t into virtual class GncDbiProvider.
    
    Implementation templated as template <DbType> GncDbiProviderImpl.
    Converted GSLists to std::vectors and GStrings to std::strings.

commit faf59964e4e4b92a422dd50305c24874de975d63
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 16 12:12:03 2016 -0700

    Rename gnc-backend-dbi-priv.h to gnc-backend-dbi.hpp.
    
    Also remove "#ifdef __cplusplus" from both gnc-backend-dbi.hpp and
    gnc-backend-dbi.h, these files are always C++.

commit 7fe404808ade6e8ea74aae55e2ddabd903857282
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jul 3 17:06:19 2016 -0700

    Delete some no-longer (or in some cases never) used functions.

commit cfa3ab24f68250c6f04b158763874715826ffa09
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jun 18 12:40:28 2016 -0700

    Convert GncSqlConnection to a C++ class.

commit 12e763884e3044483c9d0a008ccf1870c7d5ae40
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jun 18 12:38:11 2016 -0700

    Use a std::unique_ptr for GncSqlStatement for better memory management.

commit 64c1fda6ec1417b9d0dabd937c9981aff0f36261
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jun 17 11:21:18 2016 -0700

    gnc-backend-dbi.cpp: NULL -> nullptr.

commit 92f2f2765eaa701176e11559be9b0d29f525cdbd
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jun 17 10:28:02 2016 -0700

    Replace the ptr-to-func GncSqlObjectBackend struct with a class hierarchy.
    
    Can't template them because we need to iterate on the collection when loading.

commit 6e84ccac75f7009e2864c56d165cfcd29a39aa2e
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jun 9 14:23:42 2016 -0700

    Move GncSqlColumnTypeHandler functions into GncSqlColumnTableEntry.
    
    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.

commit e20c17b6425b086f4a1bf33aca9bad0729193c77
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue May 31 17:41:39 2016 -0700

    Change the object type string defines to an enum.
    
    Because doing unnecessary string compares is dumb.

commit a716636e00d7db11eb68bec6b070977f569b92d0
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon May 9 17:40:45 2016 -0700

    Convert GncSqlStatement to a virtual class.
    
    Implemented by GncDbiSqlStatement. Use class function semantics.

commit 0d548da223cdb57d50b06ff88546551e27f8c9e3
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon May 9 11:39:26 2016 -0700

    Create a new set_parameter template function to reduce repetition.

commit a0ae59a96a27b22d80f3da8bdfec7b555f23f2d1
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Apr 9 15:31:36 2016 -0700

    Reimplement row retrieval as an iterator on GncSqlResults.
    
    Replaces a much-copied and longish while loop with a simple range-for loop
    that's guaranteed not to iterate if the result-set is empty.

commit 576bc8ae7d682a3101ab98b41b4e1f9c0d271e07
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Aug 7 13:10:47 2016 -0700

    Don't override an already-set QofBackend error.

commit 8078c41a3535beaf982622eab20da181d9f4298a
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Mar 27 23:48:02 2016 -0700

    Make GncSqlRow a class and replace GValues with typed transfer functions.

commit 2f0b5ec8fee49c729938a920740fdcf846615668
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Mar 26 17:53:17 2016 -0700

    Remove tabs from gnc-backend-sql*.

commit 7e3ba421d77f05389b163e4f52c8b1f8b6f84798
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Mar 11 16:36:32 2016 -0800

    Fix potential dereference error.
    
    Thanks Geert Janssens.

commit 7d4ca43fd01e75364b44f9e027c87dc6f4367518
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Mar 12 11:32:27 2016 -0800

    Combine add_colname_to_list and add_gvalue_to_slist into single function add_value_to_vec.
    
    The two lists were always used together so replace them with a single
    vector of std::pair<std::string, std::string>; this also gets rid of the
    intermediate GValue which was used to convert the returned value to a string.
    operator<<() can do that for us more transparently.
    
    Also template most of the add_value_to_vec functions.

commit 96a8a7b99f19aa600840f3b3b391f33c7a39c198
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Mar 12 11:13:05 2016 -0800

    Make GncSqlColumnTableEntry arrays into std::vectors.
    
    Allows use of range for.

commit be1a5f56d69450302d4c67703b513d2bf2d00fbd
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Feb 28 14:38:29 2016 -0800

    Replace heap-allocate GncSqlColumnInfo GList with on-stack std::vector.
    
    Faster, more concise, can't leak.

commit 72ac25d7552a790f02e8f03c481de2bf3bfe33b8
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Feb 28 12:28:18 2016 -0800

    Change GncSqlColumnInfo::m_null_allowed to m_not_null and invert logic.
    
    The COL_NNUL flag is "not null", the SQL table column qualifier is NOT NULL,
    and bitwise AND is clearer code than bitwise XOR.

commit 611f210a072e84954e26bb8eaa94f880203e5714
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Feb 28 12:18:49 2016 -0800

    Provide constructors for GncSqlColumnInfo, change variable names to m_ prefix.

commit 049b905d86595bcf8a223e8277a546b1bc0e63a7
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Aug 4 14:41:40 2016 -0700

    Replace qof_object_foo_backend with c++ native containers.
    
    Since C++ provides find and for_each on native containers there's no need
    for a hand-rolled version in libqof.



Summary of changes:
 src/backend/dbi/CMakeLists.txt                     |    8 +-
 src/backend/dbi/Makefile.am                        |   10 +-
 src/backend/dbi/gnc-backend-dbi-priv.h             |  121 -
 src/backend/dbi/gnc-backend-dbi.cpp                | 3603 +++++---------------
 src/backend/dbi/gnc-backend-dbi.h                  |    4 -
 src/backend/dbi/gnc-backend-dbi.hpp                |  117 +
 .../io-gncxml-gen.h => dbi/gnc-dbiprovider.hpp}    |   52 +-
 src/backend/dbi/gnc-dbiproviderimpl.hpp            |  371 ++
 src/backend/dbi/gnc-dbisqlconnection.cpp           |  709 ++++
 src/backend/dbi/gnc-dbisqlconnection.hpp           |  111 +
 src/backend/dbi/gnc-dbisqlresult.cpp               |  187 +
 src/backend/dbi/gnc-dbisqlresult.hpp               |   77 +
 src/backend/dbi/test/CMakeLists.txt                |    2 +
 src/backend/dbi/test/Makefile.am                   |    4 +-
 src/backend/dbi/test/test-backend-dbi-basic.cpp    |  103 +-
 src/backend/dbi/test/test-dbi-stuff.cpp            |   24 +-
 src/backend/sql/CMakeLists.txt                     |    2 -
 src/backend/sql/Makefile.am                        |    2 -
 src/backend/sql/gnc-account-sql.cpp                |  334 +-
 src/backend/sql/gnc-address-sql.cpp                |  237 +-
 src/backend/sql/gnc-address-sql.h                  |   36 -
 src/backend/sql/gnc-backend-sql.cpp                | 3077 ++++++-----------
 src/backend/sql/gnc-backend-sql.h                  | 1267 ++++---
 src/backend/sql/gnc-bill-term-sql.cpp              |  283 +-
 src/backend/sql/gnc-bill-term-sql.h                |    3 -
 src/backend/sql/gnc-book-sql.cpp                   |  131 +-
 src/backend/sql/gnc-book-sql.h                     |    1 -
 src/backend/sql/gnc-budget-sql.cpp                 |  274 +-
 src/backend/sql/gnc-commodity-sql.cpp              |  208 +-
 src/backend/sql/gnc-customer-sql.cpp               |  177 +-
 src/backend/sql/gnc-employee-sql.cpp               |  135 +-
 src/backend/sql/gnc-entry-sql.cpp                  |  222 +-
 src/backend/sql/gnc-invoice-sql.cpp                |  245 +-
 src/backend/sql/gnc-invoice-sql.h                  |    2 -
 src/backend/sql/gnc-job-sql.cpp                    |  143 +-
 src/backend/sql/gnc-lots-sql.cpp                   |  194 +-
 src/backend/sql/gnc-order-sql.cpp                  |  205 +-
 src/backend/sql/gnc-order-sql.h                    |    2 -
 src/backend/sql/gnc-owner-sql.cpp                  |  195 +-
 src/backend/sql/gnc-owner-sql.h                    |   36 -
 src/backend/sql/gnc-price-sql.cpp                  |  144 +-
 src/backend/sql/gnc-recurrence-sql.cpp             |  193 +-
 src/backend/sql/gnc-schedxaction-sql.cpp           |  143 +-
 src/backend/sql/gnc-slots-sql.cpp                  |  318 +-
 src/backend/sql/gnc-slots-sql.h                    |    7 +-
 src/backend/sql/gnc-tax-table-sql.cpp              |  306 +-
 src/backend/sql/gnc-tax-table-sql.h                |    2 -
 src/backend/sql/gnc-transaction-sql.cpp            |  826 ++---
 src/backend/sql/gnc-transaction-sql.h              |   25 -
 src/backend/sql/gnc-vendor-sql.cpp                 |  144 +-
 src/backend/sql/test/test-column-types.cpp         |    5 +-
 src/backend/sql/test/utest-gnc-backend-sql.cpp     |  394 +--
 src/backend/xml/gnc-address-xml-v2.cpp             |    4 +-
 src/backend/xml/gnc-backend-xml.cpp                |   11 +-
 src/backend/xml/gnc-bill-term-xml-v2.cpp           |    4 +-
 src/backend/xml/gnc-customer-xml-v2.cpp            |    4 +-
 src/backend/xml/gnc-employee-xml-v2.cpp            |    4 +-
 src/backend/xml/gnc-entry-xml-v2.cpp               |    4 +-
 src/backend/xml/gnc-invoice-xml-v2.cpp             |    4 +-
 src/backend/xml/gnc-job-xml-v2.cpp                 |    4 +-
 src/backend/xml/gnc-order-xml-v2.cpp               |    4 +-
 src/backend/xml/gnc-owner-xml-v2.cpp               |    4 +-
 src/backend/xml/gnc-tax-table-xml-v2.cpp           |    4 +-
 src/backend/xml/gnc-vendor-xml-v2.cpp              |    4 +-
 src/backend/xml/io-gncxml-v2.cpp                   |  124 +-
 src/backend/xml/io-gncxml-v2.h                     |   28 +-
 src/backend/xml/sixtp.h                            |   15 -
 src/libqof/qof/gnc-datetime.hpp                    |    2 +
 src/libqof/qof/qofbackend-p.h                      |   30 +-
 src/libqof/qof/qofbackend.cpp                      |   11 +-
 src/libqof/qof/qofobject.cpp                       |   93 -
 src/libqof/qof/qofobject.h                         |   13 -
 src/libqof/qof/qofquery.cpp                        |   12 +-
 src/libqof/qof/qofsession.cpp                      |   10 +-
 src/libqof/qof/test/test-qofobject.c               |   71 -
 src/libqof/qof/test/test-qofsession-old.cpp        |   39 -
 src/libqof/qof/test/test-qofsession.cpp            |    6 -
 77 files changed, 6531 insertions(+), 9399 deletions(-)
 delete mode 100644 src/backend/dbi/gnc-backend-dbi-priv.h
 create mode 100644 src/backend/dbi/gnc-backend-dbi.hpp
 copy src/backend/{xml/io-gncxml-gen.h => dbi/gnc-dbiprovider.hpp} (60%)
 create mode 100644 src/backend/dbi/gnc-dbiproviderimpl.hpp
 create mode 100644 src/backend/dbi/gnc-dbisqlconnection.cpp
 create mode 100644 src/backend/dbi/gnc-dbisqlconnection.hpp
 create mode 100644 src/backend/dbi/gnc-dbisqlresult.cpp
 create mode 100644 src/backend/dbi/gnc-dbisqlresult.hpp
 delete mode 100644 src/backend/sql/gnc-address-sql.h
 delete mode 100644 src/backend/sql/gnc-owner-sql.h



More information about the gnucash-patches mailing list