package OneUnified::Const;

# Created on 2007/02/28 by Ray Burkholder
# Copywrite 2007 One Unified

#use DBI qw(:sql_types);

require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(getDbOneUnifiedParams);

use strict;

my $sDbOneUnifiedConn = q{dbi:Pg:dbname=oneunified};
my $sDbOneUnifiedUser = q{oneunified};
my $sDbOneUnifiedPass = q{password};

my @returnlist;

my $userSearchProfile =
    {
    userdb       =>
      {
       fields    => [qw( username password ) ],
       keys      => [qw( uid )],
       table     => "userdb",
      },
    groupdb      =>
      {
       query     => q{ SELECT m.gid,uid,groupname FROM groupdb, groupmembers m
                       WHERE  uid = ? },
       params    => [ qw( uid ) ],
       fields    => [ qw( groupname ) ],
       keys      => [ qw( gid )],
       table     => "groupdb",
      } ,
    };

sub getDbOneUnifiedParams {

#  @returnlist = ( $sDbOneUnifiedConn, $sDbOneUnifiedUser, $sDbOneUnifiedPass, $userSearchProfile );
  @returnlist = ( $sDbOneUnifiedConn, $sDbOneUnifiedUser, $sDbOneUnifiedPass );
  return @returnlist;
  }

1;


# Useful web pages:
# http://perl.apache.org/docs/1.0/guide/security.html
# http://www.flatlineconstruct.com/talk/understanding_mod_perl/handlers.html
# http://take23.org/docs/guide/security.xml?style=printable
# http://www.gossamer-threads.com/archive/mod_perl_C1/modperl_F7/Re:_$r-%3Eget_basic_auth_pw_P7238/
# http://www.saturn5.com/~jwb/dbi-examples.html
#  saturn5 has stored procedure example

# perldoc DBIx::UserDB
# perldoc DBIx::SearchProfiles
# perldoc DBI
# perldoc DBD::Pg


