Re: [gnome-db] dynamic sqlite library & berkeley db lookups

On Tue, 2005-08-30 at 17:52 -0400, Mark Drago wrote:
> Hey Guys,
> I'm writing a web proxy that uses GLib and GNet.  I had been directly
> interfacing with sqlite3, but it looks like I'm going to have to support
> other database systems as well.  GDA seems like a great choice
> considering I'm using so many other Gnome libraries.  I just have a few
> questions.
> I would really like to dynamically link to the sqlite3 library so that
> when there are sqlite3 updates available I only have to update one
> library instead of sqlite3 and gda.  Is there anyway to build gda this
> way?
you mean with version 1.3? With that one, unfortunately, libgda includes
its own copy of sqlite, which we are planning to remove ASAP (we use
internal structures that are not available in the public API).

for the time being, I guess you can update the copy in libgda source
tree every time you want. If the API doesn't change, this should work
straight away.

> My second question is about doing lookups against Berkeley databases.  I
> have a Berkeley DB where I need to lookup the 'data' based on the 'key'.
> So, I'm not interested in the row number at all, just the key.  I can't
> seem to find out if this is possible and if so, how to do it.  The only
> way I have found to interface with a Berkeley DB is to call
> gda_connection_get_schema(..., GDA_CONNECTION_SCHEMA_TABLES, ...) and
> call gda_data_model_get_row() or gda_data_model_get_value_at() which
> both require that I know the row number.  Is there a way to treat a
> Berkeley DB like a hash table, where I supply a key and get the data
> back?
you have, in 1.2, GdaSelect, although it only works for very simple
queries. In 1.3, GdaSelect should work better
Rodrigo Moya <rodrigo gnome-db org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]