com.clickzetta.platform.client.SingleRowCreate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
package com.clickzetta.platform.client;
import com.clickzetta.platform.client.api.Row;
import com.clickzetta.platform.client.api.Stream;
public interface SingleRowCreate extends RowCreate {
/**
* create InsertRow.
*
* @return
*/
Row createInsertRow();
/**
* create InsertIgnoreRow.
*
* @return
*/
Row createInsertIgnoreRow();
/**
* create UpdateRow.
*
* @return
*/
Row createUpdateRow();
/**
* create UpsertRow.
*
* @return
*/
Row createUpsertRow();
/**
* create DeleteRow.
*
* @return
*/
Row createDeleteRow();
/**
* create DeleteIgnoreRow.
*
* @return
*/
Row createDeleteIgnoreRow();
/**
* create stream row with target operator.
*
* @param operator
* @return
*/
default Row createRow(Operator operator) {
Row row = null;
switch (operator) {
case INSERT:
row = createInsertRow();
break;
case INSERT_IGNORE:
row = createInsertIgnoreRow();
break;
case UPDATE:
row = createUpdateRow();
break;
case UPSERT:
row = createUpsertRow();
break;
case DELETE:
row = createDeleteRow();
break;
case DELETE_IGNORE:
row = createDeleteIgnoreRow();
break;
}
return row;
}
@Deprecated
default Row createRow(Stream.Operator operator) {
Row row = null;
switch (operator) {
case INSERT:
row = createInsertRow();
break;
case INSERT_IGNORE:
row = createInsertIgnoreRow();
break;
case UPDATE:
row = createUpdateRow();
break;
case UPSERT:
row = createUpsertRow();
break;
case DELETE:
row = createDeleteRow();
break;
case DELETE_IGNORE:
row = createDeleteIgnoreRow();
break;
}
return row;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy