Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Sql: New 'Of' 'syntax'
Sql: New 'Of' 'syntax' [message #34611] Fri, 02 December 2011 00:20 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Recently I have found I am doing a lot of joins in SQL, which leats to pretty verbose 'syntax' to get columns in Select list:

Select(ID.Of(FOO), NAME.Of(FOO), SURNAME.Of(FOO),
       ID.Of(BAR), CODE.Of(BAR)).From(FOO).InnerJoin(BAR)...


after some thinking, I have introduced 'group synonym' for Of via function call, so now we can write:

Select(FOO(ID, NAME, SURNAME), BAR(ID, CODE)).From(FOO).InnerJoin(BAR)...

 
Read Message
Read Message
Read Message
Previous Topic: String & strlen optimization, force_inline in defs.h
Next Topic: CParser::GetSpacePtr
Goto Forum:
  


Current Time: Mon Apr 29 10:05:07 CEST 2024

Total time taken to generate the page: 0.02326 seconds