Permalink
Browse files

Update FakeDBD::Pg to MiniDBD::Pg

  • Loading branch information...
1 parent 217a2b8 commit 5abdea88d13e7ba425633889ce155723704aa9e3 Dave Olszewski committed Jul 2, 2010
Showing with 35 additions and 35 deletions.
  1. +16 −16 Makefile
  2. +18 −18 lib/{FakeDBD → MiniDBD}/Pg.pm6
  3. +1 −1 lib/MiniDBI.pm6
View
@@ -22,43 +22,43 @@ lib/MiniDBD/CSV.pir: lib/MiniDBD/CSV.pm6 lib/MiniDBD.pir
lib/MiniDBD/mysql.pir: lib/MiniDBD/mysql.pm6 lib/MiniDBD.pir
export PERL6LIB=lib; $(PERL6_EXE) --target=pir --output=lib/MiniDBD/mysql.pir lib/MiniDBD/mysql.pm6
-lib/FakeDBD/Pg.pir: lib/FakeDBD/Pg.pm6 lib/MiniDBD.pir
- export PERL6LIB=lib; $(PERL6_EXE) --target=pir --output=lib/FakeDBD/Pg.pir lib/FakeDBD/Pg.pm6
+lib/MiniDBD/Pg.pir: lib/MiniDBD/Pg.pm6 lib/MiniDBD.pir
+ export PERL6LIB=lib; $(PERL6_EXE) --target=pir --output=lib/MiniDBD/Pg.pir lib/MiniDBD/Pg.pm6
lib/MiniDBD/PgPir.pir: lib/MiniDBD/PgPir.pm6 lib/MiniDBD.pir
export PERL6LIB=lib; $(PERL6_EXE) --target=pir --output=lib/MiniDBD/PgPir.pir lib/MiniDBD/PgPir.pm6
-lib/MiniDBI.pir: lib/MiniDBI.pm6 lib/MiniDBD/CSV.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/FakeDBD/Pg.pir
+lib/MiniDBI.pir: lib/MiniDBI.pm6 lib/MiniDBD/CSV.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/MiniDBD/Pg.pir
export PERL6LIB=lib; $(PERL6_EXE) --target=pir --output=lib/MiniDBI.pir lib/MiniDBI.pm6
-test: lib/MiniDBI.pir lib/MiniDBD/CSV.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/FakeDBD/Pg.pir
+test: lib/MiniDBI.pir lib/MiniDBD/CSV.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/MiniDBD/Pg.pir
@#export PERL6LIB=lib; prove --exec $(PERL6_EXE) t/10-mysql.t
@#export PERL6LIB=lib; prove --exec $(PERL6_EXE) t/20-CSV-common.t
@#export PERL6LIB=lib; prove --exec $(PERL6_EXE) t/25-mysql-common.t
@#export PERL6LIB=lib; prove --exec $(PERL6_EXE) t/30-pgpir.t
export PERL6LIB=lib; prove --exec $(PERL6_EXE) t/
# standard install is to the shared system wide directory
-install: lib/MiniDBI.pir lib/MiniDBD.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/FakeDBD/Pg.pir
+install: lib/MiniDBI.pir lib/MiniDBD.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/MiniDBD/Pg.pir
@echo "--> $(LIBSYSTEM)"
@$(CP) lib/MiniDBI.pm6 lib/MiniDBI.pir $(LIBSYSTEM)
@$(CP) lib/MiniDBD.pm6 lib/MiniDBD.pir $(LIBSYSTEM)
@$(MKPATH) $(LIBSYSTEM)/MiniDBD
@$(CP) lib/MiniDBD/CSV.pm6 lib/MiniDBD/CSV.pir $(LIBSYSTEM)/MiniDBD
@$(CP) lib/MiniDBD/mysql.pm6 lib/MiniDBD/mysql.pir $(LIBSYSTEM)/MiniDBD
@$(CP) lib/MiniDBD/PgPir.pm6 lib/MiniDBD/PgPir.pir $(LIBSYSTEM)/MiniDBD
- @$(CP) lib/FakeDBD/Pg.pm6 lib/FakeDBD/Pg.pir $(LIBSYSTEM)/FakeDBD
+ @$(CP) lib/MiniDBD/Pg.pm6 lib/MiniDBD/Pg.pir $(LIBSYSTEM)/MiniDBD
# if user has no permission to install globally, try a personal directory
-install-user: lib/MiniDBI.pir lib/MiniDBD.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/FakeDBD/Pg.pir
+install-user: lib/MiniDBI.pir lib/MiniDBD.pir lib/MiniDBD/mysql.pir lib/MiniDBD/PgPir.pir lib/MiniDBD/Pg.pir
@echo "--> $(LIBUSER)"
@$(CP) lib/MiniDBI.pm6 lib/MiniDBI.pir $(LIBUSER)
@$(CP) lib/MiniDBD.pm6 lib/MiniDBD.pir $(LIBUSER)
@$(MKPATH) $(LIBUSER)/MiniDBD
@$(CP) lib/MiniDBD/CSV.pm6 lib/MiniDBD/CSV.pir $(LIBUSER)/MiniDBD
@$(CP) lib/MiniDBD/mysql.pm6 lib/MiniDBD/mysql.pir $(LIBUSER)/MiniDBD
@$(CP) lib/MiniDBD/PgPir.pm6 lib/MiniDBD/PgPir.pir $(LIBUSER)/MiniDBD
- @$(CP) lib/FakeDBD/Pg.pm6 lib/FakeDBD/Pg.pir $(LIBUSER)/FakeDBD
+ @$(CP) lib/MiniDBD/Pg.pm6 lib/MiniDBD/Pg.pir $(LIBUSER)/MiniDBD
# Uninstall from the shared system wide directory.
# This might leave an empty MiniDBD subdirectory behind.
@@ -80,10 +80,10 @@ uninstall:
@$(RM_F) $(LIBSYSTEM)/MiniDBD/PgPir.pm6
@$(TEST_F) $(LIBSYSTEM)/MiniDBD/PgPir.pir
@$(RM_F) $(LIBSYSTEM)/MiniDBD/PgPir.pir
- @$(TEST_F) $(LIBSYSTEM)/FakeDBD/Pg.pm6
- @$(RM_F) $(LIBSYSTEM)/FakeDBD/Pg.pm6
- @$(TEST_F) $(LIBSYSTEM)/FakeDBD/Pg.pir
- @$(RM_F) $(LIBSYSTEM)/FakeDBD/Pg.pir
+ @$(TEST_F) $(LIBSYSTEM)/MiniDBD/Pg.pm6
+ @$(RM_F) $(LIBSYSTEM)/MiniDBD/Pg.pm6
+ @$(TEST_F) $(LIBSYSTEM)/MiniDBD/Pg.pir
+ @$(RM_F) $(LIBSYSTEM)/MiniDBD/Pg.pir
# Uninstall from the user's own Perl 6 directory.
# This might leave an empty MiniDBD subdirectory behind.
@@ -105,10 +105,10 @@ uninstall-user:
@$(RM_F) $(LIBUSER)/MiniDBD/PgPir.pm6
@$(TEST_F) $(LIBUSER)/MiniDBD/PgPir.pir
@$(RM_F) $(LIBUSER)/MiniDBD/PgPir.pir
- @$(TEST_F) $(LIBUSER)/FakeDBD/Pg.pm6
- @$(RM_F) $(LIBUSER)/FakeDBD/Pg.pm6
- @$(TEST_F) $(LIBUSER)/FakeDBD/Pg.pir
- @$(RM_F) $(LIBUSER)/FakeDBD/Pg.pir
+ @$(TEST_F) $(LIBUSER)/MiniDBD/Pg.pm6
+ @$(RM_F) $(LIBUSER)/MiniDBD/Pg.pm6
+ @$(TEST_F) $(LIBUSER)/MiniDBD/Pg.pir
+ @$(RM_F) $(LIBUSER)/MiniDBD/Pg.pir
clean:
@# delete compiled files
@@ -1,9 +1,9 @@
-# FakeDBD::Pg.pm6
+# MiniDBD::Pg.pm6
use NativeCall; # from project 'zavolaj'
-use FakeDBD; # roles for drivers
+use MiniDBD; # roles for drivers
-#module FakeDBD:auth<mberends>:ver<0.0.1>;
+#module MiniDBD:auth<mberends>:ver<0.0.1>;
#------------ Pg library functions in alphabetical order ------------
@@ -73,7 +73,7 @@ sub PGRES_COPY_IN { 4 }
#-----------------------------------------------------------------------
-class FakeDBD::Pg::StatementHandle does FakeDBD::StatementHandle {
+class MiniDBD::Pg::StatementHandle does MiniDBD::StatementHandle {
has $!pg_conn;
has $!RaiseError;
has $!statement;
@@ -298,15 +298,15 @@ class FakeDBD::Pg::StatementHandle does FakeDBD::StatementHandle {
}
}
-class FakeDBD::Pg::Connection does FakeDBD::Connection {
+class MiniDBD::Pg::Connection does MiniDBD::Connection {
has $!pg_conn;
has $!RaiseError;
has $.AutoCommit is rw = 1;
has $.in_transaction is rw;
method prepare(Str $statement, $attr?) {
- my $statement_handle = FakeDBD::Pg::StatementHandle.bless(
- FakeDBD::Pg::StatementHandle.CREATE(),
+ my $statement_handle = MiniDBD::Pg::StatementHandle.bless(
+ MiniDBD::Pg::StatementHandle.CREATE(),
pg_conn => $!pg_conn,
statement => $statement,
RaiseError => $!RaiseError,
@@ -378,11 +378,11 @@ class FakeDBD::Pg::Connection does FakeDBD::Connection {
}
}
-class FakeDBD::Pg:auth<mberends>:ver<0.0.1> {
+class MiniDBD::Pg:auth<mberends>:ver<0.0.1> {
has $.Version = 0.01;
-#------------------ methods to be called from FakeDBI ------------------
+#------------------ methods to be called from MiniDBI ------------------
method connect( Str $user, Str $password, Str $params, $RaiseError ) {
my @params = $params.split(';');
my %params;
@@ -398,8 +398,8 @@ class FakeDBD::Pg:auth<mberends>:ver<0.0.1> {
my $status = PQstatus($pg_conn);
my $connection;
if $status eq CONNECTION_OK() {
- $connection = FakeDBD::Pg::Connection.bless(
- FakeDBD::Pg::Connection.CREATE(),
+ $connection = MiniDBD::Pg::Connection.bless(
+ MiniDBD::Pg::Connection.CREATE(),
pg_conn => $pg_conn,
RaiseError => $RaiseError
);
@@ -411,18 +411,18 @@ class FakeDBD::Pg:auth<mberends>:ver<0.0.1> {
=begin pod
=head1 DESCRIPTION
-# 'zavolaj' is a Native Call Interface for Rakudo/Parrot. 'FakeDBI' and
-# 'FakeDBD::Pg' are Perl 6 modules that use 'zavolaj' to use the
+# 'zavolaj' is a Native Call Interface for Rakudo/Parrot. 'MiniDBI' and
+# 'MiniDBD::Pg' are Perl 6 modules that use 'zavolaj' to use the
# standard libpq library. There is a long term Parrot based
# project to develop a new, comprehensive DBI architecture for Parrot
-# and Perl 6. FakeDBI is not that, it is a naive rewrite of the
-# similarly named Perl 5 modules. Hence the 'Fake' part of the name.
+# and Perl 6. MiniDBI is not that, it is a naive rewrite of the
+# similarly named Perl 5 modules. Hence the 'Mini' part of the name.
=head1 CLASSES
-The FakeDBD::Pg module contains the same classes and methods as every
+The MiniDBD::Pg module contains the same classes and methods as every
database driver. Therefore read the main documentation of usage in
-L<doc:FakeDBI> and internal architecture in L<doc:FakeDBD>. Below are
-only notes about code unique to the FakeDBD::Pg implementation.
+L<doc:MiniDBI> and internal architecture in L<doc:MiniDBD>. Below are
+only notes about code unique to the MiniDBD::Pg implementation.
=head1 SEE ALSO
The Postgres 8.4 Documentation, C Library.
View
@@ -28,7 +28,7 @@ class MiniDBI:auth<mberends>:ver<0.1.0> {
when 'CSV' { eval 'use MiniDBD::CSV; $driver = MiniDBD::CSV.new()' }
when 'mysql' { eval 'use MiniDBD::mysql; $driver = MiniDBD::mysql.new()' }
when 'PgPir' { eval 'use MiniDBD::PgPir; $driver = MiniDBD::PgPir.new()' }
- when 'Pg' { eval 'use FakeDBD::Pg; $driver = FakeDBD::Pg.new()' }
+ when 'Pg' { eval 'use MiniDBD::Pg; $driver = MiniDBD::Pg.new()' }
default { die "driver name '$drivername' is not known"; }
}
return $driver;

0 comments on commit 5abdea8

Please sign in to comment.