All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hotrod.runtime.livesql.queries.InsertColumnsPhase Maven / Gradle / Ivy

There is a newer version: 4.8.1
Show newest version
package org.hotrod.runtime.livesql.queries;

import java.util.List;

import org.hotrod.runtime.livesql.expressions.ComparableExpression;
import org.hotrod.runtime.livesql.queries.select.Select;

public class InsertColumnsPhase {

  // Properties

  private LiveSQLContext context;
  private InsertObject insert;

  // Constructor

  public InsertColumnsPhase(final LiveSQLContext context, final InsertObject insert) {
    this.context = context;
    this.insert = insert;
  }

  // Next stages

  public InsertValuesPhase values(final List values) {
    this.insert.setValues(values);
    return new InsertValuesPhase(this.context, this.insert);
  }

  public InsertSelectPhase select(final Select select) {
    this.insert.setSelect(select.getCombinedSelect().getLastSelect());
    return new InsertSelectPhase(this.context, this.insert);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy