online.sanen.unabo.sql.pipe.CreateAndInsertSqlPileline Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unabo Show documentation
Show all versions of unabo Show documentation
Unabo, the Java™ progressive ORM framework
The newest version!
package online.sanen.unabo.sql.pipe;
import java.util.Collection;
import online.sanen.unabo.api.Handel;
import online.sanen.unabo.api.structure.ChannelContext;
import online.sanen.unabo.api.structure.enums.ProductType;
import online.sanen.unabo.template.SqlTemplate;
/**
*
*
* @author LazyToShow
* Date: 2018/09/14
* Time: 10:09:06
*/
public class CreateAndInsertSqlPileline implements SimplePileline,Handel {
String newTableName;
public CreateAndInsertSqlPileline(String newTableName) {
this.newTableName = newTableName;
}
@Override
public Object handel(ChannelContext structure, Object product) {
String modifier = ProductType.applyTableModifier(structure.productType());
structure.getSql().insert(0, "CREATE TABLE " + modifier + newTableName + modifier + " AS ");
Collection
© 2015 - 2024 Weber Informatics LLC | Privacy Policy