Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DBIWrapper::ResultSet(User Contributed Perl DocumentatDBIWrapper::ResultSet(3)

       scalar fixupAttributes(string)
	   Attempts to make sure that the given	string can be a	valid
	   attribute in	an xml document.

	   Converts (, ), -, \,	/, =, >, <, & to _ Deletes ', ", \n

NAME
       ResultSet - The XML Database ResultSet Module.

SYNOPSIS
	 use DBIWrapper::ResultSet;
	 my $obj = DBIWrapper::ResultSet->new();

DESCRIPTION
       ResultSet will contain the parsed XML file generated by readXML().  It
       provides	a method to validate that it is	complete and also a method to
       generate	a valid	XML file from the data stored in the data hash.

FUNCTIONS
	 scalar	new()
	   Creates a new instance of the DBIWrapper::ResultSet
	   object.

	 array isValid(void)
	   Determines if the data structure is complete	and usable for
	   generating an XML file from.
	   Returns an array.  The first	index is boolean (1 or 0 to indicate
	   if the object is valid or not).  The	second index is	an array of
	   error messages that were generated based upon the errors found.

	 string	displayData(style)
	   Outputs the contents	of the perl data structure after validating
	   it.	If style = 'text' then formats for the console,	else if
	   style = 'html' we generate valid html output	and format in a	table.
	   The content is suitable to place straight into the <body> section
	   of your HTML	page.

	 string	generateXML(void)
	   Creates an XML file based upon the info stored in the ResultSet.
	   It first calls isValid() to make sure this is possible.  If
	   not then we die with	an informative error message.

VARIABLES
	 version - version of the XML file parsed

	 resultFile - the name of the file parsed or the string	of XML

	 sql - the SELECT statement issued which generated the XML

	 plug -	the options that were plugged into the SQL statement

	 result	- Ok or	Error.	Indicates the status returned by the database

	 error - The error string returned if result = Error

	 numRows - the number of rows returned from the	database

	 columns - 0 or	1.  Indicates if we had	<column> children for each <row>
		   or if the data returned was stored by the name given	from the
		   database in the <row> with no children tags.

	 rows -	the array of row entries returned.  Each row is	a hash of
		column name = column value attributes.

	 columnNames - The names of the	columns	used in	the XML	file.

	 errorCodes - hash of error codes to messages returned by isValid().

	 NOTE:	All data fields	are accessible by specifying the object
		and pointing to	the data member	to be modified on the
		left-hand side of the assignment.
		Ex.  $obj->variable($newValue);	or $value = $obj->variable;

AUTHOR
       Xperience, Inc. (mailto:admin at	pcxperience.com)

SEE ALSO
       perl(1),	DBIWrapper(3)

POD ERRORS
       Hey! The	above document had some	coding errors, which are explained
       below:

       Around line 449:
	   '=item' outside of any '=over'

       Around line 493:
	   You forgot a	'=back'	before '=head1'

perl v5.24.1			  2016-08-22	      DBIWrapper::ResultSet(3)

NAME | SYNOPSIS | DESCRIPTION | FUNCTIONS | VARIABLES | AUTHOR | SEE ALSO | POD ERRORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=DBIWrapper::ResultSet&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help