Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Jul 20, 2024
1 parent e5ccb99 commit be82401
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 306 deletions.
12 changes: 10 additions & 2 deletions src/main/java/org/citydb/sqlbuilder/common/SqlObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,23 @@
import org.citydb.sqlbuilder.SqlBuildOptions;
import org.citydb.sqlbuilder.SqlBuilder;
import org.citydb.sqlbuilder.literal.Placeholder;
import org.citydb.sqlbuilder.util.PlaceholderHelper;

import java.util.ArrayList;
import java.util.List;

public interface SqlObject {
void accept(SqlVisitor visitor);

default List<Placeholder> getPlaceholders() {
return PlaceholderHelper.newInstance().getPlaceholders(this);
List<Placeholder> placeholders = new ArrayList<>();
accept(new SqlWalker() {
@Override
public void visit(Placeholder placeholder) {
placeholders.add(placeholder);
}
});

return placeholders;
}

default String toSql(SqlBuildOptions options) {
Expand Down
304 changes: 0 additions & 304 deletions src/main/java/org/citydb/sqlbuilder/util/PlaceholderHelper.java

This file was deleted.

0 comments on commit be82401

Please sign in to comment.