wxDatabase - A couple of thoughts

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 237
Joined: Tue Mar 19, 2013 8:52 pm

wxDatabase - A couple of thoughts

Postby iwbnwif » Mon Oct 19, 2015 9:57 am

It is good to see the new examples coming along in wxDatabase.

The pity for me is that I use Firebird and that has been dropped since the days of wxDatabaseLayer.

I would quite like to have a go at adding Firebird back in, but I would want to use IBPP rather than directly using the (horrible!) Interbase C API. In effect the wxFirebirdDatabase would be a thinish wrapper around IBPP. Later I might also look at the Firebird 3 OO API.

Of course this would mean including IBPP within the wxDatabase project, are there any thoughts or concerns about this?

Also I appreciate it is a rather big (and possibly wholly unuseful) change, but I was wondering if it might be worth considering using wxAny in the resultset, in fact a resultset could derive from wxVector<wxVector<wxAny> >.

The reason is that I rather like range based for's :wink: and it would then be possible to do something like:

Code: Select all

  wxDatabaseResultSet resultSet;

  pDatabase->RunQueryWithResults ("SELECT * FROM Names;", resultSet);
  for (wxDatabaseRow row : resultSet)
    people.push_back ( myPerson (
       row.Field("ID").As<int>(), // ID
       row.Field("NAME").As<wxString>(), // name

I appreciate that there are a number of problems with this approach, but just wanted to throw it out there ...
wxWidgets 3.10, TDM MinGW64 5.1.0, g++ 4.8.2, Ubuntu 16.04LTS, Windows 10, CodeLite + wxCrafter
Some people, when confronted with a GUI problem, think "I know, I'll use Eclipse RCP". Now they have two problems.

Part Of The Furniture
Part Of The Furniture
Posts: 1981
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: wxDatabase - A couple of thoughts

Postby evstevemd » Tue Oct 20, 2015 11:14 am

Thanks for your kind words.
wxDB comes from DatabaseLayer which was basically written for 2.8 and misses much of the goodies of 3.x
My current task is making sure every supported backend builds fine and is at least usable.
I will appreciate if you log your suggestions for using new data structures as Git issues so that when I start updating them I will not miss that.

I will appreciate more testing of the library and help from community as am not that much expert ;)
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 1 guest