Hi,
On Thursday 13 March 2008, Eric Bollengier wrote:
> > yes, I have understood that (for the time being) bweb is not able to work
> > with a sqlite catalog (this is why I'm mailing -devel rather than
> > -users).
> >
> > Does anyone have an overview what would be required (in terms of
> > development work) to get bweb working on an sqlite catalog? What were the
> > reasons to exclude sqlite in the first place?
>
> I have started some time ago to implement sqlite backend, but sqlite have
> only very basics sql functions.
Depends... :) SQLite did transactions, subselects and some other stuff long
before MySQL did.
> Maybe i'm wrong, but for example, date manipulations have to be done by
> hand.
ACK, I do understand your point.
> SELECT date_trunc('day', Job.StartTime) FROM Job LIMIT 1; -- Pg
> SELECT DATE_FORMAT(Job.StartTime, '%Y-%m-%d') FROM Job LIMIT 1; -- mysql
> ??? in sqlite
There are a few date/time calculation functions in SQLite; however, they are
undocumented and not really recommended for usage. On the other hand, they
have been there for some time now and might work for some more time... :)
This one is
SELECT strftime('%Y-%m-%d', Job.StartTime) FROM Job LIMIT 1;
btw :))
> You could check for %sql_func in Bweb.pm, and if you find some way to
> manipulate dates without doing all work yourself, i will be happy to add
> sqlite to Bweb.
ACK. I'll see what else I can find.
Concatenation works just as in PostgreSQL (select foo || bar from baz);
the "STARTTIME_FOO" transformations can be done by strftime() calls (watch
out: strftime is _not_ fully compatible with the Unix/POSIX/whatever
strftime).
There exists a DBD (DBD::PgLite) which tries to transform PosgreSQL style SQL
statements to SQLite calls. I'm not sure whether it might help here, but it
would definitely be worth a try.
> An other thing, IMHO, Sqlite could be used for small setup, Postgresql (or
> Mysql) is the best candidate for medium and big setup. For a small setup
> (maybe 1 or 2 backups per day), bconsole is sufficient. For big one,
> bweb/bat is very helpful...
Hm... Well, my requirements need SQLite, and I'd still like to use bweb ;) I
do understand what you mean, though.
Thx for your comments, regards and have a nice weekend
Bastian
--
Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany
p: +49 (0) 761-45684-24
f: +49 (0) 761-45684-10 www.collax.com
Geschäftsführer: William K. Hite / Boris Nalbach
AG München HRB 158898 . Ust.-IdNr: DE 814464942
\ "Wenn du siehst, wen einige Mädchen heiraten, weißt du, wie
\ sehr sie es hassen müssen, ihren Lebensunterhalt selbst zu
\ verdienen."
\ Helen Rowland
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel