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

FreeBSD Manual Pages


home | help
POE::Component::LaDBI:UserpContributed Perl POE::Component::LaDBI::Response(3)

       POE::Component::LaDBI::Response - Class encapsulating responses from

	 use POE::Component::LaDBI::Response;

	 $resp = POE::Component::LaDBI::Response->new
		  (Code	    => 'OK',
		   HandleId => $sth_id,
		   Id	    => $request_id,
		   DataType => 'TABLE',
		   Data	    => $fetchall_arrayref_ret);




	   For the keys, capitalization	does not matter. Internally the	keys
	   are lowercased.

	       String identifier representing the error	result of the request.

	       Valid "Code" values are:

		   The "POE::Component::LaDBI::Request"	succeeded as far as
		   "POE::Component::LaDBI::Engine" is concerned.

		   The "POE::Component::LaDBI::Request"	failed.	"DataType"
		   will	be set to either "ERROR" or "EXCEPTION".

		   The "POE::Component::LaDBI::Engine" instance	does not have
		   a record of the "$request-"handle_id>.

	       This is the unique cookie from the
	       "POE::Component::LaDBI::Request"	("$req-"id>) this
	       "POE::Component::LaDBI::Response" object	corresponds to.	 There
	       is a one	for one	relationship between requests and responses.

	       The type	of data	returned in "Data". If you are constucting a
	       "POE::Component::LaDBI::Response" object	you must supply	this
	       field.  However,	if you are just	useing the
	       "POE::Component::LaDBI::Response" object	returned from
	       "POE::Component::LaDBI::Engine::request()" you can usually
	       ignore this field. This is because all requests have a fixed
	       and known response data type.

		   Data	is an array ref	of array refs to scalars.

		     Data = [ [row0col0, row0col1, ...],
			      [row1col0, row1col1, ...],

		   This	one is odd. See	the description	of
		   "selectall_hashref()" in DBI.  For *_hashref() calls	in
		   "DBI" you have to provide the database table	field which
		   will	be the hash key	into this hash table. The values
		   corresponding to each key is	a hash of the rows returned
		   from	the select or fetch. I did not invent this and do not
		   quite understand why.

		     Data = {
			     row0colX_val => {col0_name	=> row0_val, col1_name => row0_val, ...},
			     row1colX_val => {col0_name	=> row1_val, col1_name => row1_val, ...},

		   Data	is an array ref	of scalars.

		     Data = [ elt0, elt1, ... ]

		   Data	is an hash ref containing name-value pairs of each
		   data	item in	the row; the name is the column	name, the
		   value is the	column value.

		     Data = { col0_name	=> elt0, col1_name => elt1, ...	}

		     Data = [ elt0, elt1, ... ]

		   Return code is a scalar valude returned from	the DBI	call.

		     Data = $rc

		   Return Value	is a scalar value returned from	the DBI	call.

		     Data = $rv

		   This	is the data type for the return	value from
		   DBI::quote()	call.

		     Data = $sql_string

		   There was an	error for the DBI call.	This indicates the DBI
		   call	returned undef.	The data value is a hash ref with two
		   keys	'err' and 'errstr'. These keys corresponed to the DBI
		   calls of the	same name: "$h->err" and "$h->errstr".

		     Data = { err => $handle->err, errstr => $handle->errstr }

		   There was an	exception thrown from the DBI call. This
		   indicates the DBI call called a die(). All DBI calles
		   executed by "POE::Component::LaDBI::Engine" are wrapped in
		   a "eval {}" to catch	any exceptions,	like when "RaiseError"
		   is set.

		     Data = $@

	       The value of this field is described above. It can be a scalar,
	       hashref,	arrayref, or undef.

       Accessor	Functions

	   Get/Set accessor funtions to	the same data described	in the "new()"

       None by default.

       Sean Egan, <seanegan:bigfoot_com>


       Hey! The	above document had some	coding errors, which are explained

       Around line 306:
	   You forgot a	'=back'	before '=head3'

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

perl v5.32.1			  2004-03-21POE::Component::LaDBI::Response(3)


Want to link to this manual page? Use this URL:

home | help