/*
 * Copyright (c) 2009-2013 Topi Nieminen
 */
package fi.tnie.db.expr;

public class MySQLDeleteStatement
	extends DeleteStatement {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2492700739356278591L;

	/**
	 * No-argument constructor for GWT Serialization
	 */
	protected MySQLDeleteStatement() {
	}
	
	public MySQLDeleteStatement(TableReference tref, Predicate p) {
		super(tref, p);		
	}		
	
	@Override
	public void traverseContent(VisitContext vc, ElementVisitor v) {
		SQLKeyword.DELETE.traverse(vc, v);		
		SQLKeyword.FROM.traverse(vc, v);		
		TableReference tref = getTarget();				
		SchemaElementName n = tref.getTableName();
		n.traverse(vc, v);		
		MySQLKeyword.USING.traverse(vc, v);				
		tref.traverse(vc, v);	
		getWhere().traverse(vc, v);
	}
}

@@ -482,17 +482,76 @@
 tor v) %7B
+%09%09%0A%09%09// DELETE FROM R USING %3Cschema%3E.%3Ctable%3E R WHERE ...%0A%09%09
 %0A
-
 %09%09SQLKey
@@ -658,60 +658,79 @@
 t();
-%09%09%09%09%0A%09%09SchemaElementName n = tref.getTableName(
+%0A%09%09OrdinaryIdentifier cn = tref.getCorrelationName(v.getContext()
 );%0A%09%09
+c
 n.tr

Fix MySQLDeleteStatement