Am 21.11.2009 um 15:16 schrieb Tero Laitinen <[email protected]>:

> Hi Darren,
>
>
> On Sun, Nov 15, 2009 at 3:58 PM, Darren Garvey <[email protected] 
> >
>>
>>
>>
>>
>> try {
>>    db.create();
>> } except(litesql::Except&) {
>>    if (db.needsUpgrade())
>>      db.upgrade();
>> }
>>
>> What is the proper way of doing this? Would it be reasonable to add  
>> an
>> AlreadyExists exception type?
>
> That is a good idea. I've just ran used needsUpgrade-method() to check
> whether the database is as it should be.
Actually instantiating the Database Object creates a Backend which  
opens in its constructor the Connection to the database and then the  
DATABASE itself. on errors a DatabaseError is thrown.
I would prefer a separate Open method which could throw a ConnectError  
or DatabaseDoesNotExist or DatabaseError. Also we could have  
isConnected() exists().

Kind Regards,
Gulliver

PS:Has anybody tested the 0.3.5-beta with MySQL or postgresql?


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Litesql-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/litesql-users

Reply via email to