1- Add query logging/profiling (also something like
2  http://blog.talbott.ws/articles/2006/05/17/querytrace-my-first-official-rails-plugin
3  ?)
4
5- Remove Horde_Rdo::CUSTOM, allow custom 'query' arrays on all
6  relationships as possible, and have a new type (not relationships,
7  but mixins? extra_fields? that can be defined by a Query and that
8  allows the flexibility of CUSTOM without being smooshed into
9  relationships.
10
11- Allow Horde_Rdo_Query objects to be turned into just WHERE (or JOIN)
12  clauses
13
14- Allow relationships to be defined by Query objects?
15
16- allow for using php.ini-set database configs for security, or perhaps
17  $ENV variables - see Ilia's security presentation. Example php.ini dsn:
18  [PDO]
19  pdo.dsn.MYDB="odbc:SAMPLE"
20
21- Ensure that Rdo_Base objects are serializable
22
23- Charset support: support a database charset config parameter, and
24  convert field values to the requested client charset.
25
26- Implement named queries
27  (http://www.tonybibbs.com/article.php/PropelDAO)
28
29- Support composite primary keys. Discussion of surragate vs. natural
30  primary keys: http://www.bcarter.com/intsurr1.htm
31
32- Saving arrays, hashes, and other non-mappable objects in text
33  columns ?
34
35- Allow setting $key field explicitly (not just by overriding the
36  model)
37
38- Some check for whether or not an object is new (has been saved to
39  the backend yet)?
40
41- Freezing: implement $frozen variable for Rdo objects for when the
42  object has been deleted, or similar?
43
44- Caching hooks - not required, but allow caching of models, query
45  generation, etc. with a passed-in Cache object.
46
47- Work on the basic Horde_Support_Inflector enough that it supports
48  standard Horde table naming.
49
50- Use fetchObject (at least in PDO drivers) for performance?
51
52- Eager loading of MANY relationships - see
53  http://darwinweb.net/article/Optimizing_And_Simplifying_Limited_Eager_Loading_In_Activerecord
54
55- Two-query eager loading of a specific relationship (load the main
56  object in one query, then all foreign-key objects in a 2nd, and join
57  the two.
58
59- Implement eager loading with several relationships to the same table.
60
61- Observer hooks: beforeDelete, afterDelete, beforeUpdate, afterUpdate, beforeCreate, afterCreate
62
63- Support fixtures (YAML?) for testing
64
65- Test suite for Rdo:
66  http://www.ds-o.com/archives/64-Adding-Database-Tests-to-Existing-PHPUnit-Test-Cases.html
67  http://mikenaberezny.com/archives/79
68  http://www.phpunit.de/browser/phpunit/branches/3.2/PHPUnit/Extensions/Database/Operation
69
70
71Links:
72http://www.analysisandsolutions.com/code/dates.htm
73http://www.qcodo.com/
74http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html
75http://www.phpdoctrine.com/
76http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html
77http://www.analysisandsolutions.com/presentations/portability/slides/toc.htm
78http://fuzzyblog.com/archives/2006/08/12/sql_calc_found_rows-and-faster-count-alternatives/
79http://phplens.com/phpeverywhere/?q=node/view/231
80http://pooteeweet.org/blog/688
81http://pooteeweet.org/blog/711
82http://pooteeweet.org/blog/809
83http://schlitt.info/applications/blog/?/archives/528-Object-relation-mapping-in-eZ-Components.html
84http://nubyonrails.com/articles/2005/12/27/dump-or-slurp-yaml-reference-data
85http://db.apache.org/ddlutils/
86http://www.thespanner.co.uk/2007/07/23/php-mysql-tips/
87http://www.sqlalchemy.org/
88
89
90things that can be specified on relationships:
91className - only if it can't be inferred from the field name
92foreignKey - also if can't be inferred
93criteria - restrict associations by more than foreign keys
94dependent - if true, associated object is destroyed when main object is
95order - of associated objects?
96
97
98- cascading deletes/updates: ?
99
100
101- Single table inheritance ?
102
103::
104
105  class Company extends Rdo
106  class Firm extends Company
107  class Client extends Company
108  class PriorityClient extends Client
109
110  CREATE TABLE companies (
111    id int(11) unsigned NOT NULL AUTO_INCREMENT,
112    client_of int(11),
113    name varchar(255),
114    type varchar(100),
115    PRIMARY KEY (id)
116  );
117
118  CREATE TABLE people (
119    id int(11) unsigned NOT NULL AUTO_INCREMENT,
120    name text,
121    company_id text,
122    PRIMARY KEY (id)
123  );
124
125
126potential field parameters:
127size
128maxsize
129fixedsize
130numeric
131null
132canbenull
133default
134canhavedefault
135unsigned
136canbeunsigned
137realname
138description
139type
140base
141
142
143>> Here I disagree. To me the key point of a DBAL compared to just a DBL (database layer) is that it provides almost everything necessary to manually build portable SQL. This means that instead of passing of an array that magically builds my SQL, the user remains in the driver seat and is provided with a rich enough API to build almost everything in the SQL spec (and a bit beyond that) in a portable manner.
144
145> What you want to say is that a DBAL must additionally provide:
146> a Query Builder, maybe extendable by the driver to provide RDBMS specific options/methods
147
148no .. not a query builder .. that would imply that you just pass of some data and it magically constructs the entire SQL for you .. that is the job for some OO<->SQL tool. what I think a DBAL should provide is methods to generate pieces of SQL that are then assembled by the user.
149
150so for example setLimit() would either return or automatically append to an supplied SQL string. same applies to field abstraction, you still call quote() to get the necessary SQL fragment to embedd in your SQL statement.
151
152
153
154Pierre Minnieur wrote:
155> Must a DBAL then provide OO access to executed statements, prepared statements and results sets, too (like PDO does)?
156
157absolutely .. a DBAL also needs to cover the reading part. so you need to have a portable way to read data from the database (including data type abstraction, handling of trimming off empty spaces etc).
158