Re: [CDBI] Order of columns returned by "columns"

[prev] [thread] [next] [Date index for 2005/11/08]

From: Will Hawes
Subject: Re: [CDBI] Order of columns returned by "columns"
Date: 08:41 on 08 Nov 2005
This is a multi-part message in MIME format.

--===============2095297377==
Content-Type: multipart/alternative;
	boundary="----------peace-on-earth-93a54bbca7af127a992cdcad3dfb5702"

This is a multi-part message in MIME format.

------------peace-on-earth-93a54bbca7af127a992cdcad3dfb5702
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

=5F=5F=5F=5F=5F =20

From: Ken Youens-Clark [mailto:kyclark@xxxxx.xxx]
To: classdbi@xxxxx.xxxxxxxxxxxxxxxx.xxx
Sent: Mon, 07 Nov 2005 23:44:09 +0000
Subject: [CDBI] Order of columns returned by "columns"

Hi,

Is it possible to get the columns returned by Class::DBI::columns to =20
be in the same order that I define them=3F  I see in the =20
Class::DBI::ColumnGrouper module that it's storing the columns in a =20
hash and calling "values" on that.
  One workaround is to define a method in your CDBI class as follows:
 =20
  sub ordered=5Fcolumns {
    qw/columns in the order you want them/;
  }
 =20
  Then use $class->ordered=5Fcolumns instead of $class->columns when you=
 need the order to be guaranteed.
 =20
------------peace-on-earth-93a54bbca7af127a992cdcad3dfb5702
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
 <meta http-equiv=3D'Content-Type' content=3D'text/html;charset=3Dus-asc=
ii'>
 <style>BODY{font:10pt Tahoma, Verdana, sans-serif;}</style>
</head>
<body>
<br><blockquote style=3D"border-left: 2px solid rgb(0, 0, 255); padding-=
left: 5px; margin-left: 5px; margin-right: 0px;"><hr><b>From:</b> Ken Yo=
uens-Clark [mailto:kyclark@xxxxx.xxx]<br><b>To:</b>; classdbi@xxxxx.xxxxx=
alcraftsmen.net<br><b>Sent:</b> Mon, 07 Nov 2005 23:44:09 +0000<br><b>Su=
bject:</b> [CDBI] Order of columns returned by "columns"<br><br><!-- -->=
Hi,<br><br>Is it possible to get the columns returned by Class::DBI::col=
umns to  <br>be in the same order that I define them=3F  I see in the  <=
br>Class::DBI::ColumnGrouper module that it's storing the columns in a  =
<br>hash and calling "values" on that.</blockquote><br>
One workaround is to define a method in your CDBI class as follows:<br>
<br>
sub ordered=5Fcolumns {<br>
&nbsp; qw/columns in the order you want them/;<br>
}<br>
<br>
Then use $class-&gt;ordered=5Fcolumns instead of $class-&gt;columns when=
 you need the order to be guaranteed.<br>
</body></html>
------------peace-on-earth-93a54bbca7af127a992cdcad3dfb5702--



--===============2095297377==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

--===============2095297377==--


[CDBI] Order of columns returned by "columns"
Ken Youens-Clark 23:44 on 07 Nov 2005

Re: [CDBI] Order of columns returned by "columns"
Matt S Trout 00:06 on 08 Nov 2005

Re: [CDBI] Order of columns returned by "columns"
Will Hawes 08:41 on 08 Nov 2005

Re: [CDBI] Order of columns returned by "columns"
Matt S Trout 15:46 on 08 Nov 2005

Generated at 20:55 on 09 Nov 2005 by mariachi v0.52