com.fdsapi.arrays
Class ConditionalParser

java.lang.Object
  |
  +--com.fdsapi.arrays.ConditionalParser

public class ConditionalParser
extends java.lang.Object

This class parses individual where clauses within the where clauses such as 'where col0='steve' && lname in ('souza'). See the main method for examples. It is used by ArraySQL.



View Code


Constructor Summary
ConditionalParser(java.lang.Object[][] data, ArrayFilter arrayFilter)
           
 
Method Summary
 void addConditional(java.lang.String conditional)
          Add a conditional to be parsed such as col0='souza'
 java.lang.String getLeft()
           
 java.lang.String getOperator()
          Returns the operator for the conditional.
 java.lang.String getRight()
          Returns the expression to the right of the conditional.
static void main(java.lang.String[] args)
          Test code for this class.
 void parse(java.lang.String conditional)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConditionalParser

public ConditionalParser(java.lang.Object[][] data,
                         ArrayFilter arrayFilter)
Method Detail

parse

public void parse(java.lang.String conditional)

getLeft

public java.lang.String getLeft()

getOperator

public java.lang.String getOperator()
Returns the operator for the conditional. For example in, =, !=


getRight

public java.lang.String getRight()
Returns the expression to the right of the conditional. 'souza' in the following example: col0='souza'


addConditional

public void addConditional(java.lang.String conditional)
Add a conditional to be parsed such as col0='souza'


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)
Test code for this class. Use the view code link above to view it.