liberty-eiffel
[Top][All Lists]
Advanced

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

Re: [Liberty-eiffel] Database access with Liberty


From: Paolo Redaelli
Subject: Re: [Liberty-eiffel] Database access with Liberty
Date: Mon, 06 Jan 2014 15:40:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

Il 06/01/2014 00:36, Raphael Mack ha scritto:
> Hello there,
>
> I need database access with my LibertyEiffel application. What do you
> generally think about this topic? We have ESE/EDC - which I never used,
> but I somehow like it. @Cyril you once wrote that you have some concerns
> about the implementation. What exactly are they? I'd like to see
> database support in Liberty in some way and EDC is already available, so
> why not just continue it? For Mysql it would need a working GDA wrapper,
> @Paolo: you merged the EWLC wrappers into the Liberty repo once, but
> removed them again with commit 96b0345c13246bd3e6b6a5a685dd1407b65868a.
> Was this intentional? What do you think would be necessary to get GDA
> working?
It was intentional, because the lower-end were mostly handwritten
whereas I currently prefer to generate at least the lowest level using
wrappers-generator. They were written when development branch of gda was
2.9x, now stable releases are version 5.0 .... I think it would be wiser
to start anew and I'm doing it right now.

> I currently see the options:
>
> 1. lowlevel wrapper of mysql C API in my app
> 2. as 1 but commited wrapper to Liberty
> 3. lowlevel wrapper for mysql C API as EDC backend
> 4. generated GDA wrapper (requires GLib and GObject, right?) use
> directly in the app
> 5. as 4 but with EDC on top
>
> What do you think is the best in terms of effort to get it working and
> to keep it working after updates of dependent libs? Which way should I
> choose?
I would give a try to resurrect the old gobject wrappers which are
needed to get gda running.
To solve the issue completely I started to write a tool that parsed the
Gobject Introspection metadata database. Infact GID provides a range of
informations that once weren't available even reading the documntations,
like memory handling of returned data structures, in-out informations of
callbacks arguments and so on.

> BTW: do we have some documentation about generating wrappers?
No, I started a little wrapping howto, but that's before I wrote
wrappers-generator.
>  Or do I
> have to look into the Makefiles to see how gccxml and wrappers-generator
> are to be used to generate a wrapper`
It's not that hard. gccxml behaves like a compiler, except that you give
it a -fxml=my.xml
then you launch wrappers-generator giving it that file (and the headers
you want it to scan) and it will generate one class for header file, one
for each enum, one for each struct.
Unions aren't handled.
wrappers-generator --help should tells you almost everything.... :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]