phpgroupware-cvs
[Top][All Lists]
Advanced

[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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]