![]() |
![]() |
![]() |
Libgnomedb Reference Manual | ![]() |
---|
Each query can contain some fields which make the query's contents. There are different types of query fields, and each type corresponds to a class and inherits the GnomeDbQfield class.
Any query field can be visible or hidden. A visible field will appear in the entity corresponding to the query (in case of SELECTion queries anyway), and invisible fields are used by other query fields.
Also, any query field can be internal or not. An internal field is one used by the library itself, and should never be known to the user of the library (so it is just mentionned here for completeness).
Some fields can represent more than one value (usefull for IN operators for example).
The different types of query fields are:
GnomeDbQfAll: represents all the fields of an entity which itself is represented through a GnomeDbTarget (the SQL notation is "entity.*")
GnomeDbQfField: represents one field of an entity which itself is represented through a GnomeDbTarget (the SQL notation is "entity.field")
GnomeDbQfValue: represents a value, which can also be a parameter (in this case the parameter may or may not have a default value)
GnomeDbQfFunc: represents the result of a function (a GnomeDbServerFunction object) applied to one or more query field object(s) of the same query
GnomeDbQfAgg: represents the result of an aggregate (a GnomeDbServerAggregate object) applied to a query field object of the same query
GnomeDbQfSelect: represents the result of the execution of a whole SELECTion query. It represents a list but may return a single value as well
GnomeDbQfLink: represents one field of an entity, that entity not being represented through a GnomeDbTarget object. This kind of query field is used to link sub-queries to their parent query in complex queries
GnomeDbQfValues: represent a list of values, which cannot be parameters