Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 13309 webdav multiple files unique constraint #13347

Merged
merged 19 commits into from
Jan 11, 2018

Conversation

acurionedotcms
Copy link
Contributor

No description provided.

@@ -2310,6 +2318,58 @@ private void deleteInsertPermission(Permissionable permissionable, String type,
}
}

// Method to Insert a new Permission Reference, or if it exists, it will udpate it
private void upsertPermission(DotConnect dc1, String permissionId, Permissionable newReference, String type) throws DotDataException {
if (DbConnectionFactory.isH2()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same principle of a command to generate the sql based on the current db type, see below comment


//Update Parameters: Generate column = value pairs, used for the Update part
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < columns.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to change this for a command pattern, such as

interface UpsertCommand command = this.getUpsertCommand(dbType);

query = command.execute (table, StringUtil.merge(columns),
conditionalColumn,
StringUtil.merge(values));

@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment from dsilvam Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
@dotCMS dotCMS deleted a comment Jan 11, 2018
Copy link
Contributor

@jdotcms jdotcms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Job, kudos!!!

@dsilvam dsilvam merged commit 7b10af1 into master Jan 11, 2018
@dsilvam dsilvam deleted the issue-13309-Webdav-Multiple-Files-Unique-Constraint branch January 11, 2018 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants