Object Oriented Filtering (OOF) - Dragan S. Pusonjic
Previous Table of Contents Next

Let’s consider cxWhereCond :

1)       Part I  
       “
order.customer_id = customer.customer_id” –  is the result of joining two tables;       As it is present at both select expressions  (it has to be present in order to SQL operating properly), we shall  name it the static part of  “where” clause and mark it as:

                         cxStaticWhereCond = “order.customer_id = customer.customer_id”

           2)       Part II  
                    “order_date >= 23/05/1995”  is the result of user’s request to solve a certain problem. It it the direct consequence of the problem     which  is to be solved. We shall name it the dynamic part of “where”  clause and mark it as:

               cxDynamicWhereCond = “order_date >= 23/05/1995”

 To sum up: Our cxWhereCond consists of two parts::

cxWhereCond =  ;
                                           cxStaticWhereCond ;
                                                + ;
                                          cxDynamicWhereCond

Part I, cxStaticWhereCond, has to be, in some way, provided by the user.  Part II may be performed with Vdf objects.
But, we may sometimes form some complicated expressions which may take part in “where” clause.

SELECT ;
                                    order. number_invoice ;
                                    order. order_date ;
                                    order.value_invoice ;
                                    order. payment ;
                                    customer. company_ name ;
                        FROM order, customer ;
                         WHERE ;
                                    order.customer_id = customer.customer_id  .AND.  ;
                                    order_date >= 23/05/1995 .AND. ;
                                    order.value_invoice >= (order.value_invoice + 1000)

We shold mark this third part with cxVarWhereCond. In order to solve this problem, Vdf object has been developed.
Vdf_var.

               

You may enter any expression which will return the string value, at the same time, satisfying the correctness of select command.
Our total expression for “where” condition is the following:

            cxWhereCond =  ;
                                            cxStaticWhereCond ;
                                                + ;
                                            cxDynamicWhereCond
                                               
+ :
                                            cxVarWhereCond

See also :

Advanced objects

Modify methods and properties


Variable 
In list
  
Or condition             

 


Variable
In list   
Or condition
   
 

 


Previous Table of Contents Next