Thanks for the information.

Regards
Chetan Chaphekar

On Mon, Sep 19, 2011 at 10:16 PM, Jason Meckley <[email protected]>wrote:

> you cannot embed the C# function into sql. what you can do is
> 1. implement the functionality within an HQL keyword for each database you
> support
> 2. load the results into memory and then perform the C# function on each
> object.
>
> i'm not sure of the specifics, but I have seen other talk about this. this
> way your hql queries can reader
> "from entity where MyFunction(property) = x"
> you can then map MyFunction to driver specific sql statements
> so you may have 4 implementations (MS Sql, SQLite, Oracle & Postgres) but
> the HQL is DB agnostic.
>
> option 2 will work if the amount of objects returned from the database is a
> reasonable size. you wouldn't want to take this approach if you needed to
> load 1000s of entities.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nhusers/-/bq6aWRkobwIJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to