Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Robert] SELECT FROM Databasename without prefix

Quote Reply
Re: [Robert] SELECT FROM Databasename without prefix In reply to
Got it:

GT/SQL/Table.pm

sub name {
# -----------------------------------------------------------
# $obj->name;
# -----------
# Returns the name of the current table instance.
#
# $obj->name($table_name);
# -------------------------
# Sets the name for the table to create.
#
my $self = shift;
if (defined $_[0]) {
my $name = shift;
my $prefix = $self->{connect}->{PREFIX};
if (length $prefix) {
unless ($name =~ /^$prefix/) {
$name = $prefix . $name;
}
}
unless ($name =~ /^(\w+)$/) {
return $self->fatal(BADNAME => $name);
}
$self->{name} = $1;

# If a schema exists, a new GT::Config object is needed as the name just changed
$self->_new_schema if $self->{schema};
}

if ($self->{name} eq 'mTableX') {
$self->{name} = 'TableX';
}

return $self->{name};
}
Subject Author Views Date
Thread SELECT FROM Databasename without prefix Robert 6683 Apr 21, 2017, 3:52 AM
Thread Re: [Robert] SELECT FROM Databasename without prefix
Robert 6575 Apr 21, 2017, 4:28 AM
Thread Re: [Robert] SELECT FROM Databasename without prefix
Andy 6561 Apr 21, 2017, 6:19 AM
Thread Re: [Andy] SELECT FROM Databasename without prefix
Robert 6543 Apr 21, 2017, 8:21 AM
Thread Re: [Robert] SELECT FROM Databasename without prefix
Andy 6541 Apr 21, 2017, 8:27 AM
Thread Re: [Andy] SELECT FROM Databasename without prefix
Robert 6539 Apr 21, 2017, 8:29 AM
Thread Re: [Robert] SELECT FROM Databasename without prefix
Andy 6538 Apr 21, 2017, 8:30 AM
Thread Re: [Andy] SELECT FROM Databasename without prefix
Robert 6467 Apr 21, 2017, 9:47 AM
Post Re: [Robert] SELECT FROM Databasename without prefix
Andy 6299 Apr 22, 2017, 12:02 AM