-
Why are there examples of both in the tests? As far as I know they are equivalent..?? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Dunno. Probably it is a mistake. Please give me both links |
Beta Was this translation helpful? Give feedback.
-
the file tests\tests4.cpp shows use of both using als_t = alias_t<Transaccion>;
using als_a = alias_a<Account>;
using als_b = alias_b<Account>;
std::ignore = storage.select(columns(alias_column<als_t>(&Transaccion::fkey_account_other),
alias_column<als_t>(&Transaccion::fkey_account_own),
alias_column<als_a>(&Account::id_account),
alias_column<als_b>(&Account::id_account)),
left_outer_join<als_a>(on(c(alias_column<als_t>(&Transaccion::fkey_account_other)) ==
alias_column<als_a>(&Account::id_account))),
inner_join<als_b>(on(c(alias_column<als_t>(&Transaccion::fkey_account_own)) ==
alias_column<als_b>(&Account::id_account))));
std::ignore = storage.select(columns(alias_column<als_t>(&Transaccion::fkey_account_other),
alias_column<als_t>(&Transaccion::fkey_account_own),
alias_column<als_a>(&Account::id_account),
alias_column<als_b>(&Account::id_account)),
left_join<als_a>(on(c(alias_column<als_t>(&Transaccion::fkey_account_other)) ==
alias_column<als_a>(&Account::id_account))),
inner_join<als_b>(on(c(alias_column<als_t>(&Transaccion::fkey_account_own)) ==
alias_column<als_b>(&Account::id_account))));
std::ignore = storage.select(columns(alias_column<als_t>(&Transaccion::fkey_account_other),
alias_column<als_t>(&Transaccion::fkey_account_own),
alias_column<als_a>(&Account::id_account),
alias_column<als_b>(&Account::id_account)),
join<als_a>(on(c(alias_column<als_t>(&Transaccion::fkey_account_other)) ==
alias_column<als_a>(&Account::id_account))),
inner_join<als_b>(on(c(alias_column<als_t>(&Transaccion::fkey_account_own)) ==
alias_column<als_b>(&Account::id_account)))); Here we use left_outer_join and left_join which are identical as far as I have found. Also there is no difference between join and inner_join right? Regards, |
Beta Was this translation helpful? Give feedback.
-
As I found some time ago, the OUTER is "noiseword" not modifying what it targets semantically, so it does not matter - personal taste whether to use it or not... pg 250 of "A Guide to The SQL Standard" Fourth edition, C.J.Date, Hugh Darwen |
Beta Was this translation helpful? Give feedback.
As I found some time ago, the OUTER is "noiseword" not modifying what it targets semantically, so it does not matter - personal taste whether to use it or not... pg 250 of "A Guide to The SQL Standard" Fourth edition, C.J.Date, Hugh Darwen