SubSonic Forums
All Your Database Are Belong To Us

Where Exists

Latest post 11-19-2008 10:19 AM by DiverKas. 3 replies.
  • 11-18-2008 10:05 AM

    • yobi21
    • Not Ranked
    • Joined on 08-03-2007
    • Posts 2

    Where Exists

    It doesn't appear there is any direct support for 'exists' clauses.  I realize that this can be handled with a stored procedure or the InlineQuery tool, but I am wondering why 'Exists' aren't directly supported as part of the where expression tree.

    Filed under: , ,
  • 11-18-2008 9:43 PM In reply to

    Re: Where Exists

    I'm going to venture a guess that since "Exists" is a database function, it's not implemented as there is no implemention of functions in SubSonic. This could simply be because some functions are database specific and SubSonic tries to abstract the underlaying database type.

     


    ------------------
    Boyan Kostadinov
    Blog: http://blog.tech-cats.com
    Resume: http://boyan.tech-cats.com/resume
    Portfolio: http://boyan.tech-cats.com/portfolio

  • 11-19-2008 9:39 AM In reply to

    • yobi21
    • Not Ranked
    • Joined on 08-03-2007
    • Posts 2

    Re: Where Exists

    Correct me if I'm wrong but 'Exists' and 'IN' are very similar functional structures and SubSonic supports 'IN' queries.  Additionally, I believe the 3 major DB's (SqlServer, Oracle, and MySql) all support 'EXISTS' so it .

  • 11-19-2008 10:19 AM In reply to

    Re: Where Exists

    yobi21:

    Correct me if I'm wrong but 'Exists' and 'IN' are very similar functional structures and SubSonic supports 'IN' queries.  Additionally, I believe the 3 major DB's (SqlServer, Oracle, and MySql) all support 'EXISTS' so it .

     

    Similar yes, performance is another matter.  EXISTS will outperform IN in SQL Server 2k+ and Oracle, whereas in MySQL, it will not. 

    Software Is Like Cathedrals: First we build 'em, then we pray.
Page 1 of 1 (4 items) | RSS