public <T> T unwrap(Class<T> clazz) { if (clazz.isInstance(this)) { return clazz.cast(this); } else { return namespace.unwrap(clazz); } }
public <T> T unwrap(Class<T> clazz) { if (clazz.isInstance(this)) { return clazz.cast(this); } else { return namespace.unwrap(clazz); } }
namespace.unwrap(IdentifierNamespace.class); final List<String> names = Arrays.asList(identifierNamespace.getId().names);
IdentifierNamespace idNs = ns.unwrap(IdentifierNamespace.class); final SqlIdentifier id = idNs.getId(); for (int i = 0; i < id.names.length; i++) {
public void validateDelete(SqlDelete call) { SqlSelect sqlSelect = call.getSourceSelect(); validateSelect(sqlSelect, unknownType); IdentifierNamespace targetNamespace = getNamespace(call.getTargetTable()).unwrap( IdentifierNamespace.class); validateNamespace(targetNamespace); SqlValidatorTable table = targetNamespace.getTable(); validateAccess(call.getTargetTable(), table, SqlAccessEnum.DELETE); }
public void validateDelete(SqlDelete call) { SqlSelect sqlSelect = call.getSourceSelect(); validateSelect(sqlSelect, unknownType); IdentifierNamespace targetNamespace = getNamespace(call.getTargetTable()).unwrap( IdentifierNamespace.class); validateNamespace(targetNamespace); SqlValidatorTable table = targetNamespace.getTable(); validateAccess(call.getTargetTable(), table, SqlAccessEnum.DELETE); }
if (namespace.isWrapperFor(TableNamespace.class)) { TableNamespace tableNamespace = namespace.unwrap(TableNamespace.class); final List<String> names = tableNamespace.getTable().getQualifiedName(); if ((datasetName != null)
final SqlValidatorNamespace ns = getNamespace(node); if (ns.isWrapperFor(IdentifierNamespace.class)) { IdentifierNamespace idNs = ns.unwrap(IdentifierNamespace.class); final SqlIdentifier id = idNs.getId(); for (int i = 0; i < id.names.size(); i++) {
public void validateUpdate(SqlUpdate call) { IdentifierNamespace targetNamespace = getNamespace(call.getTargetTable()).unwrap( IdentifierNamespace.class); validateNamespace(targetNamespace); SqlValidatorTable table = targetNamespace.getTable(); RelDataType targetRowType = createTargetRowType( table, call.getTargetColumnList(), true); SqlSelect select = call.getSourceSelect(); validateSelect(select, targetRowType); RelDataType sourceRowType = getNamespace(select).getRowType(); checkTypeAssignment(sourceRowType, targetRowType, call); validateAccess(call.getTargetTable(), table, SqlAccessEnum.UPDATE); }
public void validateUpdate(SqlUpdate call) { IdentifierNamespace targetNamespace = getNamespace(call.getTargetTable()).unwrap( IdentifierNamespace.class); validateNamespace(targetNamespace); SqlValidatorTable table = targetNamespace.getTable(); RelDataType targetRowType = createTargetRowType( table, call.getTargetColumnList(), true); SqlSelect select = call.getSourceSelect(); validateSelect(select, targetRowType); RelDataType sourceRowType = getNamespace(select).getRowType(); checkTypeAssignment(sourceRowType, targetRowType, call); validateAccess(call.getTargetTable(), table, SqlAccessEnum.UPDATE); }
getNamespace(select).unwrap(SelectNamespace.class);
getNamespace(select).unwrap(SelectNamespace.class);