Received: from ATHENA-AS-WELL.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA23535; Thu, 15 Oct 92 18:57:19 EDT
Received: from CECI.MIT.EDU by Athena.MIT.EDU with SMTP
	id AA01006; Thu, 15 Oct 92 18:57:17 EDT
Message-Id: <9210152257.AA01006@Athena.MIT.EDU>
Received: from abelard.mit.edu.mit.edu by ceci.mit.edu id AA07281g; Thu, 15 Oct 92 18:40:07 EDT
Date: Thu, 15 Oct 92 18:40:07 EDT
From: Philip Bailey <pbailey@ceci.mit.edu>
Site: 
To: aybee@Athena.MIT.EDU, jert@Athena.MIT.EDU, jud@ceci.mit.edu,
        wjeuerle@Athena.MIT.EDU
Subject: Image Proto

There is a very simple program which creates media objects from a database
query object, puts them in a content list & prints out the media's information.

The program is located in a development environment;
 ..../ImageProto/application/tst_ip

In order for tst_ip to run on any sun other than my machine( where the database
is configured & must run) the following environment variables must be set.

	setenv POSTGRESHOME /usr/postgres
	setenv PGHOST abelard

Currently the program gets all media objects in the database.

To create a query which only selects some of the items construct a new
DIquery

the arguments are:
	 an existing CTlist
	 Class searched( "VISUAL *" for all media classes,"VDISC", or "PPM")
	 fields currently not used a null string OK
	 where_clause -- see below for examples of where clauses.

Then do a dump() on the CTlist

Where clauses right now are very dependant on the postgres syntax and the
following must be followed to pass a where clause to the DIquery constructor.

"where v.FieldName operator \"String\""

FieldName may be for:
		 all VISUAL classes
			name or comment (both strings)
		 VDISC
			volume (string), start_frame (int), end_frame (int)
		 PPM
			path (string)

operator may be:

		=, != for strings or ints
		>, >=, <, <= for ints
		~ , !~ regex or not regex for strings

where clauses may be made very complex, to do more please see the postgres
documentation.

for example if you wanted to search for all VDISC clips with "Bowl" in the name
of the clip the following constructor syntax should be used.

CTlist *myList = new CTlist("MyList");

DIquery *query = new DIquery(myList,"VDISC","","where v.name ~ "\Bowl\"");

myList->dump();


Good Luck
