io.odysz.semantic.meta.SynSubsMeta Maven / Gradle / Ivy
package io.odysz.semantic.meta;
import static io.odysz.common.LangExt.len;
import static io.odysz.common.Utils.loadTxt;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Set;
import io.odysz.module.rs.AnResultset;
import io.odysz.transact.sql.parts.Resulving;
/**
* syn_sbuscribe DDL
*
* @author Ody
*
*/
public class SynSubsMeta extends SemanticTableMeta {
final SynChangeMeta chgm;
public final String changeId;
// public final String domain;
// public final String entbl;
// public final String uids;
public final String synodee;
private String[] subcols;
public SynSubsMeta(SynChangeMeta chgm, String ... conn) {
super("syn_subscribe", conn);
changeId= "changeId";
synodee = "synodee";
this.chgm = chgm;
ddlSqlite = loadTxt(SynSubsMeta.class, "syn_subscribe.sqlite.ddl");
}
public String[] cols() {
// return new String[] {domain, entbl, synodee, uids};
return new String[] {changeId, synodee};
}
/**
* Generate values for parameter of Insert.values();
*
* @param subs row index not the same when return
* @param skips ignored synodes
* @return values
*/
public ArrayList> insubVals(AnResultset subs, Set skips) {
ArrayList> v = new ArrayList>(subs.getRowCount() - len(skips));
return v;
}
/**
* @return [changeId, synodee]
*/
public String[] insertCols() {
if (this.subcols == null)
// this.subcols = new String[] { domain, entbl, synodee, uids };
this.subcols = new String[] {changeId, synodee}; // FIXME TODO add "domain"
return subcols;
}
/**
*
* @param chlogs
* @return
* @throws SQLException
*/
public ArrayList
© 2015 - 2025 Weber Informatics LLC | Privacy Policy