[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: cdb/doc cdb.views.txt,1.1,1.2
From: |
Patrick Walsh <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: cdb/doc cdb.views.txt,1.1,1.2 |
Date: |
Thu, 14 Feb 2002 17:55:31 -0500 |
Update of /cvsroot/phpgroupware/cdb/doc
In directory subversions:/tmp/cvs-serv15896
Modified Files:
cdb.views.txt
Log Message:
updated
Index: cdb.views.txt
===================================================================
RCS file: /cvsroot/phpgroupware/cdb/doc/cdb.views.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** cdb.views.txt 14 Feb 2002 07:51:02 -0000 1.1
--- cdb.views.txt 14 Feb 2002 22:55:28 -0000 1.2
***************
*** 37,39 ****
--- 37,71 ----
CREATE TEMPORARY TABLE tbl AS (SELECT blah blah)
+ Alright, so we have two phases in making a view. Make that three
phases.
+ First, a temporary table is created based on the "fields" and "filter" stuff.
+ Then the data is whittled down to what's going to be displayed by grouping,
+ sorting, checking permissions, and limiting data to what's going to be
output.
+ The third phase is applying the data to the view type and outputing the
+ html.
+
+ Alright, now we just have to figure out the mechanisms for storing and
+ translating all this stuff. The key is to create a sensible API that can also
+ be used for retrieving groups of records for other reasons... like searches
+ and such.
+
+ Field Identification
+ --------------------
+ table.field
+
+ ...okay, but this only works for standard fields. There are some fields that
+ will need to be treated specially. For example, the phone, address, and
+ category fields can't be joined normally. We'll just have to create some
special field identifiers that are treated specially when we're creating our
sql statement.
+
+ Filter Specification
+ --------------------
+ Well, I guess we can use good old sql stuff for the filter specification.
+ There just aren't many other choices that make sense. Reverse polish notation
+ would allow us to avoid parenthesis, but I think that that would confuse too
+ many people. So... a filter will look like this:
+
+ (table.field > 4) or (table.field < 1)
+
+ Of course this will be more sophisticated for us to parse in figuring
out
+ our sql query. Particularly since we need to sanity check it and deal with
+ our special fields. Not to mention figuring out the joins.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: cdb/doc cdb.views.txt,1.1,1.2,
Patrick Walsh <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: cdb/inc class.cdb_contact_internet.inc.php,NONE,1.1 class.cdb_phone.inc.php,1.3,1.4
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.db_mssql.inc.php,1.20,1.20.2.1
- Previous by thread:
[Phpgroupware-cvs] CVS: cdb/inc class.cdb_contact_internet.inc.php,NONE,1.1 class.cdb_phone.inc.php,1.3,1.4
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc class.db_mssql.inc.php,1.20,1.20.2.1
- Index(es):