[interchange-cvs] interchange - heins modified 4 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Thu Jul 22 23:03:40 EDT 2004


User:      heins
Date:      2004-07-23 03:03:40 GMT
Modified:  lib/Vend/Table Common.pm DBI.pm LDAP.pm Shadow.pm
Log:
* Make query results available for filtering RefSearch. For example:

	[query
		search-label=foo
		row-count=1
		sql="
			select * from products where prod_group = 'Hand Tools'
		"
	/] entries in prod_group=Hand Tools

	<p>
	Searching the reference for category=Shears...
	</p>

	[loop
		search="
			st=ref
			re=foo
			co=yes
			sf=category
			se=Shears
			rf=*
		"
	]

	[loop-param sku]<br>
	<blockquote>
		-- prod_group=[loop-param prod_group]<br>
		-- category=[loop-param category]<br>
		-- description=[loop-param description] <br><br>
	</blockquote>
	[/loop]

Revision  Changes    Path
2.36      +9 -2      interchange/lib/Vend/Table/Common.pm


rev 2.36, prev_rev 2.35
Index: Common.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Common.pm,v
retrieving revision 2.35
retrieving revision 2.36
diff -u -r2.35 -r2.36
--- Common.pm	12 Jul 2004 02:41:38 -0000	2.35
+++ Common.pm	23 Jul 2004 03:03:39 -0000	2.36
@@ -1,6 +1,6 @@
 # Vend::Table::Common - Common access methods for Interchange databases
 #
-# $Id: Common.pm,v 2.35 2004/07/12 02:41:38 mheins Exp $
+# $Id: Common.pm,v 2.36 2004/07/23 03:03:39 mheins Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -23,7 +23,7 @@
 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA  02111-1307  USA.
 
-$VERSION = substr(q$Revision: 2.35 $, 10);
+$VERSION = substr(q$Revision: 2.36 $, 10);
 use strict;
 
 package Vend::Table::Common;
@@ -951,6 +951,13 @@
 				$query,
 			);
 		$return = $opt->{failure} || undef;
+	}
+
+	if($opt->{search_label}) {
+		$::Instance->{SearchObject}{$opt->{search_label}} = {
+			mv_results => $ref,
+			mv_field_names => \@na,
+		};
 	}
 
 	if ($opt->{row_count}) {



2.61      +10 -2     interchange/lib/Vend/Table/DBI.pm


rev 2.61, prev_rev 2.60
Index: DBI.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/DBI.pm,v
retrieving revision 2.60
retrieving revision 2.61
diff -u -r2.60 -r2.61
--- DBI.pm	5 Jun 2004 18:21:06 -0000	2.60
+++ DBI.pm	23 Jul 2004 03:03:39 -0000	2.61
@@ -1,6 +1,6 @@
 # Vend::Table::DBI - Access a table stored in an DBI/DBD database
 #
-# $Id: DBI.pm,v 2.60 2004/06/05 18:21:06 mheins Exp $
+# $Id: DBI.pm,v 2.61 2004/07/23 03:03:39 mheins Exp $
 #
 # Copyright (C) 2002-2004 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -21,7 +21,7 @@
 # MA  02111-1307  USA.
 
 package Vend::Table::DBI;
-$VERSION = substr(q$Revision: 2.60 $, 10);
+$VERSION = substr(q$Revision: 2.61 $, 10);
 
 use strict;
 
@@ -2099,6 +2099,14 @@
 	if ($rc < 1 and CORE::ref($ref) and scalar(@$ref) ) {
 		$rc = scalar(@$ref);
 	}
+
+	if($opt->{search_label}) {
+		$::Instance->{SearchObject}{$opt->{search_label}} = {
+			mv_results => $ref,
+			mv_field_names => \@na,
+		};
+	}
+
 	# force to numeric, to handle DBI "0E0"-type results
 	$::Values->{mv_search_match_count} = $rc + 0;
 	if ($opt->{row_count}) {



2.11      +9 -2      interchange/lib/Vend/Table/LDAP.pm


rev 2.11, prev_rev 2.10
Index: LDAP.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/LDAP.pm,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -r2.10 -r2.11
--- LDAP.pm	14 Jul 2003 09:17:51 -0000	2.10
+++ LDAP.pm	23 Jul 2004 03:03:39 -0000	2.11
@@ -1,6 +1,6 @@
 # Vend::Table::LDAP - Interchange LDAP pseudo-table access
 #
-# $Id: LDAP.pm,v 2.10 2003/07/14 09:17:51 racke Exp $
+# $Id: LDAP.pm,v 2.11 2004/07/23 03:03:39 mheins Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -25,7 +25,7 @@
 
 package Vend::Table::LDAP;
 @ISA = qw/Vend::Table::Common/;
-$VERSION = substr(q$Revision: 2.10 $, 10);
+$VERSION = substr(q$Revision: 2.11 $, 10);
 use strict;
 
 use vars qw(
@@ -668,6 +668,13 @@
 				$query,
 			);
 		$return = $opt->{failure} || undef;
+	}
+
+	if($opt->{search_label}) {
+		$::Instance->{SearchObject}{$opt->{search_label}} = {
+			mv_results => $ref,
+			mv_field_names => \@na,
+		};
 	}
 
 	return scalar @{$ref || []}



1.46      +10 -2     interchange/lib/Vend/Table/Shadow.pm


rev 1.46, prev_rev 1.45
Index: Shadow.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Shadow.pm,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- Shadow.pm	8 Dec 2003 12:03:37 -0000	1.45
+++ Shadow.pm	23 Jul 2004 03:03:39 -0000	1.46
@@ -1,6 +1,6 @@
 # Vend::Table::Shadow - Access a virtual "Shadow" table
 #
-# $Id: Shadow.pm,v 1.45 2003/12/08 12:03:37 racke Exp $
+# $Id: Shadow.pm,v 1.46 2004/07/23 03:03:39 mheins Exp $
 #
 # Copyright (C) 2002-2003 Stefan Hornburg (Racke) <racke at linuxia.de>
 #
@@ -20,7 +20,7 @@
 # MA  02111-1307  USA.
 
 package Vend::Table::Shadow;
-$VERSION = substr(q$Revision: 1.45 $, 10);
+$VERSION = substr(q$Revision: 1.46 $, 10);
 
 # CREDITS
 #
@@ -361,6 +361,14 @@
 					$row->[$pos] = $s->_map_column($row->[$keypos], $name, 1, $row->[$pos], $map_entry);
 				}
 			}
+
+			if($opt->{search_label}) {
+				$::Instance->{SearchObject}{$opt->{search_label}} = {
+					mv_results => $result,
+					mv_field_names => $qa[2],
+				};
+			}
+
 			if ($list) {
 				$opt->{list} = 1;
 				return Vend::Interpolate::tag_sql_list($text, $result, $qa[1], $opt, $qa[2]);








More information about the interchange-cvs mailing list