On Tue, Jan 10, 2012 at 05:23:53PM +0100, Michael Hasselmann wrote: > On Tue, 2012-01-10 at 15:57 +0000, Chris Green wrote: > > I'm quite prepared to dig into the code myself and add the ability to > > use other databases. However I don't want to spend vast amounts of time > > on this. How standard/modular is the database access code and what > > language is it written in? I'm assuming it's written in C/C++ which is > > OK by me as I've programmed in C since the 1980's (my job). > > The backends are split out from the rest of code, for instance the > connection handling can be found here: > http://git.gnome.org/browse/glom/tree/glom/libglom/connectionpool_backends > > Then for most (all?) SQL queries, glom uses libgda which provides the > necessary database abstraction. > > There is also an Sqlite example: > http://git.gnome.org/browse/glom/tree/examples/sqlite/test_sqlite_music/test_sqlite_music.glom > (notice the hosting_mode="sqlite"). > > I am not sure, but I think the limitation with Sqlite was that it can > only be used in self-hosting mode. > Well, if I understand what you mean by "self-hosting mode", then that's a fact of life with sqlite as the database is just a local file with no client-server connection. Access to the database is just handled as access to a local file would be so it can only be on the same host as the database 'client'.
For a database which is always going to be associated with a particular host (which is nearly all home user database usage) it's way more convenient to use sqlite. There are no issues with extra user/passwords needed for the database and no issues with backing up the database as it's "just another file" in the local data associated with the application. I always choose sqlite when I can, I don't think I have *any* database applications where it wouldn't make things easier. Even web applications (which nearly *all* use mySql) work perfectly well with sqlite as long as they're not so big that one needs to split the web server away from the database. On a home LAMP system that's never going to happen. When you say "There is also an Sqlite example" do you mean the code is in place to use sqlite? Or what do I need to do to try it? -- Chris Green _______________________________________________ glom-devel-list mailing list glom-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/glom-devel-list