... | ... |
@@ -587,32 +587,32 @@ Provide suger methods, such as insert(), update(), delete(), and select(). |
587 | 587 |
|
588 | 588 |
=head2 C<user> |
589 | 589 |
|
590 |
- $dbi = $dbi->user('Ken'); |
|
591 |
- $user = $dbi->user; |
|
590 |
+ my $user = $dbi->user; |
|
591 |
+ $dbi = $dbi->user('Ken'); |
|
592 | 592 |
|
593 | 593 |
Database user name. |
594 | 594 |
This is used for connect(). |
595 | 595 |
|
596 | 596 |
=head2 C<password> |
597 | 597 |
|
598 |
- $dbi = $dbi->password('lkj&le`@s'); |
|
599 |
- $password = $dbi->password; |
|
598 |
+ my $password = $dbi->password; |
|
599 |
+ $dbi = $dbi->password('lkj&le`@s'); |
|
600 | 600 |
|
601 | 601 |
Database password. |
602 | 602 |
This is used for connect(). |
603 | 603 |
|
604 | 604 |
=head2 C<data_source> |
605 | 605 |
|
606 |
- $dbi = $dbi->data_source("dbi:mysql:dbname=$database"); |
|
607 |
- $data_source = $dbi->data_source; |
|
606 |
+ my $data_source = $dbi->data_source; |
|
607 |
+ $dbi = $dbi->data_source("dbi:mysql:dbname=$database"); |
|
608 | 608 |
|
609 | 609 |
Database data source. |
610 | 610 |
This is used for connect(). |
611 | 611 |
|
612 | 612 |
=head2 C<dbh> |
613 | 613 |
|
614 |
- $dbi = $dbi->dbh($dbh); |
|
615 |
- $dbh = $dbi->dbh; |
|
614 |
+ my $dbh = $dbi->dbh; |
|
615 |
+ $dbi = $dbi->dbh($dbh); |
|
616 | 616 |
|
617 | 617 |
Database handle. This is a L<DBI> object. |
618 | 618 |
You can call all methods of L<DBI> |
... | ... |
@@ -625,8 +625,8 @@ You can call all methods of L<DBI> |
625 | 625 |
|
626 | 626 |
=head2 C<filters> |
627 | 627 |
|
628 |
- $dbi = $dbi->filters({%filters}); |
|
629 |
- $filters = $dbi->filters; |
|
628 |
+ my $filters = $dbi->filters; |
|
629 |
+ $dbi = $dbi->filters({%filters}); |
|
630 | 630 |
|
631 | 631 |
Filter functions. |
632 | 632 |
By default, "encode_utf8" and "decode_utf8" is registered. |
... | ... |
@@ -636,33 +636,33 @@ By default, "encode_utf8" and "decode_utf8" is registered. |
636 | 636 |
|
637 | 637 |
=head2 C<default_bind_filter> |
638 | 638 |
|
639 |
- $dbi = $dbi->default_bind_filter('encode_utf8'); |
|
640 |
- $default_bind_filter = $dbi->default_bind_filter |
|
639 |
+ my $default_bind_filter = $dbi->default_bind_filter |
|
640 |
+ $dbi = $dbi->default_bind_filter('encode_utf8'); |
|
641 | 641 |
|
642 | 642 |
Default filter for value binding |
643 | 643 |
|
644 | 644 |
=head2 C<default_fetch_filter> |
645 | 645 |
|
646 |
- $dbi = $dbi->default_fetch_filter('decode_utf8'); |
|
647 |
- $default_fetch_filter = $dbi->default_fetch_filter; |
|
646 |
+ my $default_fetch_filter = $dbi->default_fetch_filter; |
|
647 |
+ $dbi = $dbi->default_fetch_filter('decode_utf8'); |
|
648 | 648 |
|
649 | 649 |
Default filter for fetching. |
650 | 650 |
|
651 | 651 |
=head2 C<result_class> |
652 | 652 |
|
653 |
- $dbi = $dbi->result_class('DBIx::Custom::Result'); |
|
654 |
- $result_class = $dbi->result_class; |
|
653 |
+ my $result_class = $dbi->result_class; |
|
654 |
+ $dbi = $dbi->result_class('DBIx::Custom::Result'); |
|
655 | 655 |
|
656 | 656 |
Result class for select statement. |
657 | 657 |
Default to L<DBIx::Custom::Result>. |
658 | 658 |
|
659 | 659 |
=head2 C<sql_builder> |
660 | 660 |
|
661 |
- $dbi = $dbi->sql_builder('DBIx::Cutom::QueryBuilder); |
|
662 |
- $sql_class = $dbi->sql_builder; |
|
661 |
+ my $sql_class = $dbi->sql_builder; |
|
662 |
+ $dbi = $dbi->sql_builder(DBIx::Custom::QueryBuilder->new); |
|
663 | 663 |
|
664 |
-SQL builder. sql_builder_class must be |
|
665 |
-the instance of L<DBIx::Cutom::QueryBuilder> subclass |
|
664 |
+SQL builder. sql_builder must be |
|
665 |
+the instance of L<DBIx::Custom::QueryBuilder> subclass |
|
666 | 666 |
Default to DBIx::Custom::QueryBuilder. |
667 | 667 |
|
668 | 668 |
=head1 METHODS |
... | ... |
@@ -36,7 +36,7 @@ sub last_insert_id { shift->dbh->{mysql_insertid} } |
36 | 36 |
|
37 | 37 |
=head1 NAME |
38 | 38 |
|
39 |
-DBIx::Custom::MySQL - Implementation for MySQL |
|
39 |
+DBIx::Custom::MySQL - MySQL implementation |
|
40 | 40 |
|
41 | 41 |
=head1 SYNOPSYS |
42 | 42 |
|
... | ... |
@@ -55,16 +55,16 @@ You can use all attributes of L<DBIx::Custom> |
55 | 55 |
|
56 | 56 |
=head2 C<database> |
57 | 57 |
|
58 |
- $dbi = $dbi->database('your_database'); |
|
59 |
- $database = $dbi->database; |
|
58 |
+ my $database = $dbi->database; |
|
59 |
+ $dbi = $dbi->database('your_database'); |
|
60 | 60 |
|
61 | 61 |
Database name. |
62 | 62 |
This is used for connect(). |
63 | 63 |
|
64 | 64 |
=head2 C<host> |
65 | 65 |
|
66 |
- $dbi = $dbi->host('somehost.com'); |
|
67 |
- $host = $dbi->host; |
|
66 |
+ my $host = $dbi->host; |
|
67 |
+ $dbi = $dbi->host('somehost.com'); |
|
68 | 68 |
|
69 | 69 |
Database host name. |
70 | 70 |
You can also set IP address, instead of host name. |
... | ... |
@@ -74,8 +74,8 @@ This is used for connect(). |
74 | 74 |
|
75 | 75 |
=head2 C<port> |
76 | 76 |
|
77 |
- $dbi = $dbi->port(1198); |
|
78 |
- $port = $dbi->port; |
|
77 |
+ my $port = $dbi->port; |
|
78 |
+ $dbi = $dbi->port(1198); |
|
79 | 79 |
|
80 | 80 |
Database port. This is used for connect(). |
81 | 81 |
|
... | ... |
@@ -21,36 +21,36 @@ DBIx::Custom::Query - Query |
21 | 21 |
|
22 | 22 |
=head2 C<sql> |
23 | 23 |
|
24 |
- $query = $query->sql($sql); |
|
25 |
- $sql = $query->sql; |
|
24 |
+ my $sql = $query->sql; |
|
25 |
+ $query = $query->sql($sql); |
|
26 | 26 |
|
27 | 27 |
SQL statement. |
28 | 28 |
|
29 | 29 |
=head2 C<columns> |
30 | 30 |
|
31 |
- $query = $query->columns([@columns]); |
|
32 |
- $columns = $query->columns; |
|
31 |
+ my $columns = $query->columns; |
|
32 |
+ $query = $query->columns(\@columns); |
|
33 | 33 |
|
34 | 34 |
Column names. |
35 | 35 |
|
36 | 36 |
=head2 C<default_filter> |
37 | 37 |
|
38 |
- $query = $query->default_filter($filter); |
|
39 |
- $default_filter = $query->default_filter; |
|
38 |
+ my $default_filter = $query->default_filter; |
|
39 |
+ $query = $query->default_filter($filter); |
|
40 | 40 |
|
41 | 41 |
Default filter for value binding. |
42 | 42 |
|
43 | 43 |
=head2 C<filter> |
44 | 44 |
|
45 |
- $query = $query->filter({%filter}); |
|
46 |
- $filter = $query->filter; |
|
45 |
+ my $filter = $query->filter; |
|
46 |
+ $query = $query->filter(\%filter); |
|
47 | 47 |
|
48 | 48 |
Filters for value binding |
49 | 49 |
|
50 | 50 |
=head2 C<sth> |
51 | 51 |
|
52 |
- $query = $query->sth($sth); |
|
53 |
- $sth = $query->sth; |
|
52 |
+ my $sth = $query->sth; |
|
53 |
+ $query = $query->sth($sth); |
|
54 | 54 |
|
55 | 55 |
Statement handle. |
56 | 56 |
|
... | ... |
@@ -166,7 +166,7 @@ sub fetch_hash_all { |
166 | 166 |
|
167 | 167 |
=head1 NAME |
168 | 168 |
|
169 |
-DBIx::Custom::Result - Manipulate the result of select statement |
|
169 |
+DBIx::Custom::Result - Result of select |
|
170 | 170 |
|
171 | 171 |
=head1 SYNOPSIS |
172 | 172 |
|
... | ... |
@@ -215,22 +215,22 @@ DBIx::Custom::Result - Manipulate the result of select statement |
215 | 215 |
|
216 | 216 |
=head2 C<sth> |
217 | 217 |
|
218 |
+ my $sth = $reuslt->sth |
|
218 | 219 |
$result = $result->sth($sth); |
219 |
- $sth = $reuslt->sth |
|
220 | 220 |
|
221 | 221 |
Statement handle. |
222 | 222 |
|
223 | 223 |
=head2 C<default_filter> |
224 | 224 |
|
225 |
- $result = $result->default_filter('decode_utf8'); |
|
226 |
- $default_filter = $result->default_filter; |
|
225 |
+ my $default_filter = $result->default_filter; |
|
226 |
+ $result = $result->default_filter('decode_utf8'); |
|
227 | 227 |
|
228 | 228 |
Default filter for fetching. |
229 | 229 |
|
230 | 230 |
=head2 C<filter> |
231 | 231 |
|
232 |
+ my $filter = $result->filter; |
|
232 | 233 |
$result = $result->filter({title => 'decode_utf8'}); |
233 |
- $filter = $result->filter; |
|
234 | 234 |
|
235 | 235 |
Filters for fetching. |
236 | 236 |
|
... | ... |
@@ -41,7 +41,7 @@ sub last_insert_rowid { shift->dbh->func('last_insert_rowid') } |
41 | 41 |
|
42 | 42 |
=head1 NAME |
43 | 43 |
|
44 |
-DBIx::Custom::SQLite - Implementation for SQLite |
|
44 |
+DBIx::Custom::SQLite - SQLite implementation |
|
45 | 45 |
|
46 | 46 |
=head1 SYNOPSYS |
47 | 47 |
|
... | ... |
@@ -63,8 +63,8 @@ You can use all attributes of L<DBIx::Custom>. |
63 | 63 |
|
64 | 64 |
=head2 C<database> |
65 | 65 |
|
66 |
- $dbi = $dbi->database('your_database'); |
|
67 |
- $database = $dbi->database; |
|
66 |
+ my $database = $dbi->database; |
|
67 |
+ $dbi = $dbi->database('your_database'); |
|
68 | 68 |
|
69 | 69 |
Database name. |
70 | 70 |
This is used for connect(). |