From: Steve F. <st...@pc...> - 2003-05-21 16:08:25
|
Michael- see below. Steve MICHAEL LUCHTAN wrote: >Hello all: >A couple of q's for the FAQ: >I'm trying to get started using the perl object layer. I wonder if anyone >has any documentation, like a short description of the object, followed be >the methods that are available, and the parameters required by each >method. I can't seem to find this sort of documentation anywhere. Where >can I find this type of documentation? > There isn't any up-to-date documentation. The (perl) object layer consists of five pieces: - core classes that represent a: database, database handle, database table database row. These utilize the Perl DBI package. Find these in $PROJECT_HOME/GUS/ObjRelP/lib/perl - objects that represent each GUS table and view, and rows in them. Their API is pretty simple: setters and getters for attributes, get/add child methods; get/set parent methods. Find these in $PROJECT_HOME/GUS/Model/lib/perl/*/. - a superclass for all row objects. Look here to find methods that are shared by all row objects. It is: $PROJECT_HOME/GUS/Model/lib/perl/GusRow.pm - a code generator that automatically generates the GUS table and row objects by reading the info in the TableInfo table. Find this in Find these in $PROJECT_HOME/GUS/ObjRelP/lib/perl/generator - "hand-edited" objects: these augment the automatically generated methods with advanced "business logic". Find these in $PROJECT_HOME/GUS/Model/lib/perl/DoTS/*.pm.man > >Much of the code that I have seen used on the web makes use of perl >objects from GUS2 code. Is there a reason that >Objects::dbiperl_utils::DbiDatabase is used instead of >GUS::ObjRelP::DbiDatabase? > > Yes, that was the old location of DbiDatabase in gus2 code. It has been repackaged into GUS::ObjRelP::DbiDatabase to conform to the new Gus 3 cvs structure, etc. >Does anyone have a simple 5-10 line example code for how to login to a >database and submit a query, printing the results? > > For basic queries, with no associated logic, we use sqlplus on the unix command line. To see how to do something like this in a script, look at $PROJECT_HOME/GUS/Common/bin/dumpSequencesFromTable.pl. It issues an SQL query directly, not using the object layer. To see the object layer in action, take a look at plugins. >Thanks in advance: > >Michael Luchtan >http://www.cs.uga.edu/~luchtan > > > > >------------------------------------------------------- >This SF.net email is sponsored by: ObjectStore. >If flattening out C++ or Java code to make your application fit in a >relational database is painful, don't do it! Check out ObjectStore. >Now part of Progress Software. http://www.objectstore.net/sourceforge >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > |