Advantages and disadvantages of wxSQLite over SQLite3.

In this forum you can discuss database related issues which can be wxWidgets related, but also generic in nature.
Post Reply
apoorv569
Super wx Problem Solver
Super wx Problem Solver
Posts: 426
Joined: Tue Oct 20, 2020 3:35 pm

Advantages and disadvantages of wxSQLite over SQLite3.

Post by apoorv569 »

I have been using SQLite3 for my application that I'm making, and I found that wx also has a wxSQLite library. I was wondering if there are some advantages or disadvantages between the two.
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Advantages and disadvantages of wxSQLite over SQLite3.

Post by doublemax »

wxSQLite3 from Ulrich Telle is the only one that's actively developed and that's the one you should use.
Use the source, Luke!
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: Advantages and disadvantages of wxSQLite over SQLite3.

Post by utelle »

doublemax wrote: Fri Apr 30, 2021 6:00 am wxSQLite3 from Ulrich Telle is the only one that's actively developed and that's the one you should use.
I think there is a bit of confusion here. Most likely the OP wants to know about the differences between SQLite and wxSQLite. However, for wxWidgets (at least) two SQLite wrapper libraries exist: the really outdated library wxSQLite (supporting only SQLite2) and the actively developed library wxSQLite3 (supporting recent SQLite3 versions).
apoorv569 wrote: Fri Apr 30, 2021 12:34 am I have been using SQLite3 for my application that I'm making, and I found that wx also has a wxSQLite library. I was wondering if there are some advantages or disadvantages between the two.
Well, SQLite is a C library, while wxSQLite3 is a thin C++ wrapper around that C library. Almost all unique SQLite features are accessible, but in a more object-oriented way.

In wxWidgets-based GUI applications one usually uses the wxString class to exchange text data with the GUI, and wxSQLite3 automatically takes care of converting text strings between the internal UTF-8 encoded char* representation and wxString objects.

Additionally, the wxSQLite3 API is quite similar to JDBC in the Java world, and is usually easier to use than the C API of SQLite. It is planned to add modern C++ features in a future version of wxSQLite3, but a release date is not yet scheduled.

On top you get database encryption support, which is not part of SQLite itself.

I'm not aware of any serious disadvantages, but as the developer of wxSQLite3 I might be biased.
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Advantages and disadvantages of wxSQLite over SQLite3.

Post by doublemax »

utelle wrote: Fri Apr 30, 2021 8:29 am I think there is a bit of confusion here. Most likely the OP wants to know about the differences between SQLite and wxSQLite.
Yes, sorry. I didn't read OP thoroughly enough.
Use the source, Luke!
Post Reply