Re: [gnome-db] DataBase as a Gee Collection of Collections

2011/12/23 Vivien Malerba <vmalerba gmail com>:
> On 22 December 2011 22:01, Daniel Espinosa <esodan gmail com> wrote:
>> I'm planning to create an implementation of interfaces to access a
>> database with classes and interfaces from Gee.
>> This thread is planned to collect comments, suggestions and track
>> implementations. May be I can add a link on when I have
>> something functional and solid plans.
>> First Concepts:
>> * A database is a collection of schemas and other objects
>> * Each schema have a collection of tables, views and other objects
>> that have Rows
>> * A Row is a collection of values with different types and with
>> * REFERENCEBY and REFERENCE attributes can be used to get a collection
>> of related values from other table collection
>> First implementation ideas:
>> * Define Interfaces and implementator classes , like Gee does, to
>> allow any one to access any kind of data. For now current GDA's
>> infrastructure will be used.
> Libgda reports all this information in a GdaMetaStruct object.
> Regards,
> Vivien

I've commited first interfaces as general concept. They uses Vala
Generics in order to help any other to implement them whitout a fixed
implementation. Added interfaces[1] include DbCollection (Database
abstraction as a collection of collections), DbSchema, DbTable,
DbRecord and DbField.

Derived class will use GdaMetaStruct on demand to retrieve database
information and expose as expected by the interfaces.

May be I'll propose a new Gee interface called Selectable, where
implementors must define a 'select (SqlWhere)' method with SqlWhere as
a tree of SqlExpressions to define simple to complex conditions. These
could be the first steps to add LinQ support to Vala.

On GDA implementations I plan to use GdaSqlBuilder and SqlStatements
to implement Selectable interface and include as a pre-
requisite for DbTable interface.


Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (en trámite, pero para los
cuates: LIBRE)

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