|
NAMEGenezzo::Dict.pm - The Genezzo data dictionarySYNOPSISuse Genezzo::Dict; # create a new dictionary my $dictobj = Genezzo::Dict->new( gnz_home => $gnz_home, init_db => $init); # see if a table exists if ($dictobj->DictTableExists ( tname => $tablename, silent_exists => 0, silent_notexists => 1 )))... # create a new table $dictobj->DictTableCreate ( tname => $tablename, tabdef => \%coldatatype, tablespace => "SYSTEM"); # drop a table $dictobj->DictTableDrop (tname => $tablename); # save the state of the dictionary to disk $dictobj->DictSave(); my $colhash = $dictobj->DictTableGetCols (tname => $tablename); $dictobj->RowInsert (tname => $tablename, rowval => \@rowarr ); $dictobj->RowDelete (tname => $tablename, rid => $rid); $dictobj->RowUpdate (tname => $tablename, rid => $rid, rowval => \@rowarr); # return the table as a tied hash my $tablehash = $dictobj->DictTableGetTable (tname => $tablename) ; DESCRIPTIONThe dictionary is a complete description of the Genezzo system, recording information on table structure and physical layout. It provides an interface to create, destroy, query, and manipulate tables.Dictionary concepts
Core TablesThe dictionary itself is just a set of tables stored in the system tablespace. Genezzo only uses six core tables to describe its basic dictionary. NOTE: Modifying any dictionary tables will framboozle your nimwits. You have been warned.
FUNCTIONSI want to reduce the interface to a simple tied hash, something like:my $errormsg; %args = (errormsg => \$errormsg ); my $dicthash = DictGetDictHash(%args); Checking for the existance of a table would be something like: my $tablename = "kitchentable"; if (exists($dicthash->{tableinfo}->{$tablename})) { # do stuff... } else { # errormsg was reference in tie of dicthash, # contains last error status print $errormsg; } EXPORTTODO
AUTHORJeffrey I. Cohen, jcohen@genezzo.comSEE ALSOperl(1).Copyright (c) 2003, 2004, 2005, 2006 Jeffrey I Cohen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Address bug reports and comments to: jcohen@genezzo.com For more information, please visit the Genezzo homepage at <http://www.genezzo.com>
Visit the GSP FreeBSD Man Page Interface. |