Re: [Planner Dev] MySQL database access support



On Tue, 2005-12-20 at 01:08 +0000, Jon Wilkins wrote:
> Hi All,
> 
> I've spent some time over the past couple of days getting to grips with
> the gda/postgresql bits of libplanner.
> 
> I've got planner opening a small project from mysql whilst retaining
> support for postgresql (including the original CURSOR-based queries).

cool!

> The planner gui current builds a URI of
>  sql://user:password(at)host#database&project_id
> as a result of entry in the Open From Database dialog.  
> 
> This uri is passed through to libplanner which uses the "sql" prefix to
> call code to open via the database storage module instead of file.  
> 
> By getting the planner gui to generate "mysql://" or "pgsql://" uri's
> instead, I've enabled libplanner to select the correct gda database
> provider.  The same uri prefix is used in mrp-sql.c (the source that
> actually does the data access) to select between two different sets of
> sql statements - one for postgresql and one for mysql.

I'm interested to know how you're implementing the mysql backend.  I'm
hoping you're not creating a completely separate backend for mysql.
Really, we should have a single, generic libgda backend which should
work for any of the libgda supported databases - no?

> And a question to Kurt/Richard....  Do you have any problems with using
> the prefix/protocol on the uri to denote the database type?  In my code
> I've left the current "sql" as a pseudonym for "pgsql" so that the
> planner/libplanner interface is maintained.

I have no problem with this - my concern is that we ensure the code is
as simple and maintainable as possible, so I'd like to hear more about
your backend plan.

-- 
Kurt Maute <kurt maute us>




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