I have started looking at Wt::DBO to replace my sqlite marshaller and
I notice something odd right off the bat.
It seems there can only be one session at a time?
Rather, more specifically, I would have to use some type of locking
queue of connections, and pull from it each time I wish to create a
session, and it kind of looks like it would be rather heavy to create
a session object each time as well.  So I can either use a pool of
connections and create sessions on demand from a connection in that
pool (with the running of many mapClass's), or I could make a pool of
sessions, each attached to its own connections, and use the sessions
from the pool as necessary, and so on and so forth.  The two files I
found that demonstrate how to use the DBO are just test frameworks and
it is quite obvious that this is not how it was designed to be used,
so is there an actual example somewhere that demonstrates its real
use, or should I just create a pool of session objects as I was
initially thinking?

Also, the createtables, does it destructively recreate the tables, as
in deleting the existing data, or if the table already exists does it
do nothing, or what if the table layout is different, does it do
nothing, or does it create/remove columns as it needs, and is that
destructive or not to the existing data, and is there a method to drop
tables as well?

You might look at the Python library SQLAlchemy, it handles all of
this extremely well (and I have actually linked in Python into some of
my C++ projects *just* so I could use sqlalchemy, it is that nice to
use, although a slight bit of an overhead since it is, well, python).

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to