XML column in SQL 2005

Posts   
 
    
Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 28-Oct-2005 18:04:14   

I know in 2005.1 it supports SQL 2005 xml column datatype. But does it support creating predicates that search those column? I didnt read anything in the manual about it, so im going to assume no. But i figured i would ask as maybe im missing something.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 28-Oct-2005 18:25:38   

An Xml type maps to a string type. No XQuery predicates are produced if that was your question wink

Frans Bouma | Lead developer LLBLGen Pro
Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 28-Oct-2005 18:40:10   

Yes that answers my question simple_smile

Are you planning on supporting this at all in the future?

So this brings me to my next question. Is it possible to tack on some sql to a predicate?

For instance, lets say i got a xml column in a table and i create a predicate to find rows with id 1, 2 and 3 which i can do with llblgen predicates. But i also want to create a predicate for searching in an XML column. I Could do this by tacking on a sql string to the llbgen created predicate expression. Is this possible? smile

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 28-Oct-2005 21:26:20   

It is, you can write your own IPredicate implementation and emit the XQuery statements simple_smile If you use a field compare value style predicate, just give it the same enum value as the fieldcomparevalue predicate. See the fieldcomparevaluepredicate sourcecode.

Frans Bouma | Lead developer LLBLGen Pro
Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 28-Oct-2005 21:57:58   

Wonderful! smile

Thanks for the help!