Skip to content

Commit

Permalink
Enhancements to _MySQLPlugIn.MySQLExpression including JOIN clause su…
Browse files Browse the repository at this point in the history
…pport.

Adds JOIN clause support. MySQL supports Inner, Left Outer and Right Outer Joins, however
the default EOSQLExpression was only useful for Inner Joins when used with MySQL. Now
You can set Left Outer or Right Outer from the menu in EntityModeler. Left Outer is commonly
useful on optional to-one relationships ensureing that tables that do not have the relationship
are included in the query when Inner Join would have omitted the tables due to Join condition.
When more than one table is involved in a SELECT, the FROM clause will have MySQL JOIN syntax
instead of the table list and a bunch of WHERE conditions that were formerly used to specify
table Joins.

In addition, Identity quoting is now supported and is useful for table or field names that are
reserved words in MySQL. It is enabled with the property
	com.webobjects.jdbcadaptor.MySQLExpression.enableIdentifierQuoting = true

Finally, for those who hate debugging SQL that is all on one line, you can set the following
property, generally useful in development, to have each clause of the SQL statement separated
by '\n\t'
	com.webobjects.jdbcadaptor.MySQLExpression.enableLinePerClause = true

Credit to those who wrote PostgresqlExpression on which the Join clause generation is based.
  • Loading branch information
kierankelleher committed May 25, 2012
1 parent a98037e commit 1aff812
Showing 1 changed file with 331 additions and 32 deletions.
Loading

0 comments on commit 1aff812

Please sign in to comment.