XQuery

Posts   
 
    
Posts: 72
Joined: 11-Aug-2006
# Posted on: 09-May-2012 23:31:17   

LLBLGen Pro Driver Version 3.1 , SQL 2008, .NET 4.0

I have read a few posts about XQuery with linq. does it now support XQuery Natively? If not, what is the best way to implement it ( server side query )

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 10-May-2012 08:54:17   

No, we don't support XQuery. You have to do your own Database function and then use a DBFunctionCall to call it from your generated code.

David Elizondo | LLBLGen Support Team
Posts: 72
Joined: 11-Aug-2006
# Posted on: 10-May-2012 23:29:38   

daelmo wrote:

No, we don't support XQuery. You have to do your own Database function and then use a DBFunctionCall to call it from your generated code.

Could you give me an example of how to do that? I see there are functionmapper classes and expression to use - just wondering what the best current one would be for Xquery equivalent?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 11-May-2012 08:37:15   

You have typed XML on your DB, right? And you want to run some query() functions over there. How would these functions would look like in your SQL code?

Once you have that figured out, you can create a DB function that takes some parameters and return some value. Then you just have to call that function from code. See the docs for examples.

David Elizondo | LLBLGen Support Team