Skip to content

Fix for #127, 'escape' the selectorName #128

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

Merged
merged 1 commit into from
Jan 22, 2014
Merged

Conversation

wjzijderveld
Copy link

Need to escape selectorNames with specials tokens in it.
Jackalope Doctrine DBAL seems happy with this change.

@dbu
Copy link
Member

dbu commented Jan 22, 2014

should we be worried that jackalope-doctrine-dbal did work even without this fix? it would let people write invalid things and then be confused when trying to switch to jackalope-jackrabbit. should we open an issue on jackalope-doctrine-dbal to refuse names that are not escaped?

@@ -386,8 +386,8 @@ public function testLengthOperandOnEmptyProperty()
SELECT data.*
FROM [nt:unstructured] AS data
WHERE
data.empty-value IS NOT NULL
AND LENGTH(data.empty-value) < 1
data.[empty-value] IS NOT NULL
Copy link
Member

Choose a reason for hiding this comment

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

so the - is a special character too? did you test that with jackrabbit?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, when I ran the tests locally it errored over this query as well.

@wjzijderveld
Copy link
Author

Not sure, I couldn't actually find a list with special tokens for this. In JSR-283 they don't mention the brackets for every operand.
And if it is a problem, the problem probably is in phpcr-utils, in the Sql2QomQueryConverter.

dbu added a commit that referenced this pull request Jan 22, 2014
Fix for #127, 'escape' the selectorName
@dbu dbu merged commit 443c545 into phpcr:master Jan 22, 2014
@dbu
Copy link
Member

dbu commented Jan 22, 2014

created phpcr/phpcr-utils#101

@dbu
Copy link
Member

dbu commented Jan 22, 2014

thanks a lot @wjzijderveld !

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.

2 participants