Fields, which must be selected, are listed in XTree-expression after service word 'from' (extracted sections are listed after service word 'select' - look below). If no one field is specified, then it's equivalent of specification of all fields.
Part of sections of tree can be hidden for output. Whole tree is written after service word 'from', and extracted fields after service word 'select'.
It's possible to specify virtual (temporaty, to period of action of one sql-expression) foreign key for constructions like 'a.b.k.m', where "a" and "b" are bound by foreign key (FK), "k" and "m" are bound by foreign key, but there is no foreign key between "b" and "k". Virtual foreign keys are listed after service word 'where'.
Thus SQL/XLang works not only with separate tables, but with conglomerates of tables (with trees).
It's possible to specify virtual foreign key after service word 'where', binding previous and next "b", for constructions like 'a.b*.c' and 'a.b+.c', where "a" and "b" are bound by foreign key (FK), "b" and "c" are bound by foreign key, but "b" does not refer to itself by foreign key. Previous and next "b" are specified in functions previous and next.
Aliases of table are listed after service word 'from' as before. Aliases can be used to specify virtual foreign keys too.
Relationships, binding fields of tree, can be listed both after service word 'from', and after service word 'where'.
from a.b[@b1=5] from a.b[@b1] from a.b.c[@c1=../../@a1] from a.b[position()=1 xor @b1=5]*.c from a.b[last() xor @b1=5]*.c |
from a.b where @b1=5 -- where b/@b1=5 from a.b where @b1 is not null from a.b.c where @a1=@c1 -- where a/@a1=c/@c1 from a.b*.c where first(b)/@b1=5; from a.b*.c where last(b)/@b1=5; |
To not enter user into error and to not bring frustration in wit, it's necessary to reject three old designations and replace them by new designations.
|
select a/@a1 -- old notation to request fields instead of sections |
|
|
where b/@b1=5 |
|
|
from scheme§tab -- database%scheme§tab |