Reviving DatabaseLayer

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Reviving DatabaseLayer

Post by evstevemd »

Hi,
Since my app uses it I decided to revive it. Bad news is I plan only to work on PostGreSQL and MySQL.
I'm in dillema whether to drop SQLite3 as there is solid wxSQLite3 or Just copy the goodies of wxSQLite3 and integrate remains undecided.
I will set up GIT repository soon.

Many have modified DBL but have found no place to contribute back.

Disclaimer: Not maverick at the task am undertaking, so I hope to stand in the shoulders of giants here :P
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?
samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 340
Joined: Mon Oct 06, 2008 12:55 pm

Re: Reviving DatabaseLayer

Post by samsam598 »

Could you please consider to add ODBC in?I have issues on it when working with aisa characters and I can't fix it.

Appreicated.
Regards,
Sam
-------------------------------------------------------------------
Windows 10 64bit
VS Community 2019
msys2-mingw13.2.0 C::B character set: UTF-8/GBK(Chinese)
wxWidgets 3.3/3.2.4 Unicode Mono Static gcc static build
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Reviving DatabaseLayer

Post by evstevemd »

samsam598 wrote:Could you please consider to add ODBC in?I have issues on it when working with aisa characters and I can't fix it.

Appreicated.
Hi Sam,
I cannot promise anything right now. But definitely, I would like to make the library as alive as possible.
Let me see if I can undertake that as far as time resource is concerned!
regards,
Stefano
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?
samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 340
Joined: Mon Oct 06, 2008 12:55 pm

Re: Reviving DatabaseLayer

Post by samsam598 »

evstevemd wrote:
samsam598 wrote:Could you please consider to add ODBC in?I have issues on it when working with aisa characters and I can't fix it.

Appreicated.
Hi Sam,
I cannot promise anything right now. But definitely, I would like to make the library as alive as possible.
Let me see if I can undertake that as far as time resource is concerned!
regards,
Stefano
Hi Stefano,

Thank you very much for the reply!Take your time and have fun! ^_^
Regards,
Sam
-------------------------------------------------------------------
Windows 10 64bit
VS Community 2019
msys2-mingw13.2.0 C::B character set: UTF-8/GBK(Chinese)
wxWidgets 3.3/3.2.4 Unicode Mono Static gcc static build
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Reviving DatabaseLayer

Post by evstevemd »

samsam598 wrote:
evstevemd wrote:
samsam598 wrote:Could you please consider to add ODBC in?I have issues on it when working with aisa characters and I can't fix it.

Appreicated.
Hi Sam,
I cannot promise anything right now. But definitely, I would like to make the library as alive as possible.
Let me see if I can undertake that as far as time resource is concerned!
regards,
Stefano
Hi Stefano,

Thank you very much for the reply!Take your time and have fun! ^_^
;)
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?
marfi
Knows some wx things
Knows some wx things
Posts: 46
Joined: Fri Nov 19, 2004 7:29 am
Contact:

Re: Reviving DatabaseLayer

Post by marfi »

I use DatabaseLayer (with SQLite3, PostgreSQL and MySQL backends) on Linux with wxWidgets 2.8.12 and wxWidgets 2.9.4 and it works fine so I don't see any reason why to drop SQLite3 support. Also, DatabaseLayer is used in DatabaseExplorer plugin for awesome CodeLite IDE and only DB backed which is ATM supported on all platforms (MS Windows, Mac OS X and Linux) is SQLite3... (it is really pain to build MySQL connector by using MinGW on Windows... :( ). Also, CodeLite's DatabaseExplorer plugin can generate C++ classes directly from database tables which can optionaly use DatabaseLayer as a DB backend so I vote for keeping this project alive as long as possible... ;)
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Reviving DatabaseLayer

Post by evstevemd »

marfi wrote:I use DatabaseLayer (with SQLite3, PostgreSQL and MySQL backends) on Linux with wxWidgets 2.8.12 and wxWidgets 2.9.4 and it works fine so I don't see any reason why to drop SQLite3 support. Also, DatabaseLayer is used in DatabaseExplorer plugin for awesome CodeLite IDE and only DB backed which is ATM supported on all platforms (MS Windows, Mac OS X and Linux) is SQLite3... (it is really pain to build MySQL connector by using MinGW on Windows... :( ). Also, CodeLite's DatabaseExplorer plugin can generate C++ classes directly from database tables which can optionaly use DatabaseLayer as a DB backend so I vote for keeping this project alive as long as possible... ;)
you are right but what are pros seeing that we have wxsqlite3?
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?
marfi
Knows some wx things
Knows some wx things
Posts: 46
Joined: Fri Nov 19, 2004 7:29 am
Contact:

Re: Reviving DatabaseLayer

Post by marfi »

I can see these pros:
1) single common API for all supported database backends
2) IMHO it is not good idea to break (throw away) feature that works fine for all supported platforms
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Reviving DatabaseLayer

Post by evstevemd »

marfi wrote:I can see these pros:
1) single common API for all supported database backends
2) IMHO it is not good idea to break (throw away) feature that works fine for all supported platforms
I agree!
I will add. For now I have some few things to do before I come back to wxDatabase
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?
manyleaves
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue Mar 26, 2013 3:52 am

Re: Reviving DatabaseLayer

Post by manyleaves »

Thanks for reviving DatabaseLayer. A few months back I spent a good deal of time researching the best wxWidgets friendly components to access ODBC and SQLServer/Sybase databases: DatabaseLayer was the only realistic choice since I plan to support SQLite3, PostgreSQL and MySQL in the future. I invested the time to fix up the ODBC and TDS layers and eliminate all the TDS layer memory leaks. Although I develop on Windows with Visual C++, I made the TDS layer changes necessary to support FreeTDS instead of using Microsoft's native TDS implementation. The build should therefore port quite seamlessly to unix.

I'm more than happy to upload my code once you have a repository. Please advise.

I agree with marfi that we should support all database backends.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Reviving DatabaseLayer

Post by evstevemd »

manyleaves wrote:Thanks for reviving DatabaseLayer. A few months back I spent a good deal of time researching the best wxWidgets friendly components to access ODBC and SQLServer/Sybase databases: DatabaseLayer was the only realistic choice since I plan to support SQLite3, PostgreSQL and MySQL in the future. I invested the time to fix up the ODBC and TDS layers and eliminate all the TDS layer memory leaks. Although I develop on Windows with Visual C++, I made the TDS layer changes necessary to support FreeTDS instead of using Microsoft's native TDS implementation. The build should therefore port quite seamlessly to unix.

I'm more than happy to upload my code once you have a repository. Please advise.

I agree with marfi that we should support all database backends.
See https://github.com/mtangoo/wxDatabase
All I have done now is to refactor some names and few other stuffs. I have few things to do before I turn back to do more work!
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?
samsam598
Super wx Problem Solver
Super wx Problem Solver
Posts: 340
Joined: Mon Oct 06, 2008 12:55 pm

Re: Reviving DatabaseLayer

Post by samsam598 »

evstevemd wrote:See https://github.com/mtangoo/wxDatabase
All I have done now is to refactor some names and few other stuffs. I have few things to do before I turn back to do more work!
Really excited and appreicated.Would you please let me know how to build the lib or how to use ?
Regards,
Sam
-------------------------------------------------------------------
Windows 10 64bit
VS Community 2019
msys2-mingw13.2.0 C::B character set: UTF-8/GBK(Chinese)
wxWidgets 3.3/3.2.4 Unicode Mono Static gcc static build
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Reviving DatabaseLayer

Post by evstevemd »

samsam598 wrote:
evstevemd wrote:See https://github.com/mtangoo/wxDatabase
All I have done now is to refactor some names and few other stuffs. I have few things to do before I turn back to do more work!
Really excited and appreicated.Would you please let me know how to build the lib or how to use ?
currently it uses Codelite project but you are welcome to write premake4 or bakefile script.
I'm yet to start working db part of my app. by then I'll jump to wxdatabase
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?
manyleaves
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue Mar 26, 2013 3:52 am

Re: Reviving DatabaseLayer

Post by manyleaves »

evstevemd

Apologies for taking this long to post a reply - I've just seen your post today. I'd subscribed to this topic so was expecting an email ... but nothing ...

All my projects are built with Visual C++. Could you recommend which of premake4 or bakefile is easiest under Windows?

As soon as I get a chance, I'll download your code and integrate mine to suit your new naming conventions.

FYI: I've also written a wxDblConfig class which can access the database layer as a wxConfigBase*. It automagically creates the necessary tables, view and triggers. I researched the common ground between all the SQL implementations and this should work for them all. So maybe your github could be a home for that too!
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: Reviving DatabaseLayer

Post by evstevemd »

manyleaves wrote:evstevemd

Apologies for taking this long to post a reply - I've just seen your post today. I'd subscribed to this topic so was expecting an email ... but nothing ...
No problem :)
manyleaves wrote:All my projects are built with Visual C++. Could you recommend which of premake4 or bakefile is easiest under Windows?
I would prefer bakefile for one reason, it is official build for wxWidgets but premake4 have its advantages too. So if you want my word I would say bakefile.
See the link for more on bakefile, its not that hard
http://www.bakefile.org/doc/index.html
manyleaves wrote:As soon as I get a chance, I'll download your code and integrate mine to suit your new naming conventions.
I would love to know if It works and even fix it. So thank you for your interest.
manyleaves wrote:FYI: I've also written a wxDblConfig class which can access the database layer as a wxConfigBase*. It automagically creates the necessary tables, view and triggers. I researched the common ground between all the SQL implementations and this should work for them all. So maybe your github could be a home for that too!
Well I cannot promise anything for now. Is it made on top of wxDatabase/Databaselayer? I have to check the codes before I promise anything!
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?
Post Reply