org.hotrod.runtime.livesql.queries.DeleteFromPhase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hotrod-livesql Show documentation
Show all versions of hotrod-livesql Show documentation
HotRod is an ORM for Java, Spring and SpringBoot.
package org.hotrod.runtime.livesql.queries;
import org.hotrod.runtime.livesql.expressions.predicates.Predicate;
import org.hotrod.runtime.livesql.metadata.TableOrView;
public class DeleteFromPhase implements DMLQuery {
// Properties
private LiveSQLContext context;
private DeleteObject delete;
// Constructor
public DeleteFromPhase(final LiveSQLContext context, final TableOrView from) {
this.context = context;
this.delete = new DeleteObject();
this.delete.setFrom(from);
}
// Next stages
public DeleteWherePhase where(final Predicate predicate) {
return new DeleteWherePhase(this.context, this.delete, predicate);
}
// Preview
@Override
public String getPreview() {
return this.delete.getPreview(this.context);
}
// Execute
@Override
public void execute() {
this.delete.execute(this.context);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy