From: Steve F. <sfi...@pc...> - 2004-03-09 17:29:19
|
Here are all the calls in the code base to fetchrow_hashref that do not use explicit casing: DoTS/DotsBuild/plugin/perl/AssignLibraryDistributionToAssemblies.pm: while (my $row = $updateStmt->fetchrow_hashref()) { DoTS/DotsBuild/plugin/perl/NewLibDist.pm: while (my $row = $updateStmt->fetchrow_hashref()) { GUS/Model/lib/perl/DoTS/Evidence.pm.man: while (my $row = $sth->fetchrow_hashref()){ GUS/Model/lib/perl/DoTS/Evidence.pm: while (my $row = $sth->fetchrow_hashref()){ GUS/PluginMgr/lib/perl/GusApplication.pm: while (my $alg_h = $sh->fetchrow_hashref) { GUS/PluginMgr/lib/perl/GusApplication.pm: while (my $imp_h = $imp_sh->fetchrow_hashref) { GUS/PluginMgr/lib/perl/GusApplication.pm: while (my $par_h = $par_sh->fetchrow_hashref) { GUS/PluginMgr/lib/perl/GusApplication.pm: while (my $inv_h = $inv_sh->fetchrow_hashref) { GUS/PluginMgr/lib/perl/GusApplication.pm: while (my $val_h = $val_sh->fetchrow_hashref) { GUS/PluginMgr/lib/perl/Plugin.pm: while (my $row = $sh->fetchrow_hashref) { steve Angel Pizarro wrote: > Ugh, I was hoping this issue did not rear it's ugly head. Oracle by > default returns hashes with keys as uppercase. The Perl DBI > fetchrow_hashref() method does take and argument "NAME_lc" to force > lowercase & 'NAME_uc' to force uppercase hash keys. Usually people > like lowercase keys and have mostly used the 'NAME_lc" option > throughout the code when they have a DBI handle (or at least I always > did) . > > But you will notice that if you use the > GUS::PluginMgr::Plugin->sql_get_as_hash_refs($sql) to run sql the > method returns an array of hashes with lowercase keys. > > My point is that I don't think this is as big an issue as first appears. > >> From GusApplication, There are five lines that are affected: > > [angel@pythia perl]$ grep -n fetchrow_hashref GusApplication.pm > 553: while (my $alg_h = $sh->fetchrow_hashref) { > 565: while (my $imp_h = $imp_sh->fetchrow_hashref) { > 582: while (my $par_h = $par_sh->fetchrow_hashref) { > 597: while (my $inv_h = $inv_sh->fetchrow_hashref) { > 606: while (my $val_h = $val_sh->fetchrow_hashref) { > > Changing all of these to $st->fetchrow_hasref("NAME_uc") will fix all > of the code in GusApplication. > > For individual plugins, it is a simple replacement to change any > fetchrow_hashref that do not already have the NAME_* option to bring > back whatever the default one is for the code. > > Angel > > Jason Hackney wrote: > >> I've already looked at the user guides. I've also loaded many of the >> plugins just to make sure that they will load. There is one issue >> here. When a gus module returns dbi results as a hash, the hash keys >> are all lowercase. This is because of PostgreSQL's insane attempts >> to be case insensitive by forcing one implicit (lower) case unless >> _everything_ is enclosed by quotes. I don't know how this is done by >> Oracle. This required changing two lines of GusApplication.pm to >> allow me to load things at all. >> >> On Mar 9, 2004, at 10:53 AM, Steve Fischer wrote: >> >>> To test things out, i would turn to the User Guides available from >>> the gusdb.org site. They will tell you what data to load >>> initially (but maybe you've already done that). >>> >>> You could tinker with the GUS::Common::Plugin::SubmitRow for a start. >>> >>> steve >>> >>> Jason Hackney wrote: >>> >>>> Hi Chris, >>>> >>>> Well, I wouldn't be so fast to do that just yet. As of this >>>> morning, I have rebuilt Pg 7.3, and reinstalled GUS. Everything >>>> builds fine, including the array and associated tables, as far as >>>> I can tell. I can register plugins using ga. That's about it, so >>>> far. What I think would be useful would be some examples of Perl >>>> modules built using Oracle, just so I can make sure that >>>> everything is kosher. Anyone want to volunteer a couple of modules >>>> they have built, so I can compare and contrast? So far, so good, >>>> though. >>>> >>>> Cheers, >>>> Jason >>>> >>>> On Mar 9, 2004, at 8:06 AM, Chris Stoeckert wrote: >>>> >>>>> Hi Jason, >>>>> Great to hear of your progress. Sounds like we will need to >>>>> change the table name for Array in RAD. >>>>> >>>>> Any suggestions? "Array_" "ArrayP" (for ArraryPostgreSQL) >>>>> >>>>> Chris >>>>> >>>>> On Mar 8, 2004, at 7:04 PM, Jason Hackney wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I am working with Laurie Kramer to port the GUS platform to >>>>>> PostgreSQL. Most things work, or are pretty trivial to get >>>>>> working (more on that later). The only real issue I have run >>>>>> into is PostgreSQL uses array as a reserved word (it's a >>>>>> datatype), and you can't make a table called array. This is as >>>>>> of PostgreSQL 7.4 (and is a keyword according to SQL99). >>>>>> PostgreSQL 7.3 doesn't reserve this word, but is a bit gimpy on >>>>>> sub-selects, if necessary we can downgrade, but this will be an >>>>>> issue in the future, as 7.3 departs and 7.4 takes over for it. >>>>>> >>>>>> Cheers, >>>>>> Jason >>>>>> >>>>>> Jason A. Hackney >>>>>> Graduate Student >>>>>> Princeton University >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------- >>>>>> This SF.Net email is sponsored by: IBM Linux Tutorials >>>>>> Free Linux tutorial presented by Daniel Robbins, President and >>>>>> CEO of >>>>>> GenToo technologies. Learn everything from fundamentals to system >>>>>> administration.http://ads.osdn.com/? >>>>>> ad_id=1470&alloc_id=3638&op=click >>>>>> _______________________________________________ >>>>>> Gusdev-gusdev mailing list >>>>>> Gus...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >>>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: IBM Linux Tutorials >>>> Free Linux tutorial presented by Daniel Robbins, President and CEO of >>>> GenToo technologies. Learn everything from fundamentals to system >>>> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >>>> _______________________________________________ >>>> Gusdev-gusdev mailing list >>>> Gus...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >>> >>> >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IBM Linux Tutorials >> Free Linux tutorial presented by Daniel Robbins, President and CEO of >> GenToo technologies. Learn everything from fundamentals to system >> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >> _______________________________________________ >> Gusdev-gusdev mailing list >> Gus...@li... >> https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > |