[siesta-commit] siesta/lib/Siesta/Config User.pm,NONE,1.1

[prev] [thread] [next] [lurker] [Date index for 2002/09/02]

From: muttley
Subject: [siesta-commit] siesta/lib/Siesta/Config User.pm,NONE,1.1
Date: 08:12 on 02 Sep 2002
Update of /cvsroot/siesta/siesta/lib/Siesta/Config
In directory usw-pr-cvs1:/tmp/cvs-serv7537/lib/Siesta/Config

Added Files:
	User.pm 
Log Message:
Whoops. Committed properly.


--- NEW FILE: User.pm ---
package Siesta::Config::User;

use strict;
use vars qw( $DBFILE $ARCHIVE_PATH );
require Ima::DBI;
use base qw(Siesta::Config Ima::DBI);


# override siesta config 
sub new 
{
	my $class = shift;

	my $DBI = "dbi:SQLite:".$Siesta::Config::DBFILE;
	Siesta::Config::User->set_db('Main', $DBI);
	# set the sql statements 
	Siesta::Config::User->set_sql('get', <<"SQL", 'config');
		select value 
		from user_config
		where id = ? and 
		where namespace = ? and
		where key = ?
SQL
	Siesta::Config::User->set_sql('insert', <<"SQL", 'config');
		insert into user_config
		(id, namespace, key, value)
		values (?, ?, ?, ?)
SQL
	Siesta::Config::User->set_sql('update', <<"SQL", 'config');
		update user_config 
		set value
		where id = ? and 
		where namespace = ? and
		where key = ?
SQL

	return bless {}, $class;
}



1;



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52