提交 859f83a7 编写于 作者: T tristaZero

add isCipherColumn()

上级 f5d0e81f
......@@ -182,6 +182,20 @@ public final class EncryptRule implements BaseRule {
return tables.get(logicTable).getCipherColumns();
}
/**
* Is cipher column or not.
*
* @param columnName column name
* @return cipher column or not
*/
public boolean isCipherColumn(final String columnName) {
Collection<String> result = new LinkedList<>();
for (EncryptTable each : tables.values()) {
result.addAll(each.getCipherColumns());
}
return result.contains(columnName);
}
/**
* Get assisted query column.
*
......
......@@ -130,9 +130,7 @@ public final class EncryptTable {
public Collection<String> getCipherColumns() {
Collection<String> result = new LinkedList<>();
for (EncryptColumn each : columns.values()) {
if (each.getPlainColumn().isPresent()) {
result.add(each.getCipherColumn());
}
result.add(each.getCipherColumn());
}
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册