| Summary | Included libraries | Package variables | Synopsis | Description | General documentation | Methods |
use G::DB::GDBAPI; @ISA = (G::DB::GDBAPI);
Intended for internal use only. Super class for the core. Provides the native methods.
| cols | No description | Code |
| rows | No description | Code |
| rows_old | No description | Code |
| select | No description | Code |
| set_cols | No description | Code |
| cols | description | prev | next | Top |
my $this = shift; $this->set_cols() unless(length $this->{COLS}); return(split(/\t:\t/, $this->{COLS}));}
| rows | description | prev | next | Top |
my $this = shift; my $all = shift; my @rows; foreach my $key (sort {$a <=> $b} keys %{$this}){ next if ($key eq 'COLS' || $key eq 'SQL' || $key eq 'QUERY'); if($all ne 'all'){ next if ($this->{$key}->{on} eq "0"); } push (@rows, $key); } return @rows;}
| rows_old | description | prev | next | Top |
my $this = shift; my $all = shift; my $i = 0; my @rows; while(defined(%{$this->{$i}})){ if($all ne 'all'){ if ($this->{$i}->{on} eq "0"){ $i ++; next; } } push (@rows, "$i"); $i ++; } return @rows;}
| select | description | prev | next | Top |
my $this = shift; my $arg = shift; my ($arg1, $arg2, $arg3) = split(/\s+/, $arg, 3); my @res = (); if ($arg2 eq 'eq'){ foreach my $row ($this->rows()){ if ($this->{$row}->{$arg1} eq $arg3){ push(@res, $row); } } }else{ foreach my $row ($this->rows()){ if ($this->{$row}->{$arg1} =~ /$arg3/){ push(@res, $row); } } }}
| set_cols | description | prev | next | Top |
my $this = shift; my %hash; foreach my $row ($this->rows("all")){ foreach my $col (keys %{$this->{$row}}){ next if ($col eq "on"); $hash{$col} ++; } } foreach my $key (keys %hash){ my $lckey = lc($key); if($reservedwords =~ /\s$lckey\s/){ die(" Error: $key is a reserved word in SQL.\n"); } } $this->{COLS} = join("\t:\t", keys %hash);}
| AUTHOR | Top |
| SEE ALSO | Top |