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 column Ids now escaped
Sql column Ids now escaped [message #35350] Sat, 04 February 2012 15:24 Go to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
SqlId column names are now escaped when inserted to SqlExp and when they actually do contain valid sql IDs (or valid of/as combinations). This is to support things like

Select(SqlId("FROM")).From(TABLE)

...

Note that this changes a way how SqlId::Of and SqlId::As are represented inside SqlId (some special <32 character is inserted instead of '.' for Of, for As there were special characters before, just other). Other than that, SqlId::ToString still returns unescaped id and should be backwards compatible.

MySql is by default using '`' instead of " to do escapes, this is supported.

If SqlId does not contain valid sql id, it is not escaped. This is done to support things like:

Select(SqlId("*")).From(TABLE)

which seems to be used in existing code.

In related news, I have changed SqlAll() to return SqlId instead of SqlVal, which makes possible

Select(SqlAll().Of(TABLE)).From(TABLE)

which translates to

select TABLE.* from TABLE
 
Read Message
Read Message
Previous Topic: Refactored Value coming....
Next Topic: Settings and multiple ide instances
Goto Forum:
  


Current Time: Fri Jun 07 10:51:03 CEST 2024

Total time taken to generate the page: 0.02059 seconds