X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=slideshow.html;h=485e759559ff4eb4b23ac3b7ee6559d7874927c2;hb=refs%2Fheads%2Fmaster;hp=da96a639fe4bfacf4f43358e8ba25095a41f7a6d;hpb=63d0b68044758e41e028b934c15d79609fc8b701;p=dbsrgits%2Fdbix-class-introduction-presentation.git
diff --git a/slideshow.html b/slideshow.html
index da96a63..485e759 100644
--- a/slideshow.html
+++ b/slideshow.html
@@ -74,6 +74,15 @@
+
+
Authors
Originally Leo Lapworth @ LPW 2009
Amiri Barksdale
@@ -89,7 +98,7 @@
DBIC?
Class::DBI?
Rose::DB?
- Fey?
+ Fey::ORM?
Others?
AR?
@@ -272,6 +281,33 @@ $delete->execute($book_id);
+
SQL: Search
+
my $sth = $dbh->prepare('
+ SELECT title,
+ authors.name as author_name
+ FROM books
+ WHERE books.name LIKE "%monte cristo%" AND
+ books.topic = "jailbreak"
+');
+
+
+
+
+
DBIC: Search
+
+my $book = $book_rs->search({
+ 'me.name' => { -like => '%monte cristo%' },
+ 'me.topic' => 'jailbreak',
+})->next;
+
+
+
+
+
OO Overidability
- Override new if you want to do validation
@@ -423,17 +459,6 @@ my $schema = Foo::Schema->connect(
-
-
my $resultset = $book_rs->search({
- name => { -like => "%$nick%" },
-});
-
- - (kinda) introspectible
- - Prettier than SQL
-
-
-
-