So i tried this:
<Member name="HasKey" signature="string" > <RawSql source="MyXmlColumn.exist('//Key[text()="{!key-value!}"]')=1"/> </Member>
This doesn't work because genome normally creates a stored procedure for this call and submit my value-string as additional parameter. But the exist() method only accepts string literals, not parameters. After some research i found out, that instead of the exclamation mark ("!") there is a secret sign, the hash-symbol ("#"), which causes Genome to add the value as literal - now the code work's well.
The solution for the parameter problem is the hash-symbol (#), here's the working code:
<Member name="HasKey" signature="string" > <RawSql source="MyXmlColumn.exist('//Key[text()="{#key-value#}"]')=1"/> </Member>
No comments:
Post a Comment