Showing 4 changed files with 61 additions and 24 deletions
+26 -12
lib/DBIx/Custom/Guides.pod
... ...
@@ -13,20 +13,34 @@ object and connect to the database.
13 13
     my $dbi = DBIx::Custom->connect(data_source => "dbi:mysql:database=dbname",
14 14
                                     user => 'ken', password => '!LFKD%$&');
15 15
 
16
-If database is SQLite, use L<DBIx::Custom::SQLite> instead.
17
-you connect database easily.
16
+B<Data source exmaples:>
18 17
 
19
-    use DBIx::Custom::SQLite;
20
-    my $dbi = DBIx::Custom::SQLite->connect(database => 'dbname');
21
-    
22
-If database is  MySQL, use L<DBIx::Custom::MySQL>.
18
+MySQL
23 19
 
24
-    use DBIx::Custom::MySQL;
25
-    my $dbi = DBIx::Custom::MySQL->connect(
26
-        database => 'dbname',
27
-        user     => 'ken',
28
-        password => '!LFKD%$&'
29
-    );
20
+    "dbi:mysql:database=$database"
21
+    "dbi:mysql:database=$database;host=$hostname;port=$port"
22
+
23
+SQLite
24
+
25
+    "dbi:SQLite:dbname=$database"
26
+    "dbi:SQLite:dbname=:memory:"
27
+
28
+PostgreSQL
29
+
30
+    "dbi:Pg:dbname=$dbname"
31
+
32
+Oracle
33
+
34
+    "dbi:Oracle:$dbname"
35
+    "dbi:Oracle:host=$host;sid=$sid"
36
+
37
+ODBC(Microsoft Access)
38
+
39
+    "dbi:ODBC:driver=Microsoft Access Driver (*.mdb);dbq=hoge.mdb"
40
+
41
+ODBC(SQL Server)
42
+
43
+   "dbi:ODBC:driver={SQL Server};Server=(local);database=test;Trusted_Connection=yes;AutoTranslate=No;"
30 44
 
31 45
 =head2 2. Suger methods
32 46
 
+25 -12
lib/DBIx/Custom/Guides/Ja.pod
... ...
@@ -38,21 +38,34 @@ C<connect()>メソッドを使用します。
38 38
     my $dbi = DBIx::Custom->connect(data_source => "dbi:mysql:database=dbname",
39 39
                                     user => 'ken', password => '!LFKD%$&');
40 40
 
41
-データベースがSQLiteであれば、代わりにL<DBIx::Custom::SQLite>を使うと
42
-データベースへの接続が簡単です。
41
+B<Data sourceのサンプル:>
43 42
 
44
-    use DBIx::Custom::SQLite;
45
-    my $dbi = DBIx::Custom::SQLite->connect(database => 'dbname');
43
+MySQL
46 44
 
47
-データベースがMySQLであれば、代わりにL<DBIx::Custom::MySQL>を使うと
48
-データベースへの接続が簡単です。
45
+    "dbi:mysql:database=$database"
46
+    "dbi:mysql:database=$database;host=$hostname;port=$port"
49 47
 
50
-    use DBIx::Custom::MySQL;
51
-    my $dbi = DBIx::Custom::MySQL->connect(
52
-        database => 'dbname',
53
-        user     => 'ken',
54
-        password => '!LFKD%$&'
55
-    );
48
+SQLite
49
+
50
+    "dbi:SQLite:dbname=$database"
51
+    "dbi:SQLite:dbname=:memory:"
52
+
53
+PostgreSQL
54
+
55
+    "dbi:Pg:dbname=$dbname"
56
+
57
+Oracle
58
+
59
+    "dbi:Oracle:$dbname"
60
+    "dbi:Oracle:host=$host;sid=$sid"
61
+
62
+ODBC(Microsoft Access)
63
+
64
+    "dbi:ODBC:driver=Microsoft Access Driver (*.mdb);dbq=hoge.mdb"
65
+
66
+ODBC(SQL Server)
67
+
68
+   "dbi:ODBC:driver={SQL Server};Server=(local);database=test;Trusted_Connection=yes;AutoTranslate=No;"
56 69
 
57 70
 L<DBIx::Custom>はL<DBI>のラッパです。
58 71
 L<DBI>オブジェクトはC<dbh>で取得することができます。
+5
lib/DBIx/Custom/MySQL.pm
... ...
@@ -34,6 +34,11 @@ sub connect {
34 34
 
35 35
 DBIx::Custom::MySQL - MySQL implementation
36 36
 
37
+=head1 CAUTION
38
+
39
+B<This module is deprecated now> because This module is not very useful
40
+I expected. Please use DBIx::Custom instead.>
41
+
37 42
 =head1 SYNOPSYS
38 43
 
39 44
     # Connect to the database
+5
lib/DBIx/Custom/SQLite.pm
... ...
@@ -40,6 +40,11 @@ sub connect_memory {
40 40
 
41 41
 DBIx::Custom::SQLite - SQLite implementation
42 42
 
43
+=head1 CAUTION
44
+
45
+B<This module is deprecated now> because This module is not very useful
46
+I expected. Please use DBIx::Custom instead.>
47
+
43 48
 =head1 SYNOPSYS
44 49
 
45 50
     use DBIx::Custom::SQLite;