head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	92.07.12.16.45.36;	author mao;	state Exp;
branches;
next	1.3;

1.3
date	91.03.19.15.52.08;	author kemnitz;	state Exp;
branches;
next	1.2;

1.2
date	91.03.19.15.08.54;	author kemnitz;	state Exp;
branches;
next	1.1;

1.1
date	91.03.19.00.25.04;	author kemnitz;	state Exp;
branches;
next	;


desc
@@


1.4
log
@fixes for new 4.0 syntax, function support
@
text
@/*
 *  There are two ways to use both functions and attributes.  You can
 *  refer to them in queries using function notation, or you can use
 *  nested dot notation.  Here's an example:  'name' is an attribute of
 *  the 'emp' class, and 'manager' is a function that takes an emp and
 *  returns an emp.
 */

retrieve (mgr_name = name(manager(emp)))
\p
\g

retrieve (emp.manager.name)
\p
\g
@


1.3
log
@demo shuffling
@
text
@d1 9
a9 6
define rewrite rule example_2 is
on retrieve to emp.manager
do instead
retrieve (e.all) from e in emp 
where e.name = dept.mgrname
and dept.dname = current.dept
d11 5
@


1.2
log
@reorganized demo scripts
@
text
@d1 7
a7 10
/* 
 * the view definition is equivalent to the following commands:
 */
create toyemp2(name = char16, age = int4, location = point, annualsal = int4)
\g
define rule toyemp2_ret is
on retrieve to toyemp2 do instead
retrieve(emp.name, emp.age, emp.location, annualsal = 12*emp.salary)
where emp.dept = "toy"
\g
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
 * then we add some instances to the version
d4 1
a4 2

append emp1 (name = "jack", age = 40, salary = 20000, dept = "shoe")
d6 4
a9 1
append emp1 (name = "joe", age = 25, salary = 3000, dept = "shoe")
@
