[siesta-commit] siesta/lib/Siesta/Config List.pm,1.1,1.2 ListUser.pm,1.1,1.2 User.pm,1.1,1.2

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

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

Modified Files:
	List.pm ListUser.pm User.pm 
Log Message:
More work on Config.


Index: List.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Config/List.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- List.pm	2 Sep 2002 07:41:14 -0000	1.1
+++ List.pm	2 Sep 2002 11:46:47 -0000	1.2
@@ -1,40 +1,42 @@
-package Siesta::Config::List;
+package Siesta::Config::User;
 
 use strict;
 use vars qw( $DBFILE $ARCHIVE_PATH );
 require Ima::DBI;
+require Siesta::Config;
 use base qw(Siesta::Config Ima::DBI);
 
 
-# override siesta config 
+# override Siesta::Config 
 sub new 
 {
 	my $class = shift;
 
-	set_db('Main', $DBFILE);
-
+	my $DBI = "dbi:SQLite:".$Siesta::Config::DBFILE;
+	Siesta::Config::User->set_db('Main', $DBI);
 	# set the sql statements 
-	set_sql('get', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('get', <<"SQL", 'Main');
 		select value 
 		from list_config
 		where id = ? and 
-		where namespace = ? and
-		where key = ?
+		namespace = ? and
+		key = ?
 SQL
-	set_sql('insert', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('insert', <<"SQL", 'Main');
 		insert into list_config
-		(id namespace, key, value)
+		(id, namespace, key, value)
 		values (?, ?, ?, ?)
 SQL
-	set_sql('update', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('update', <<"SQL", 'Main');
 		update list_config 
-		set value
+		set value = ?
 		where id = ? and 
-		where namespace = ? and
-		where key = ?
+		namespace = ? and
+		key = ?
 SQL
 
 	return bless {}, $class;
 }
+
 
 1;

Index: ListUser.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Config/ListUser.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ListUser.pm	2 Sep 2002 07:41:14 -0000	1.1
+++ ListUser.pm	2 Sep 2002 11:46:47 -0000	1.2
@@ -1,40 +1,42 @@
-package Siesta::Config::ListUser;
+package Siesta::Config::User;
 
 use strict;
 use vars qw( $DBFILE $ARCHIVE_PATH );
 require Ima::DBI;
+require Siesta::Config;
 use base qw(Siesta::Config Ima::DBI);
 
 
-# override siesta config 
+# override Siesta::Config 
 sub new 
 {
 	my $class = shift;
 
-	set_db('Main', $DBFILE);
-
+	my $DBI = "dbi:SQLite:".$Siesta::Config::DBFILE;
+	Siesta::Config::User->set_db('Main', $DBI);
 	# set the sql statements 
-	set_sql('get', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('get', <<"SQL", 'Main');
 		select value 
 		from listuser_config
 		where id = ? and 
-		where namespace = ? and
-		where key = ?
+		namespace = ? and
+		key = ?
 SQL
-	set_sql('insert', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('insert', <<"SQL", 'Main');
 		insert into listuser_config
 		(id, namespace, key, value)
 		values (?, ?, ?, ?)
 SQL
-	set_sql('update', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('update', <<"SQL", 'Main');
 		update listuser_config 
-		set value
+		set value = ?
 		where id = ? and 
-		where namespace = ? and
-		where key = ?
+		namespace = ? and
+		key = ?
 SQL
 
 	return bless {}, $class;
 }
+
 
 1;

Index: User.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Config/User.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- User.pm	2 Sep 2002 07:12:51 -0000	1.1
+++ User.pm	2 Sep 2002 11:46:47 -0000	1.2
@@ -3,10 +3,11 @@
 use strict;
 use vars qw( $DBFILE $ARCHIVE_PATH );
 require Ima::DBI;
+require Siesta::Config;
 use base qw(Siesta::Config Ima::DBI);
 
 
-# override siesta config 
+# override Siesta::Config 
 sub new 
 {
 	my $class = shift;
@@ -14,29 +15,28 @@
 	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');
+	Siesta::Config::User->set_sql('get', <<"SQL", 'Main');
 		select value 
 		from user_config
 		where id = ? and 
-		where namespace = ? and
-		where key = ?
+		namespace = ? and
+		key = ?
 SQL
-	Siesta::Config::User->set_sql('insert', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('insert', <<"SQL", 'Main');
 		insert into user_config
 		(id, namespace, key, value)
 		values (?, ?, ?, ?)
 SQL
-	Siesta::Config::User->set_sql('update', <<"SQL", 'config');
+	Siesta::Config::User->set_sql('update', <<"SQL", 'Main');
 		update user_config 
-		set value
+		set value = ?
 		where id = ? and 
-		where namespace = ? and
-		where key = ?
+		namespace = ? and
+		key = ?
 SQL
 
 	return bless {}, $class;
 }
-
 
 
 1;



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