본문 바로가기

안녕하세요!

프로그래밍 언어/CAP

[ CAP ] Views and Projections


 

Views and Projections


반응형

The as select from Variant


 

entity Bbao1 as SELECT from Doe;
entity Bbao2 as SELECT from Employees { * };
entity Bbao3 as SELECT from Employees LEFT JOIN Doe on Employees.ID = Doe.ID {
    bbao, doe as doebbao, sum(coding) as diary
} where exists (
    SELECT 1 as anyXY from SomeOtheEntity as soe where soe.x = y
)
group by bbao, doe
order by diary asc;

 

as select from을 사용함으로써 관계형 데이터베이스가 모든 쿼리 절을 포함하는 유효 CQL 쿼리를  지원한다.

The as projection on Variant


 

entity Doe as projection on Bbao {...}

 

as projection on은 쿼리에서 SQL 전체 기능을 사용하지 않는다는 것을 나타내기 위해
as select from 대신에 as variant 을 대체하여 사용할 수 있다.

 

728x90
반응형

loading