From: Ash Berlin Date: Tue, 23 May 2006 15:36:07 +0000 (+0000) Subject: Added docs for quote_char, name_sep and offset RS attrib. X-Git-Tag: v0.07002~84 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6789ebe3e45d64b758bf51051d64720939d61575;p=dbsrgits%2FDBIx-Class.git Added docs for quote_char, name_sep and offset RS attrib. --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 0b3a010..21fc256 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1304,6 +1304,11 @@ Which column(s) to order the results by. This is currently passed through directly to SQL, so you can give e.g. C for a descending order on the column `year'. +Please note that if you have quoting enabled (see +L) you will need to do C<\'year DESC' > to +specify an order. (The scalar ref causes it to be passed as raw sql to the DB, +so you will need to manually quote things as appropriate.) + =head2 columns =over 4 @@ -1503,7 +1508,9 @@ with an accessor type of 'single' or 'filter'). Makes the resultset paged and specifies the page to retrieve. Effectively identical to creating a non-pages resultset and then calling ->page($page) -on it. +on it. + +If L attribute is not specified it defualts to 10 rows per page. =head2 rows @@ -1516,6 +1523,17 @@ on it. Specifes the maximum number of rows for direct retrieval or the number of rows per page if the page attribute or method is used. +=head2 offset + +=over 4 + +=item Value: $offset + +=back + +Specifies the (zero-based) row number for the first row to be returned, or the +of the first row of the first page if paging is used. + =head2 group_by =over 4 diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index fd5e968..e70d87c 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -283,6 +283,24 @@ This class represents the connection to the database Executes the sql statements given as a listref on every db connect. +=head2 quote_char + +Specifies what characters to use to quote table and column names. If +you use this you will want to specify L as well. + +quote_char expectes either a single character, in which case is it is placed +on either side of the table/column, or an array of length 2 in which case the +table/column name is placed between the elements. + +For example under MySQL you'd use C, and user SQL Server you'd +use C. + +=head2 name_sep + +This only needs to be used in conjunction with L, and is used to +specify the charecter that seperates elements (schemas, tables, columns) from +each other. In most cases this is simply a C<.>. + =head2 debug Causes SQL trace information to be emitted on C filehandle