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.05;	author kemnitz;	state Exp;
branches;
next	1.2;

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

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


desc
@@


1.4
log
@fixes for new 4.0 syntax, function support
@
text
@/*
 *  Earlier releases of Postgres used query rewrite rules to support
 *  complex objects.  In version 4, full support for Postquel functions
 *  has replaced query rewrite rules.  Here's how you define a method
 *  'manager' on the 'emp' class, and get complex objects.
 */

define function manager (language = "postquel", returntype = emp)
    arg is (emp)
    as "retrieve (emp.all) where emp.name = dept.mgrname
				and dept.dname = $1.dept"
\p
@


1.3
log
@demo shuffling
@
text
@d1 5
a5 3
/* 
 * rules are actually used to implement complex objects.  Here
 * is the way manager(emp) is actually implemented
d7 5
a11 1
addattr (manager = emp) to emp
@


1.2
log
@reorganized demo scripts
@
text
@d1 5
a5 3
define rule example_1 is
on replace to emp.salary where current.name = "bill"
do replace emp (salary = new.salary) where emp.name = "sam"
@


1.1
log
@Initial revision
@
text
@d1 4
a4 4
retrieve (toyemp.all)
\g
retrieve (emp.all)
\g
@
