From 11fd6aac3e7e63874cded8019b32c1156e288aca Mon Sep 17 00:00:00 2001 From: Jason Lewis Date: Thu, 25 Feb 2016 21:35:34 +1100 Subject: [PATCH 1/5] change search_like example to use search --- lib/DBIx/Class/Manual/Intro.pod | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index c4c928ed4..2b3aaacfa 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -363,10 +363,10 @@ In list context, the C method returns all of the matching rows: print $album->artist . ' - ' . $album->title; } -We also provide a handy shortcut for doing a C search: +We also provide a way to do C searches: # Find albums whose artist starts with 'Jimi' - my $rs = $schema->resultset('Album')->search_like({ artist => 'Jimi%' }); + my $rs = $schema-resultset('Album')->search({ artist => { like => 'Jimi%' } }); Or you can provide your own C clause: @@ -402,6 +402,8 @@ attributes: C<@albums> then holds the two most recent Bob Marley albums. +For more information on searching, see L. + For more information on what you can do with a L, see L. From eb633bb944703290fdc16249d39d7c6bfa412e1b Mon Sep 17 00:00:00 2001 From: Jason Lewis Date: Thu, 25 Feb 2016 22:21:51 +1100 Subject: [PATCH 2/5] change formatting of some paragraphs some paragraphs were formatted as code leading to strange rendering in html. change them to italic --- lib/DBIx/Class/Manual/Intro.pod | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index 2b3aaacfa..533dfe0db 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -22,7 +22,7 @@ class defines one Table, which defines the Columns it has, along with any Relationships it has to other tables. (And oh, so much more besides) The important thing to understand: - A Result class == Table +I (most of the time, but just bear with my simplification) @@ -50,8 +50,7 @@ You could easily achieve it. The important thing to understand: - Any time you would reach for a SQL query in DBI, you are - creating a DBIx::Class::ResultSet. +I =head2 Search is like "prepare" @@ -61,8 +60,7 @@ use a method that wants to access the data. (Such as "next", or "first") The important thing to understand: - Setting up a ResultSet does not execute the query; retrieving - the data does. +I =head2 Search results are returned as Rows From d3ff7adc2cdee36f4a6f96053b02440ff183b508 Mon Sep 17 00:00:00 2001 From: Jason Lewis Date: Thu, 25 Feb 2016 22:33:22 +1100 Subject: [PATCH 3/5] change italic to bold for emphasis --- lib/DBIx/Class/Manual/Intro.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index 533dfe0db..e1b33ee76 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -22,7 +22,7 @@ class defines one Table, which defines the Columns it has, along with any Relationships it has to other tables. (And oh, so much more besides) The important thing to understand: -I +B (most of the time, but just bear with my simplification) @@ -50,7 +50,7 @@ You could easily achieve it. The important thing to understand: -I +B =head2 Search is like "prepare" @@ -60,7 +60,7 @@ use a method that wants to access the data. (Such as "next", or "first") The important thing to understand: -I +B =head2 Search results are returned as Rows From 25ac72b18157fa5733022658cd2a3d6529dd60ba Mon Sep 17 00:00:00 2001 From: Jason Lewis Date: Thu, 25 Feb 2016 23:53:13 +1100 Subject: [PATCH 4/5] Revert "change italic to bold for emphasis" This reverts commit d3ff7adc2cdee36f4a6f96053b02440ff183b508. --- lib/DBIx/Class/Manual/Intro.pod | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index e1b33ee76..533dfe0db 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -22,7 +22,7 @@ class defines one Table, which defines the Columns it has, along with any Relationships it has to other tables. (And oh, so much more besides) The important thing to understand: -B +I (most of the time, but just bear with my simplification) @@ -50,7 +50,7 @@ You could easily achieve it. The important thing to understand: -B +I =head2 Search is like "prepare" @@ -60,7 +60,7 @@ use a method that wants to access the data. (Such as "next", or "first") The important thing to understand: -B +I =head2 Search results are returned as Rows From 2f5e60c6d72e256a823520a7205b2911675653c0 Mon Sep 17 00:00:00 2001 From: Jason Lewis Date: Sun, 28 Feb 2016 19:34:13 +1100 Subject: [PATCH 5/5] fix typo --- lib/DBIx/Class/Manual/Intro.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DBIx/Class/Manual/Intro.pod b/lib/DBIx/Class/Manual/Intro.pod index 533dfe0db..96aa44f1f 100644 --- a/lib/DBIx/Class/Manual/Intro.pod +++ b/lib/DBIx/Class/Manual/Intro.pod @@ -364,7 +364,7 @@ In list context, the C method returns all of the matching rows: We also provide a way to do C searches: # Find albums whose artist starts with 'Jimi' - my $rs = $schema-resultset('Album')->search({ artist => { like => 'Jimi%' } }); + my $rs = $schema->resultset('Album')->search({ artist => { like => 'Jimi%' } }); Or you can provide your own C clause: