class JDBCBranchQueries extends JDBCQueriesHelper implements BranchQueries {

    @Override
    public String branchInsertionStatement(int projectId, int ordinal, Commit parentCommit, Commit mergedInto) {
        String parentCommitQuery = parentCommit == null ? null : "(" + commitQueries.idFromShaQuery(projectId, parentCommit.sha) + ")";
        String mergedIntoQuery = mergedInto == null ? null : "(" + commitQueries.idFromShaQuery(projectId, mergedInto.sha) + ")";
        return "INSERT INTO branch (project_id, ordinal, parent_commit, merged_into) VALUES ('"
                + projectId + "', '" + ordinal + "', " + parentCommitQuery + ", " + mergedIntoQuery
                + ") ON CONFLICT DO NOTHING;";
    }

    public  JDBCBranchQueries(CommitQueries commitQueries, SmellQueries smellQueries);

}