Re: [gnome-db] GdaSqlAnyPart question
- From: Vivien Malerba <vmalerba gmail com>
- To: Daniel Espinosa <esodan gmail com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] GdaSqlAnyPart question
- Date: Wed, 15 Jun 2011 09:04:47 +0200
On 14 June 2011 23:33, Daniel Espinosa
<esodan gmail com> wrote:
Why GdaSqlAnyPart is recursive?
struct _GdaSqlAnyPart {
GdaSqlAnyPartType type;
GdaSqlAnyPart *parent; <<<<<<--------
};
Each "node" (or part) has a parent (as each GdaSql* structure inherits GdaSqlAnyPart). It's not recursivity, it's just like liked lists (GList or GSList) or trees where each node is linked to the others.
I'm trying to create Vala bindings and fails to parse GIR file because this. I'll try figure out how to make it to work. I plan to create Vala bindings automatically on compilation (just like GObject Introspection).
Is it really required or we can delete this recursive?
It is required, you can't change this (in the same way you can't remove the "next" attribute of a GSList).
Any way. I think that GdaSql* structs used to create SQL commands by hand can be used just for internal representation right? This is: remove from public API to improve some automatic bindings.
Yes, I think it's safe to remove that part of the API from the bindings. In fact the GdaSqlBuilder API was created to avoid having to use directly the GdaSql* structures. What you'll lose however is the ability to inspect a GdaStatement's contents (for example after parsing some SQL), but it's usually not a big deal anyway.
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]