From: Arthur Axel 'fREW' Schmidt Date: Thu, 3 Jun 2010 01:01:20 +0000 (-0500) Subject: images and some more deets X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2Fdbix-class-introduction-presentation.git;a=commitdiff_plain;h=9158dee587de80006ab1dd2a7cf01a059ed2edd5 images and some more deets --- diff --git a/img/afewrels.png b/img/afewrels.png new file mode 100644 index 0000000..231bb94 Binary files /dev/null and b/img/afewrels.png differ diff --git a/img/authors.png b/img/authors.png new file mode 100644 index 0000000..1c8c250 Binary files /dev/null and b/img/authors.png differ diff --git a/img/belongsto1.png b/img/belongsto1.png new file mode 100644 index 0000000..a7dcc46 Binary files /dev/null and b/img/belongsto1.png differ diff --git a/img/hasmany1.png b/img/hasmany1.png new file mode 100644 index 0000000..59e757c Binary files /dev/null and b/img/hasmany1.png differ diff --git a/img/m2m.png b/img/m2m.png new file mode 100644 index 0000000..3219b0d Binary files /dev/null and b/img/m2m.png differ diff --git a/slideshow.html b/slideshow.html index 6235f98..f94f148 100644 --- a/slideshow.html +++ b/slideshow.html @@ -393,8 +393,17 @@ __PACKAGE__->belongs_to( author =>
+

->deploy

+

Perl -> DB

+
my $schema = Foo::Schema->connect($dsn, $user, $pass);
+$schema->deploy
+
+

See also: DBIx::Class::DeploymentHandler

+
+ +

Schema::Loader

-

DB -> Perl vs Perl -> DB

+

DB -> Perl

package Foo::Schema;
 use strict; use warnings;
 use base 'DBIx::Class::Schema::Loader';
@@ -607,8 +616,7 @@ sub new {
 
    

a few relationships

- (really need picture here) - (authors -- author_link_to_book -- books) +
@@ -625,6 +633,7 @@ ALTER TABLE `books` DROP `author`;

has_many

+
@@ -638,6 +647,7 @@ __PACKAGE__->has_many( author_and_books =>

belongs_to

+
@@ -653,10 +663,12 @@ __PACKAGE__->belongs_to(

same for Authors

+

many_to_many

+
@@ -740,10 +752,6 @@ $book->add_to_authors($author_2);
-

in 16 lines of code

-
- -

errors

Read them closely!

@@ -770,6 +778,17 @@ $book->add_to_authors($author_2);
+

LOTS more Features

+
    +
  • FilterColumn
  • +
  • Transactions
  • +
  • HashRefInflator
  • +
  • Subqueries
  • +
  • ResultSetColumn
  • +
+
+ +

bonus slides!