private void setDefaultValue(Column cl) throws SQLException, IOException { String tn = cl.getTable().getName(); String ntn = escapeIdentifier(tn); List<String> arTrigger = new ArrayList<String>(); setDefaultValue(cl, ntn, arTrigger); for (String trigger : arTrigger) { exec(trigger, true); } }
@Override public Object handleRowError(Column cl, byte[] bt, Location location, Exception ex) throws IOException { if (cl.getType().isTextual()) { Logger.logParametricWarning(Messages.INVALID_CHARACTER_SEQUENCE, cl.getTable().getName(), cl.getName(), new String(bt)); } throw new IOException(ex.getMessage()); } });
private String getExpression(Column cl) throws IOException { PropertyMap map = cl.getProperties(); Property exprp = map.get(PropertyMap.EXPRESSION_PROP); if (exprp != null) { Table tl = cl.getTable(); String expr = SQLConverter.convertPowOperator((String) exprp.getValue()); for (Column cl1 : tl.getColumns()) { expr = expr.replaceAll("\\[(?i)(" + Pattern.quote(cl1.getName()) + ")\\]", "newrow.$0"); } return expr; } return null; }
defaulT.toString().trim().endsWith(")") && defaulT.toString().indexOf("(") > 0; if (defaultIsFunction) { metadata.columnDef(cl.getTable().getName(), cl.getName(), defaulT.toString()); cl.getTable().getName()); } else { if (defFound != null && !defaultIsFunction) { metadata.columnDef(cl.getTable().getName(), cl.getName(), defFound.toString()); && defaulT.toString().length() > cl.getLengthInUnits()) { Logger.logParametricWarning(Messages.DEFAULT_VALUES_DELIMETERS, "" + defaulT, cl.getName(), cl.getTable().getName(), "" + cl.getLengthInUnits());
@Override public void postTableLoadInit() throws IOException { super.postTableLoadInit(); // link up with the actual versioned column. it should have the same name // as the "value" column in the type table. Column versionedCol = getColumn().getTable().getColumn( getValueColumn().getName()); ((ColumnImpl)versionedCol).setVersionHistoryColumn((ColumnImpl)getColumn()); }
public ComplexBase(ComplexValue cv) { this(cv.getId(), cv.getComplexValueForeignKey().getColumn().getTable().getName(), cv.getComplexValueForeignKey().getColumn().getName()); }