class TreeChildTermBuilder extends AbstractTermFragmentBuilder {
    public TreeChildTermBuilder(String termType, String name) {
        super(termType, name);
    }

    protected abstract String tableName();

    @Override
    public SqlFragments createFragments(String columnFullName, RDBColumnMetadata column, Term term) {<FILL_FUNCTION_BODY>}
}

        List<Object> id = convertList(column, term);

        String tableName = getTableName(tableName(), column);

        String[] args = new String[id.size()];
        Arrays.fill(args, "?");

        RDBColumnMetadata pathColumn = column
                .getOwner()
                .getSchema()
                .getTable(tableName)
                .flatMap(t -> t.getColumn("path"))
                .orElseThrow(() -> new IllegalArgumentException("not found 'path' column"));

        RDBColumnMetadata idColumn = column
                .getOwner()
                .getSchema()
                .getTable(tableName)
                .flatMap(t -> t.getColumn("id"))
                .orElseThrow(() -> new IllegalArgumentException("not found 'id' column"));

        PrepareSqlFragments fragments = PrepareSqlFragments.of();
        if (term.getOptions().contains("not")) {
            fragments.addSql("not");
        }

        return fragments.addSql(
                "exists(select 1 from", tableName, "_p join", tableName,
                "_c on", idColumn.getFullName("_c"), "in(", String.join(",", args), ")",
                "and", pathColumn.getFullName("_p"), "like concat(" + pathColumn.getFullName("_c") + ",'%')",
                "where", columnFullName, "=", idColumn.getFullName("_p"), ")"
            )
            .addParameter(id);

    
<no_super_class>