Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Some Sql addidtions
Re: Some Sql addidtions [message #16586 is a reply to message #16562] |
Mon, 30 June 2008 09:15 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
unodgs wrote on Thu, 26 June 2008 08:56 | Recently I made possible to write select in select fields list:
SQL * ::Select(
ID,
NAME,
::Select(NAME, AGE).From(PARENTS).Where(KID_ID == ID),
PHONE
).From(KIDS)
..and conditions
SQL * ::Select(
X == Y,
NUMBER < 100,
).From(TABLE)
SqlNvl has now As() method so it's possible to write:
SQL * ::Select(
(QUANTITY * PRICE).As(FINAL_PRICE)
(NAME | SURNAME).As(FULL_NAME)
).From(PRICES)
It's also possible to write cases:
SQL * ::Select(
ID,
Case(AGE < 5, "Baby")
(Between(AGE, 5, 10), "Kid")
("Young man"),
NAME
.From(PERSONS)
|
Well, you have broken SqlExp in the process
/*
SqlVal::SqlVal(const SqlSelect& x) {
SetHigh('(' + ((SqlStatement) x).GetText() + ')');
}
SqlVal::SqlVal(const SqlBool& x) {
SetHigh(~x);
}
*/
I had to comment these, otherwise I am getting a lot of errors like the one tojocky mentions.
Mirek
|
|
|
|
|
Some Sql addidtions
By: unodgs on Thu, 26 June 2008 14:56
|
|
|
Re: Some Sql addidtions
By: zsolt on Thu, 26 June 2008 20:13
|
|
|
Re: Some Sql addidtions
By: tojocky on Fri, 27 June 2008 23:16
|
|
|
Re: Some Sql addidtions
By: zsolt on Sat, 28 June 2008 10:25
|
|
|
Re: Some Sql addidtions
|
|
|
Re: Some Sql addidtions
By: mirek on Sat, 28 June 2008 13:56
|
|
|
Re: Some Sql addidtions
By: tojocky on Sat, 28 June 2008 23:30
|
|
|
Re: Some Sql addidtions
|
|
|
Re: Some Sql addidtions
By: mirek on Sun, 29 June 2008 18:15
|
|
|
Re: Some Sql addidtions
By: tojocky on Sun, 29 June 2008 21:03
|
|
|
Re: Some Sql addidtions
By: mirek on Mon, 30 June 2008 09:15
|
|
|
Re: Some Sql addidtions
By: mirek on Mon, 30 June 2008 09:36
|
|
|
Re: Some Sql addidtions
By: unodgs on Mon, 30 June 2008 12:05
|
|
|
Re: Some Sql addidtions
By: unodgs on Mon, 30 June 2008 21:04
|
|
|
Re: Some Sql addidtions
By: mirek on Mon, 30 June 2008 21:31
|
Goto Forum:
Current Time: Wed May 15 03:55:47 CEST 2024
Total time taken to generate the page: 0.02189 seconds
|