[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] MySQL API
From: |
Benoit Hamet |
Subject: |
Re: [Phpgroupware-developers] MySQL API |
Date: |
Mon, 17 Jan 2005 17:22:34 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041125) |
Heya Thomas,
I try to answer to some of your question :
First the api is not limited to MySQL but to a lot's of other DB layer.
Thus this limits the layer to the "common denominator" for each DB...
For generating tables_current.inc.php you can take a look at the
etemplate app, DBtools (on the top right corner), It's a "good" start point.
Thomas Guignard wrote:
Hi all
Is there any documentation on the database abstraction layer used in phpgw?
Not sure if it is what you want, but take a look into
phpgw_dir/setup/doc/setup3.txt.
I'm trying to understand the table creation commands in
setup/tables_current_inc.php
Specifically, I'd like to know
- the syntax for a table row of type "enum"
AFAIK the "enum" type is never really needed, and don't have a syntax
(in php you can use define ('MY_ENUM_1',1); for example ) in this layer
(and it's not alway available).
- is 'type' => 'bool' valid?
Don't seems to be valid (not supported by all DB ?)
- is 'type' => 'blob' valid?
It seems ok (AFAIS there is 3 apps : news_admin forum and comics which
use it).
- the syntax for the index definition (guess it's in the 'ix' =>
array(), declaration, but how?)
if you use 'ix' => array('id_fiche','date_debut','id_projet','statut'),
then you have 4 indexes, if you put something like :
'ix' => array('owner', 'access', 'contact_type_id', array('contact_id',
'cat_id', 'contact_type_id'))
then still 4 indexes, but one is build from 3 columns (Hope you
understand what this mean !) and so, will issue a INDEX('contact_id',
'cat_id', 'contact_type_id') in SQL
Please not that the DB layer is changing from .16 to .18 (or 1.0), I
don't really know what this really changes, but you need to be carefull :).
Regards,
Caeies