U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » Access to S_* Structure of TABLE crash Application.
Re: PROPOSAL: Access to S_* Structure of TABLE crash Application. [message #36302 is a reply to message #36301] Fri, 18 May 2012 22:42 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Another example:
SQL * Select(WORKER(NAME, LASTNAME), PLANT(NAME).As(PLANT_NAME), PLANT(ADDRESS)).From(WORKER).LeftJoin(PLANT).On(WORKER(PLANT_ID) == PLANT(ID));


This expression generates the SQL statement:
select WORKER.NAME, WORKER.LASTNAME, PLANT.NAME PLANT_NAME, PLANT.ADDRESS from WORKER left outer join PLANT on WORKER.PLANT_ID = PLANT.ID

Attention to PLANT.NAME and PLANT_NAME!!!
PLANT_NAME really not needed!!!.
We can get data from column PLANT.NAME by name PLANT.NAME or by name NAME.Of(PLANT).
I propose only more useful form is :
PLANT::NAME

If We enclose TABLE in separate class, We exclude more of name clashes (really absent in SQL).

This is not meant to prohibit the SQL column without the class prefix.
Should coexist both forms.


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}

[Updated on: Fri, 18 May 2012 23:02]

Report message to a moderator

 
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sql .sch / Date (moved)
Next Topic: SqlBinary and Postgres 9
Goto Forum:
  


Current Time: Sun Apr 26 22:22:25 GMT+2 2026

Total time taken to generate the page: 0.00605 seconds