wxSQLite3 - Some sort of connection pooling Topic is solved

In this forum you can discuss database related issues which can be wxWidgets related, but also generic in nature.
Post Reply
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

wxSQLite3 - Some sort of connection pooling

Post by evstevemd »

Hi,
I was thinking of some sort of database pooling with wxSQLite3.
Is it possible?

Another question, If I create wxSQLite3Database object and I want to iterate through SQLite3 database files. Should I call just Open and close or I should Open another DB and the first one will close automatically?

Thanks
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?
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLite3 - Some sort of connection pooling

Post by utelle »

evstevemd wrote:I was thinking of some sort of database pooling with wxSQLite3. Is it possible?

For database systems like Oracle where establishing a database connection is a relatively expensive operation connection pooling is certainly useful. wxSQLite3 currently doesn't have support for connection pooling and I'm not sure whether it's worth the effort to add such a feature.
evstevemd wrote:If I create wxSQLite3Database object and I want to iterate through SQLite3 database files. Should I call just Open and close or I should Open another DB and the first one will close automatically?
It's not necessary to instantiate a new wxSQLite3Database object for each database file, but currently you have to call method Close before you can reuse a wxSQLite3Database instance. Although automatically closing an associated database in case method Open is called again could be added to method Open, I don't intend to implement this feature at the moment, since it's not trivial to handle possibly still open statements. But I'll add at least a check to method Open whether a database is already associated.

Regards,

Ulrich
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

Post by evstevemd »

Thanks Urlich!
I see
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