Statement Types

I can now determine each SQL statement type that I want to build. Each type will be represented by a class, each extending the abstract sqlStatement class. These classes will be made up of multiple instances of sqlRelationship and sqlComponent classes. The statement classes will verify each object passed to determine if it “fits” within the construct of it’s particular statement type.  For example, a SELECT statement must contain an sqlSelectExpression but an INSERT statement cannot.  A very basic breakdown is shown below.

  • SELECT
    • sqlSelectExpression: (1,*)
    • sqlTableReference: (1,*)
    • sqlConditionGroup: (0,1)
    • sqlSorter: (0,*)
  • INSERT
    • sqlSetExpression: (1,*)
    • sqlTableReference: (1)
  • UPDATE
    • sqlSetExpression: (1,*)
    • sqlTableReference: (1,*)
    • sqlConditionGroup: (0,1)
    • sqlSorter: (0,*)
  • REPLACE
    • sqlSetExpression: (1,*)
    • sqlTableReference: (1)
  • DELETE
    • sqlTableReference: (1)
    • sqlConditionGroup: (0,1)
    • sqlSorter: (0,*)

Leave a Reply