You can subscribe to this list here.
| 2002 |
Jan
|
Feb
(3) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(2) |
Jul
(37) |
Aug
(3) |
Sep
(24) |
Oct
(31) |
Nov
|
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(3) |
Feb
(7) |
Mar
|
Apr
(11) |
May
(15) |
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Michael N. <mne...@us...> - 2002-09-05 09:55:38
|
Update of /cvsroot/ruby-dbi/subprojects/ruby-db2/ext/db2 In directory usw-pr-cvs1:/tmp/cvs-serv2578/db2 Log Message: Directory /cvsroot/ruby-dbi/subprojects/ruby-db2/ext/db2 added to the repository |
|
From: Michael N. <mne...@us...> - 2002-09-05 09:55:21
|
Update of /cvsroot/ruby-dbi/subprojects/ruby-db2/utils In directory usw-pr-cvs1:/tmp/cvs-serv2500/utils Log Message: Directory /cvsroot/ruby-dbi/subprojects/ruby-db2/utils added to the repository |
|
From: Michael N. <mne...@us...> - 2002-09-05 09:55:21
|
Update of /cvsroot/ruby-dbi/subprojects/ruby-db2/lib In directory usw-pr-cvs1:/tmp/cvs-serv2500/lib Log Message: Directory /cvsroot/ruby-dbi/subprojects/ruby-db2/lib added to the repository |
|
From: Michael N. <mne...@us...> - 2002-09-05 09:55:21
|
Update of /cvsroot/ruby-dbi/subprojects/ruby-db2/samples In directory usw-pr-cvs1:/tmp/cvs-serv2500/samples Log Message: Directory /cvsroot/ruby-dbi/subprojects/ruby-db2/samples added to the repository |
|
From: Michael N. <mne...@us...> - 2002-09-05 09:55:21
|
Update of /cvsroot/ruby-dbi/subprojects/ruby-db2/ext In directory usw-pr-cvs1:/tmp/cvs-serv2500/ext Log Message: Directory /cvsroot/ruby-dbi/subprojects/ruby-db2/ext added to the repository |
|
From: Michael N. <mne...@us...> - 2002-09-05 09:55:05
|
Update of /cvsroot/ruby-dbi/subprojects/ruby-db2 In directory usw-pr-cvs1:/tmp/cvs-serv2367/ruby-db2 Log Message: Directory /cvsroot/ruby-dbi/subprojects/ruby-db2 added to the repository |
|
From: Michael N. <mne...@us...> - 2002-09-05 09:48:43
|
Update of /cvsroot/ruby-dbi/subprojects In directory usw-pr-cvs1:/tmp/cvs-serv777 Log Message: initial import Status: Vendor Tag: mneumann Release Tags: start No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
|
From: Michael N. <mne...@us...> - 2002-08-02 14:00:01
|
Update of /cvsroot/ruby-dbi/src/contrib/dbrc
In directory usw-pr-cvs1:/tmp/cvs-serv32587
Modified Files:
dbrc.rb
Log Message:
added dsn method, minor doc additions
Index: dbrc.rb
===================================================================
RCS file: /cvsroot/ruby-dbi/src/contrib/dbrc/dbrc.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dbrc.rb 26 Jul 2002 18:12:03 -0000 1.1
+++ dbrc.rb 2 Aug 2002 13:59:56 -0000 1.2
@@ -18,6 +18,9 @@
puts dbrc.timeout
puts dbrc.max_reconn
puts dbrc.interval
+ puts dbrc.dsn
+
+ dbh = DBI.connect(dbrc.dsn, dbrc.user, dbrc.password)
= Requirements
The 'etc' module
@@ -79,11 +82,23 @@
The number of seconds to wait before attempting to reconnect to the database
again should a network/database glitch occur.
+--- <dsn>
+ Returns a string in "dbi:<driver>:<database>" format.
+
= Summary
These "methods" don't really do anything. They're simply meant as a convenience
mechanism for you dbi connections, plus a little bit of obfuscation (for passwords).
+= Changelog
+
+--- 0.1.1 - 14:54 on 26-Jul-2002
+ - Added 'dsn()' method
+ - Minor documentation additions
+
+--- 0.1.0 - 12:24 on 26-Jul-2002
+ - Initial release
+
= Author
Daniel J. Berger
@@ -94,7 +109,7 @@
require 'etc'
class DBRC
- attr_accessor :db, :user, :password, :driver
+ attr_accessor :db, :user, :password, :driver, :dsn
attr_accessor :max_reconn, :timeout, :interval
def initialize(db,user=nil)
@@ -153,6 +168,8 @@
@timeout = a[4]
@max_reconn = a[5]
@interval = a[6]
+
+ @dsn = "dbi:" + a[3] + ":" + @db
end
f.close
|
|
From: Michael N. <mne...@us...> - 2002-08-01 19:02:30
|
Update of /cvsroot/ruby-dbi/src/lib/dbi/doc In directory usw-pr-cvs1:/tmp/cvs-serv8781 Modified Files: ChangeLog Log Message: * Index: ChangeLog =================================================================== RCS file: /cvsroot/ruby-dbi/src/lib/dbi/doc/ChangeLog,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- ChangeLog 26 Jul 2002 18:14:57 -0000 1.22 +++ ChangeLog 1 Aug 2002 19:02:25 -0000 1.23 @@ -7,7 +7,9 @@ * dbd_pg: enhanced conversion: default is to_str, added timestamp (with/without timezone) -* dbi.rb: added Timestamp#to_time/to_date (Dave Thomas) +* dbi.rb: Date#to_time/to_date/mday/mday= + Time#to_time + Timestamp#to_time/to_date mday/mday= (Dave Thomas) : 0.0.16 (2002-07-03) |
|
From: Michael N. <mne...@us...> - 2002-08-01 19:00:26
|
Update of /cvsroot/ruby-dbi/src/lib/dbi
In directory usw-pr-cvs1:/tmp/cvs-serv6668
Modified Files:
dbi.rb
Log Message:
added Date#to_time/to_date/mday/mday= Time#to_time Timestamp#mday/mday= (Dave Thomas)
Index: dbi.rb
===================================================================
RCS file: /cvsroot/ruby-dbi/src/lib/dbi/dbi.rb,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- dbi.rb 26 Jul 2002 20:43:23 -0000 1.33
+++ dbi.rb 1 Aug 2002 19:00:20 -0000 1.34
@@ -230,10 +230,13 @@
class Date
attr_accessor :year, :month, :day
def initialize(year=0, month=0, day=0)
- if year.is_a? ::Date
+ case year
+ when ::Date
@year, @month, @day = year.year, year.month, year.day
- elsif year.is_a? ::Time
+ @original_date = year
+ when ::Time
@year, @month, @day = year.year, year.month, year.day
+ @original_time = year
else
@year, @month, @day = year, month, day
end
@@ -242,6 +245,17 @@
def mon() @month end
def mon=(val) @month=val end
+ def mday() @day end
+ def mday=(val) @day=val end
+
+ def to_time
+ @original_time || ::Time.local(@year, @month, @day, 0, 0, 0)
+ end
+
+ def to_date
+ @original_date || ::Date.new(@year, @month, @day)
+ end
+
def to_s
"#{@year}-#{@month}-#{@day}"
end
@@ -251,8 +265,10 @@
class Time
attr_accessor :hour, :minute, :second
def initialize(hour=0, minute=0, second=0)
- if hour.is_a? ::Time
+ case hour
+ when ::Time
@hour, @minute, @second = hour.hour, hour.min, hour.sec
+ @original_time = hour
else
@hour, @minute, @second = hour, minute, second
end
@@ -260,9 +276,19 @@
def min() @minute end
def min=(val) @minute=val end
+
def sec() @second end
def sec=(val) @second=val end
+ def to_time
+ if @original_time
+ @original_time
+ else
+ t = ::Time.now
+ ::Time.local(t.year, t.month, t.day, @hour, @min, @sec)
+ end
+ end
+
def to_s
"#{@hour}:#{@minute}:#{@second}"
end
@@ -273,11 +299,12 @@
attr_accessor :year, :month, :day
attr_accessor :hour, :minute, :second, :fraction
def initialize(year=0, month=0, day=0, hour=0, minute=0, second=0, fraction=0)
- if year.is_a? ::Time
+ case year
+ when ::Time
@year, @month, @day = year.year, year.month, year.day
@hour, @minute, @second, @fraction = year.hour, year.min, year.sec, 0
@original_time = year
- elsif year.is_a? ::Date
+ when ::Date
@year, @month, @day = year.year, year.month, year.day
@hour, @minute, @second, @fraction = 0, 0, 0, 0
@original_date = year
@@ -289,6 +316,8 @@
def mon() @month end
def mon=(val) @month=val end
+ def mday() @day end
+ def mday=(val) @day=val end
def min() @minute end
def min=(val) @minute=val end
def sec() @second end
@@ -299,19 +328,11 @@
end
def to_time
- if @original_time
- @original_time
- else
- ::Time.local(@year, @month, @day, @hour, @minute, @second)
- end
+ @original_time || ::Time.local(@year, @month, @day, @hour, @minute, @second)
end
def to_date
- if @original_date
- @original_date
- else
- ::Date.new(@year, @month, @day)
- end
+ @original_date || ::Date.new(@year, @month, @day)
end
end
|
|
From: Michael N. <mne...@us...> - 2002-07-26 20:43:25
|
Update of /cvsroot/ruby-dbi/src/lib/dbi
In directory usw-pr-cvs1:/tmp/cvs-serv18456
Modified Files:
dbi.rb
Log Message:
Time/Date => ::Time/::Date
Index: dbi.rb
===================================================================
RCS file: /cvsroot/ruby-dbi/src/lib/dbi/dbi.rb,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- dbi.rb 26 Jul 2002 17:51:31 -0000 1.32
+++ dbi.rb 26 Jul 2002 20:43:23 -0000 1.33
@@ -302,7 +302,7 @@
if @original_time
@original_time
else
- Time.local(@year, @month, @day, @hour, @minute, @second)
+ ::Time.local(@year, @month, @day, @hour, @minute, @second)
end
end
@@ -310,7 +310,7 @@
if @original_date
@original_date
else
- Date.new(@year, @month, @day)
+ ::Date.new(@year, @month, @day)
end
end
end
|
|
From: Michael N. <mne...@us...> - 2002-07-26 20:41:53
|
Update of /cvsroot/ruby-dbi/src
In directory usw-pr-cvs1:/tmp/cvs-serv18099
Modified Files:
setup.rb
Log Message:
skip CVS directories (Dave Thomas)
Index: setup.rb
===================================================================
RCS file: /cvsroot/ruby-dbi/src/setup.rb,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- setup.rb 6 May 2001 17:59:05 -0000 1.1.1.1
+++ setup.rb 26 Jul 2002 20:41:49 -0000 1.2
@@ -462,6 +462,7 @@
Dir.foreach('.') do |dir|
next if dir[0] == ?.
next unless dir? dir
+ next if dir == "CVS"
path[dir] or raise "abs path for package '#{dir}' not exist"
pack, targ, topfile = path[dir]
|
|
From: Michael N. <mne...@us...> - 2002-07-26 18:15:00
|
Update of /cvsroot/ruby-dbi/src/lib/dbi/doc In directory usw-pr-cvs1:/tmp/cvs-serv7213 Modified Files: ChangeLog Log Message: * Index: ChangeLog =================================================================== RCS file: /cvsroot/ruby-dbi/src/lib/dbi/doc/ChangeLog,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- ChangeLog 3 Jul 2002 20:05:03 -0000 1.21 +++ ChangeLog 26 Jul 2002 18:14:57 -0000 1.22 @@ -1,5 +1,14 @@ =begin +: 0.0.17 + +* contrib: added dbrc (Daniel Berger) + +* dbd_pg: enhanced conversion: default is to_str, added timestamp + (with/without timezone) + +* dbi.rb: added Timestamp#to_time/to_date (Dave Thomas) + : 0.0.16 (2002-07-03) * dbd_pg: Added Statement#fetch_scroll (patch by Stephen Davies). |
|
From: Michael N. <mne...@us...> - 2002-07-26 18:14:09
|
Update of /cvsroot/ruby-dbi/src/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv6993 Modified Files: index.html Log Message: * Index: index.html =================================================================== RCS file: /cvsroot/ruby-dbi/src/doc/html/index.html,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- index.html 3 Jul 2002 20:08:32 -0000 1.24 +++ index.html 26 Jul 2002 18:14:06 -0000 1.25 @@ -90,8 +90,16 @@ <dd> <p>Added method Statement#fetch_scroll for PostgreSQL DBD.</p> </dd> +<dt><a name="label:15" id="label:15">Dave Thomas</a></dt><!-- RDLabel: "Dave Thomas" --> +<dd> +<p>Several enhancements.</p> +</dd> +<dt><a name="label:16" id="label:16">Daniel J. Berger</a></dt><!-- RDLabel: "Daniel J. Berger" --> +<dd> +<p>contrib/dbrc</p> +</dd> </dl> -<h2><a name="label:15" id="label:15">Database Drivers (DBDs)</a></h2><!-- RDLabel: "Database Drivers (DBDs)" --> +<h2><a name="label:17" id="label:17">Database Drivers (DBDs)</a></h2><!-- RDLabel: "Database Drivers (DBDs)" --> <ul> <li><p>ADO (ActiveX Data Objects) <em>(dbd_ado)</em></p> <p>depend on WinOLE from RAA.</p></li> @@ -122,46 +130,46 @@ <li><p>Sybase <em>(dbd_sybase)</em></p> <p>this DBD is currently outdated and will <em>not</em> work with DBI versions > 0.0.4 !!! </p></li> </ul> -<h2><a name="label:16" id="label:16">ChangeLog</a></h2><!-- RDLabel: "ChangeLog" --> +<h2><a name="label:18" id="label:18">ChangeLog</a></h2><!-- RDLabel: "ChangeLog" --> <p>See <a href="http://ruby-dbi.sourceforge.net/ChangeLog.html"><URL:http://ruby-dbi.sourceforge.net/ChangeLog.html></a>.</p> -<h2><a name="label:17" id="label:17">ToDo</a></h2><!-- RDLabel: "ToDo" --> +<h2><a name="label:19" id="label:19">ToDo</a></h2><!-- RDLabel: "ToDo" --> <p>See <a href="http://ruby-dbi.sourceforge.net/ToDo.html"><URL:http://ruby-dbi.sourceforge.net/ToDo.html></a>.</p> -<h2><a name="label:18" id="label:18">Download</a></h2><!-- RDLabel: "Download" --> +<h2><a name="label:20" id="label:20">Download</a></h2><!-- RDLabel: "Download" --> <p>Ruby/DBI is available for from the <a href="http://sourceforge.net/project/showfiles.php?group_id=43737">SourceForge project page</a>.</p> <p>If you're running FreeBSD or NetBSD, have a look at their package collections. FreeBSD has for DBI and each DBD an easy to install package, NetBSD currently only for PostgreSQL but more is to come.</p> <p>A NetBSD package for MySQL is available at <a href="http://www.fantasy-coders.de/ruby/ruby-mysql-2.4.tar.gz"><URL:http://www.fantasy-coders.de/ruby/ruby-mysql-2.4.tar.gz></a>.</p> -<h2><a name="label:19" id="label:19">Installation</a></h2><!-- RDLabel: "Installation" --> +<h2><a name="label:21" id="label:21">Installation</a></h2><!-- RDLabel: "Installation" --> <p>All available DBDs come with this package, but you should only install the DBDs you really need.</p> -<h3><a name="label:20" id="label:20">To install all:</a></h3><!-- RDLabel: "To install all:" --> +<h3><a name="label:22" id="label:22">To install all:</a></h3><!-- RDLabel: "To install all:" --> <pre>ruby setup.rb config ruby setup.rb setup ruby setup.rb install</pre> -<h3><a name="label:21" id="label:21">To install dbi and some DBDs:</a></h3><!-- RDLabel: "To install dbi and some DBDs:" --> +<h3><a name="label:23" id="label:23">To install dbi and some DBDs:</a></h3><!-- RDLabel: "To install dbi and some DBDs:" --> <pre>ruby setup.rb config --with=dbi,dbd_pg.... ruby setup.rb setup ruby setup.rb install</pre> <p>Choose the packages to install by specifing them after the option <code>--with</code>.</p> -<h2><a name="label:22" id="label:22">Mailing List</a></h2><!-- RDLabel: "Mailing List" --> +<h2><a name="label:24" id="label:24">Mailing List</a></h2><!-- RDLabel: "Mailing List" --> <p>A mailinglist for DBI-specific discussions is available from the <a href="http://sourceforge.net/projects/ruby-dbi">SourceForge project page</a>.</p> <p>Our former mailing-list was at <a href="http://groups.yahoo.com/group/ruby-dbi-talk"><URL:http://groups.yahoo.com/group/ruby-dbi-talk></a>; please, don't use it!</p> -<h2><a name="label:23" id="label:23">Documentation</a></h2><!-- RDLabel: "Documentation" --> +<h2><a name="label:25" id="label:25">Documentation</a></h2><!-- RDLabel: "Documentation" --> <p>See the directories lib/*/doc or ext/*/doc for DBI and DBD specific informations.</p> <p>The DBI specification is lib/dbi/doc/DBI_SPEC or lib/dbi/doc/html/DBI_SPEC.html or available from WWW at <a href="http://ruby-dbi.sourceforge.net/DBI_SPEC.html"><URL:http://ruby-dbi.sourceforge.net/DBI_SPEC.html></a>.</p> <p>The DBD specification (how to write a database driver) is lib/dbi/doc/DBD_SPEC or lib/dbi/doc/html/DBD_SPEC.html or available from WWW at <a href="http://ruby-dbi.sourceforge.net/DBD_SPEC.html"><URL:http://ruby-dbi.sourceforge.net/DBD_SPEC.html></a>.</p> -<h2><a name="label:24" id="label:24">Applications</a></h2><!-- RDLabel: "Applications" --> -<h3><a name="label:25" id="label:25">sqlsh.rb</a></h3><!-- RDLabel: "sqlsh.rb" --> +<h2><a name="label:26" id="label:26">Applications</a></h2><!-- RDLabel: "Applications" --> +<h3><a name="label:27" id="label:27">sqlsh.rb</a></h3><!-- RDLabel: "sqlsh.rb" --> <p>The SQL command line interpreter sqlsh.rb is available in directory bin/commandline. It gets installed by default.</p> -<h2><a name="label:26" id="label:26">Examples</a></h2><!-- RDLabel: "Examples" --> +<h2><a name="label:28" id="label:28">Examples</a></h2><!-- RDLabel: "Examples" --> <p>Examples can be found in the examples/ subdirectory. In this directory there is the file proxyserver.rb which has to be run if you use the DBD::Proxy, to access databases remote over a TCP/IP network. </p> -<h3><a name="label:27" id="label:27">A simple example</a></h3><!-- RDLabel: "A simple example" --> +<h3><a name="label:29" id="label:29">A simple example</a></h3><!-- RDLabel: "A simple example" --> <pre>require 'dbi' # connect to a datbase @@ -185,7 +193,7 @@ dbh.do('delete from simple01 where internal_id > 10') dbh.disconnect</pre> -<h3><a name="label:28" id="label:28">The same using Ruby's features</a></h3><!-- RDLabel: "The same using Ruby's features" --> +<h3><a name="label:30" id="label:30">The same using Ruby's features</a></h3><!-- RDLabel: "The same using Ruby's features" --> <pre>require 'dbi' DBI.connect('DBI:Mysql:test', 'testuser', 'testpwd') do | dbh | |
|
From: Michael N. <mne...@us...> - 2002-07-26 18:13:51
|
Update of /cvsroot/ruby-dbi/src/doc In directory usw-pr-cvs1:/tmp/cvs-serv6912 Modified Files: index.rd Log Message: added contributors Index: index.rd =================================================================== RCS file: /cvsroot/ruby-dbi/src/doc/index.rd,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- index.rd 3 Jul 2002 20:07:54 -0000 1.22 +++ index.rd 26 Jul 2002 18:13:47 -0000 1.23 @@ -62,6 +62,10 @@ performance by a factor around 100 : Stephen Davies Added method Statement#fetch_scroll for PostgreSQL DBD. +: Dave Thomas + Several enhancements. +: Daniel J. Berger + contrib/dbrc == Database Drivers (DBDs) |
|
From: Michael N. <mne...@us...> - 2002-07-26 18:12:06
|
Update of /cvsroot/ruby-dbi/src/contrib/dbrc
In directory usw-pr-cvs1:/tmp/cvs-serv6481
Added Files:
README dbrc.rb
Log Message:
initial import
--- NEW FILE: README ---
DBRC
What is it?
A supplement to the dbi module, allowing you to avoid hard-coding
passwords in your programs that make database connections.
What does it do?
It reads entries out of a file called .dbrc, which is meant to be
analogous to the .netrc file (used by programs such as telnet).
The .dbrc file is simply a space separated list of items that
contain the following:
Database name
User name
Password
Driver
Timeout (for connections)
Maximum number of reconnect attempts (for retry blocks)
Interval (seconds between connection attempts)
What's the point?
The point is to provide a bit of obfuscation for passwords and a
bit of convenience, by having all of your database entries in
one place.
Isn't that dangerous?
The rules for the .dbrc file state that it must have perms of
600 and be owned by uid of the script that calls it. That
means that only *you* and *root* should be able to see it.
What it doesn't do:
It does not establish a database connection. It's simply meant
to provide information.
--- NEW FILE: dbrc.rb ---
=begin
= Description
This is a supplement to the dbi module, allowing you to avoid hard-coding
passwords in your programs that make database connections.
= Synopsis
require 'dbi/dbrc'
dbrc = DBRC.new("mydb")
or
dbrc = DBRC.new("mydb","someUser")
puts dbrc.db
puts dbrc.user
puts dbrc.driver
puts dbrc.timeout
puts dbrc.max_reconn
puts dbrc.interval
= Requirements
The 'etc' module
Designed for *nix systems. Untested on Windows.
= Notes on the .dbrc file
This module relies on a file in your home directory called ".dbrc", and it
is meant to be analogous to the ".netrc" file used by programs such as telnet.
The .dbrc file has several conditions that must be met by the module or it
will fail:
1) Permissions must be set to 600.
2) Must be owned by the current user
3) Must be in the following space-separated format:
<database> <user> <password> <driver> <timeout> <maximum reconnects> <interval>
e.g. mydb dan mypass oracle 10 2 30
You may include comments in the .dbrc file by starting the line with a "#" symbol
= Class Methods
--- new(db,?user?)
The constructor takes one or two arguments. The first argument is the database
name. This *must* be provided. If only the database name is passed, the module
will look for the first database entry in the .dbrc file that matches.
The second argument, a user name, is optional. If it is passed, the module will
look for the first entry in the .dbrc file where both the database *and* user
name match.
= Instance Methods
--- <database>
The name of the database. Note that the same entry can appear more than once,
presumably because you have multiple user id's for the same database.
--- <user>
A valid user name for that database.
--- <password>
The password for that user.
--- <driver>
The driver type for that database (Oracle, MySql, etc).
--- <timeout>
The timeout period for a connection before the attempt is dropped.
--- <maximum reconnects>
The maximum number of reconnect attempts that should be made for the the
database. Presumablly, you would use this with a "retry" within a rescue
block.
--- <interval>
The number of seconds to wait before attempting to reconnect to the database
again should a network/database glitch occur.
= Summary
These "methods" don't really do anything. They're simply meant as a convenience
mechanism for you dbi connections, plus a little bit of obfuscation (for passwords).
= Author
Daniel J. Berger
djb...@no... (remove the 'nospam')
=end
require 'etc'
class DBRC
attr_accessor :db, :user, :password, :driver
attr_accessor :max_reconn, :timeout, :interval
def initialize(db,user=nil)
@dbrc = Etc.getpwuid(Process.uid).dir + "/.dbrc"
@db = db
@user = user
check_file()
get_info()
if @user.nil?
raise "No user entry found for: " + @db
end
if @password.nil?
raise "No password entry found for: " + @db
end
end
#+++++++++++++++++++++++++++++++++
# Check ownership and permissions
#+++++++++++++++++++++++++++++++++
def check_file
File.open(@dbrc){ |f|
# Permissions MUST be set to 600
unless (f.stat.mode & 077) == 0
raise RuntimeError, "Bad Permissions", caller
end
# Only the owner may use it
unless f.stat.owned?
raise RuntimeError, "Not Owner", caller
end
}
end
#+++++++++++++++++++++++++++++++++++++++++++++++++++
# Grab info out of the .dbrc file. Ignore comments
#+++++++++++++++++++++++++++++++++++++++++++++++++++
def get_info
f = File.open(@dbrc,"r")
f.each_line do |line|
next if line =~ /^#/
a = line.split('\s+')
next unless a[0] == @db
unless @user.nil?
next unless a[1] == @user
else
@user = a[1]
end
@password = a[2]
@driver = a[3]
@timeout = a[4]
@max_reconn = a[5]
@interval = a[6]
end
f.close
end
end
|
|
From: Michael N. <mne...@us...> - 2002-07-26 18:08:28
|
Update of /cvsroot/ruby-dbi/src/contrib/dbrc In directory usw-pr-cvs1:/tmp/cvs-serv5474/dbrc Log Message: Directory /cvsroot/ruby-dbi/src/contrib/dbrc added to the repository |
|
From: Michael N. <mne...@us...> - 2002-07-26 18:05:44
|
Update of /cvsroot/ruby-dbi/src/contrib In directory usw-pr-cvs1:/tmp/cvs-serv4827/contrib Log Message: Directory /cvsroot/ruby-dbi/src/contrib added to the repository |
|
From: Michael N. <mne...@us...> - 2002-07-26 17:56:47
|
Update of /cvsroot/ruby-dbi/src/lib/dbd_pg
In directory usw-pr-cvs1:/tmp/cvs-serv1796
Modified Files:
Pg.rb
Log Message:
enhanced conversion: default is to_str, added timestamp (with/without timezone)
Index: Pg.rb
===================================================================
RCS file: /cvsroot/ruby-dbi/src/lib/dbd_pg/Pg.rb,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Pg.rb 3 Jul 2002 19:56:10 -0000 1.22
+++ Pg.rb 26 Jul 2002 17:56:43 -0000 1.23
@@ -285,8 +285,8 @@
def convert(obj,typeid)
return nil if obj.nil?
- converter = @type_map[typeid]
- raise DBI::InterfaceError, "Unsupported Type (typeid=#{typeid})" if converter.nil?
+ converter = @type_map[typeid] || :as_str
+ #raise DBI::InterfaceError, "Unsupported Type (typeid=#{typeid})" if converter.nil?
@coerce.coerce(converter, obj)
end
@@ -320,16 +320,20 @@
res.result.each { |name, idstr|
@type_map[idstr.to_i] =
case name
- when '_bool' then :as_bool
- when '_int8', '_int4', '_int2' then :as_int
- when '_varchar' then :as_str
- when '_float4','_float8' then :as_float
- when '_timestamp' then :as_timestamp
- when '_date' then :as_date
- when '_bytea' then :as_bytea
- else :as_str
+ when '_bool' then :as_bool
+ when '_int8', '_int4', '_int2' then :as_int
+ when '_varchar' then :as_str
+ when '_float4','_float8' then :as_float
+ when '_timestamp', '_timestamptz' then :as_timestamp
+ when '_date' then :as_date
+ when '_bytea' then :as_bytea
+ else :as_str
end
}
+
+ # additional conversions
+ @type_map[705] ||= :as_str # select 'hallo'
+ @type_map[1114] ||= :as_timestamp # TIMESTAMP WITHOUT TIME ZONE
end
|
|
From: Michael N. <mne...@us...> - 2002-07-26 17:51:36
|
Update of /cvsroot/ruby-dbi/src/lib/dbi
In directory usw-pr-cvs1:/tmp/cvs-serv1326
Modified Files:
dbi.rb
Log Message:
added methods Timestamp#to_time/to_date (Dave Thomas)
Index: dbi.rb
===================================================================
RCS file: /cvsroot/ruby-dbi/src/lib/dbi/dbi.rb,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- dbi.rb 3 Jul 2002 19:24:25 -0000 1.31
+++ dbi.rb 26 Jul 2002 17:51:31 -0000 1.32
@@ -263,7 +263,6 @@
def sec() @second end
def sec=(val) @second=val end
-
def to_s
"#{@hour}:#{@minute}:#{@second}"
end
@@ -277,9 +276,11 @@
if year.is_a? ::Time
@year, @month, @day = year.year, year.month, year.day
@hour, @minute, @second, @fraction = year.hour, year.min, year.sec, 0
+ @original_time = year
elsif year.is_a? ::Date
@year, @month, @day = year.year, year.month, year.day
@hour, @minute, @second, @fraction = 0, 0, 0, 0
+ @original_date = year
else
@year, @month, @day = year, month, day
@hour, @minute, @second, @fraction = hour, minute, second, fraction
@@ -297,8 +298,21 @@
"#{@year}-#{@month}-#{@day} #{@hour}:#{@minute}:#{@second}.#{@fraction}"
end
- # TODO: conversion functions to_date and to_time, perhaps to_date2
- # (date2/3.rb)
+ def to_time
+ if @original_time
+ @original_time
+ else
+ Time.local(@year, @month, @day, @hour, @minute, @second)
+ end
+ end
+
+ def to_date
+ if @original_date
+ @original_date
+ else
+ Date.new(@year, @month, @day)
+ end
+ end
end
|
|
From: Michael N. <mne...@us...> - 2002-07-03 20:09:07
|
Update of /cvsroot/ruby-dbi/src/lib/dbi In directory usw-pr-cvs1:/tmp/cvs-serv14982 Modified Files: version.rb Log Message: new version Index: version.rb =================================================================== RCS file: /cvsroot/ruby-dbi/src/lib/dbi/version.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- version.rb 21 May 2002 18:33:34 -0000 1.1 +++ version.rb 3 Jul 2002 20:09:04 -0000 1.2 @@ -4,6 +4,6 @@ module DBI -VERSION = "0.0.15" +VERSION = "0.0.16" end |
|
From: Michael N. <mne...@us...> - 2002-07-03 20:08:35
|
Update of /cvsroot/ruby-dbi/src/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv14809/html Modified Files: index.html Log Message: * Index: index.html =================================================================== RCS file: /cvsroot/ruby-dbi/src/doc/html/index.html,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- index.html 3 Jul 2002 16:51:49 -0000 1.23 +++ index.html 3 Jul 2002 20:08:32 -0000 1.24 @@ -86,8 +86,12 @@ <p>Patch for DBD Pg (cache PGResult#result in Tuples) which increases performance by a factor around 100</p> </dd> +<dt><a name="label:14" id="label:14">Stephen Davies</a></dt><!-- RDLabel: "Stephen Davies" --> +<dd> +<p>Added method Statement#fetch_scroll for PostgreSQL DBD.</p> +</dd> </dl> -<h2><a name="label:14" id="label:14">Database Drivers (DBDs)</a></h2><!-- RDLabel: "Database Drivers (DBDs)" --> +<h2><a name="label:15" id="label:15">Database Drivers (DBDs)</a></h2><!-- RDLabel: "Database Drivers (DBDs)" --> <ul> <li><p>ADO (ActiveX Data Objects) <em>(dbd_ado)</em></p> <p>depend on WinOLE from RAA.</p></li> @@ -118,46 +122,46 @@ <li><p>Sybase <em>(dbd_sybase)</em></p> <p>this DBD is currently outdated and will <em>not</em> work with DBI versions > 0.0.4 !!! </p></li> </ul> -<h2><a name="label:15" id="label:15">ChangeLog</a></h2><!-- RDLabel: "ChangeLog" --> +<h2><a name="label:16" id="label:16">ChangeLog</a></h2><!-- RDLabel: "ChangeLog" --> <p>See <a href="http://ruby-dbi.sourceforge.net/ChangeLog.html"><URL:http://ruby-dbi.sourceforge.net/ChangeLog.html></a>.</p> -<h2><a name="label:16" id="label:16">ToDo</a></h2><!-- RDLabel: "ToDo" --> +<h2><a name="label:17" id="label:17">ToDo</a></h2><!-- RDLabel: "ToDo" --> <p>See <a href="http://ruby-dbi.sourceforge.net/ToDo.html"><URL:http://ruby-dbi.sourceforge.net/ToDo.html></a>.</p> -<h2><a name="label:17" id="label:17">Download</a></h2><!-- RDLabel: "Download" --> +<h2><a name="label:18" id="label:18">Download</a></h2><!-- RDLabel: "Download" --> <p>Ruby/DBI is available for from the <a href="http://sourceforge.net/project/showfiles.php?group_id=43737">SourceForge project page</a>.</p> <p>If you're running FreeBSD or NetBSD, have a look at their package collections. FreeBSD has for DBI and each DBD an easy to install package, NetBSD currently only for PostgreSQL but more is to come.</p> <p>A NetBSD package for MySQL is available at <a href="http://www.fantasy-coders.de/ruby/ruby-mysql-2.4.tar.gz"><URL:http://www.fantasy-coders.de/ruby/ruby-mysql-2.4.tar.gz></a>.</p> -<h2><a name="label:18" id="label:18">Installation</a></h2><!-- RDLabel: "Installation" --> +<h2><a name="label:19" id="label:19">Installation</a></h2><!-- RDLabel: "Installation" --> <p>All available DBDs come with this package, but you should only install the DBDs you really need.</p> -<h3><a name="label:19" id="label:19">To install all:</a></h3><!-- RDLabel: "To install all:" --> +<h3><a name="label:20" id="label:20">To install all:</a></h3><!-- RDLabel: "To install all:" --> <pre>ruby setup.rb config ruby setup.rb setup ruby setup.rb install</pre> -<h3><a name="label:20" id="label:20">To install dbi and some DBDs:</a></h3><!-- RDLabel: "To install dbi and some DBDs:" --> +<h3><a name="label:21" id="label:21">To install dbi and some DBDs:</a></h3><!-- RDLabel: "To install dbi and some DBDs:" --> <pre>ruby setup.rb config --with=dbi,dbd_pg.... ruby setup.rb setup ruby setup.rb install</pre> <p>Choose the packages to install by specifing them after the option <code>--with</code>.</p> -<h2><a name="label:21" id="label:21">Mailing List</a></h2><!-- RDLabel: "Mailing List" --> +<h2><a name="label:22" id="label:22">Mailing List</a></h2><!-- RDLabel: "Mailing List" --> <p>A mailinglist for DBI-specific discussions is available from the <a href="http://sourceforge.net/projects/ruby-dbi">SourceForge project page</a>.</p> <p>Our former mailing-list was at <a href="http://groups.yahoo.com/group/ruby-dbi-talk"><URL:http://groups.yahoo.com/group/ruby-dbi-talk></a>; please, don't use it!</p> -<h2><a name="label:22" id="label:22">Documentation</a></h2><!-- RDLabel: "Documentation" --> +<h2><a name="label:23" id="label:23">Documentation</a></h2><!-- RDLabel: "Documentation" --> <p>See the directories lib/*/doc or ext/*/doc for DBI and DBD specific informations.</p> <p>The DBI specification is lib/dbi/doc/DBI_SPEC or lib/dbi/doc/html/DBI_SPEC.html or available from WWW at <a href="http://ruby-dbi.sourceforge.net/DBI_SPEC.html"><URL:http://ruby-dbi.sourceforge.net/DBI_SPEC.html></a>.</p> <p>The DBD specification (how to write a database driver) is lib/dbi/doc/DBD_SPEC or lib/dbi/doc/html/DBD_SPEC.html or available from WWW at <a href="http://ruby-dbi.sourceforge.net/DBD_SPEC.html"><URL:http://ruby-dbi.sourceforge.net/DBD_SPEC.html></a>.</p> -<h2><a name="label:23" id="label:23">Applications</a></h2><!-- RDLabel: "Applications" --> -<h3><a name="label:24" id="label:24">sqlsh.rb</a></h3><!-- RDLabel: "sqlsh.rb" --> +<h2><a name="label:24" id="label:24">Applications</a></h2><!-- RDLabel: "Applications" --> +<h3><a name="label:25" id="label:25">sqlsh.rb</a></h3><!-- RDLabel: "sqlsh.rb" --> <p>The SQL command line interpreter sqlsh.rb is available in directory bin/commandline. It gets installed by default.</p> -<h2><a name="label:25" id="label:25">Examples</a></h2><!-- RDLabel: "Examples" --> +<h2><a name="label:26" id="label:26">Examples</a></h2><!-- RDLabel: "Examples" --> <p>Examples can be found in the examples/ subdirectory. In this directory there is the file proxyserver.rb which has to be run if you use the DBD::Proxy, to access databases remote over a TCP/IP network. </p> -<h3><a name="label:26" id="label:26">A simple example</a></h3><!-- RDLabel: "A simple example" --> +<h3><a name="label:27" id="label:27">A simple example</a></h3><!-- RDLabel: "A simple example" --> <pre>require 'dbi' # connect to a datbase @@ -181,7 +185,7 @@ dbh.do('delete from simple01 where internal_id > 10') dbh.disconnect</pre> -<h3><a name="label:27" id="label:27">The same using Ruby's features</a></h3><!-- RDLabel: "The same using Ruby's features" --> +<h3><a name="label:28" id="label:28">The same using Ruby's features</a></h3><!-- RDLabel: "The same using Ruby's features" --> <pre>require 'dbi' DBI.connect('DBI:Mysql:test', 'testuser', 'testpwd') do | dbh | |
|
From: Michael N. <mne...@us...> - 2002-07-03 20:07:57
|
Update of /cvsroot/ruby-dbi/src/doc In directory usw-pr-cvs1:/tmp/cvs-serv14596a Modified Files: index.rd Log Message: added contributor Index: index.rd =================================================================== RCS file: /cvsroot/ruby-dbi/src/doc/index.rd,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- index.rd 3 Jul 2002 16:48:35 -0000 1.21 +++ index.rd 3 Jul 2002 20:07:54 -0000 1.22 @@ -60,7 +60,8 @@ : James F. Hranicky Patch for DBD Pg (cache PGResult#result in Tuples) which increases performance by a factor around 100 - +: Stephen Davies + Added method Statement#fetch_scroll for PostgreSQL DBD. == Database Drivers (DBDs) |
|
From: Michael N. <mne...@us...> - 2002-07-03 20:06:28
|
Update of /cvsroot/ruby-dbi/src/lib/dbi/doc/html
In directory usw-pr-cvs1:/tmp/cvs-serv14150/html
Modified Files:
ChangeLog.html DBD_SPEC.html DBI_SPEC.html
Log Message:
*
Index: ChangeLog.html
===================================================================
RCS file: /cvsroot/ruby-dbi/src/lib/dbi/doc/html/ChangeLog.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ChangeLog.html 21 May 2002 19:02:23 -0000 1.16
+++ ChangeLog.html 3 Jul 2002 20:06:26 -0000 1.17
@@ -9,7 +9,18 @@
</head>
<body>
<dl>
-<dt><a name="label:0" id="label:0">0.0.15 (2002-05-21)</a></dt><!-- RDLabel: "0.0.15 (2002-05-21)" -->
+<dt><a name="label:0" id="label:0">0.0.16 (2002-07-03)</a></dt><!-- RDLabel: "0.0.16 (2002-07-03)" -->
+</dl>
+<ul>
+<li>dbd_pg: Added Statement#fetch_scroll (patch by Stephen Davies).
</li>
+<li>dbi: Added StatementHandle#[] and #[]=. Updated DBI and DBD specs.
</li>
+<li>dbd_pg: Fixed semantic of method Statement#rows (affects also Database#do):
+ Now returns the Row Processed Count instead of the number of rows in the result.
+ The old behaviour is still available through method Statement#['pg_row_count'].
</li>
+<li>changed license from GNU GPL to BSD
</li>
+</ul>
+<dl>
+<dt><a name="label:1" id="label:1">0.0.15 (2002-05-21)</a></dt><!-- RDLabel: "0.0.15 (2002-05-21)" -->
</dl>
<ul>
<li>added example trace_test.rb
</li>
@@ -18,7 +29,7 @@
<li>dbd_mysql: added driver specific function insert_id applicable to DatabaseHandle objects
</li>
</ul>
<dl>
-<dt><a name="label:1" id="label:1">0.0.14 (2002-05-14)</a></dt><!-- RDLabel: "0.0.14 (2002-05-14)" -->
+<dt><a name="label:2" id="label:2">0.0.14 (2002-05-14)</a></dt><!-- RDLabel: "0.0.14 (2002-05-14)" -->
</dl>
<ul>
<li>dbd_mysql: fixed bug: method #do and #execute both set query_with_result of
@@ -28,7 +39,7 @@
F.Hranicky); increase performance of a factor around 100
</li>
</ul>
<dl>
-<dt><a name="label:2" id="label:2">0.0.13 (2002-04-16)</a></dt><!-- RDLabel: "0.0.13 (2002-04-16)" -->
+<dt><a name="label:3" id="label:3">0.0.13 (2002-04-16)</a></dt><!-- RDLabel: "0.0.13 (2002-04-16)" -->
</dl>
<ul>
<li>Moved project to SourceForge.
</li>
@@ -36,7 +47,7 @@
<li>dbd_proxy, proxyserver: upgraded to DBD API 0.2; fixed bug (Norbert Gawor)
</li>
</ul>
<dl>
-<dt><a name="label:3" id="label:3">0.0.12 (2001-12-28)</a></dt><!-- RDLabel: "0.0.12 (2001-12-28)" -->
+<dt><a name="label:4" id="label:4">0.0.12 (2001-12-28)</a></dt><!-- RDLabel: "0.0.12 (2001-12-28)" -->
</dl>
<ul>
<li>dbd_oracle: added Database#columns method
</li>
@@ -63,7 +74,7 @@
</ul></li>
</ul>
<dl>
-<dt><a name="label:4" id="label:4">0.0.11 (2001-11-14)</a></dt><!-- RDLabel: "0.0.11 (2001-11-14)" -->
+<dt><a name="label:5" id="label:5">0.0.11 (2001-11-14)</a></dt><!-- RDLabel: "0.0.11 (2001-11-14)" -->
</dl>
<ul>
<li>dbd_sqlite: new DBD for SQLite
</li>
@@ -81,7 +92,7 @@
<li>sqlsh.rb: added commands \dt (describe table), \s (select * from table) and \pl (page length).
</li>
</ul>
<dl>
-<dt><a name="label:5" id="label:5">0.0.10 (2001-10-22)</a></dt><!-- RDLabel: "0.0.10 (2001-10-22)" -->
+<dt><a name="label:6" id="label:6">0.0.10 (2001-10-22)</a></dt><!-- RDLabel: "0.0.10 (2001-10-22)" -->
</dl>
<ul>
<li>dbd_odbc: added odbc_ignorecase option (submitted by Sean O'Halpin), requires Ruby/ODBC 0.93
</li>
@@ -91,7 +102,7 @@
<li>dbd_mysql: added StatementHandle#fetch_scroll
</li>
</ul>
<dl>
-<dt><a name="label:6" id="label:6">0.0.9 (2001-09-07)</a></dt><!-- RDLabel: "0.0.9 (2001-09-07)" -->
+<dt><a name="label:7" id="label:7">0.0.9 (2001-09-07)</a></dt><!-- RDLabel: "0.0.9 (2001-09-07)" -->
</dl>
<ul>
<li>Fixed bug in sql.rb, method "quote" (gsub! => gsub). (thanks to Stephen Davies)
</li>
@@ -108,7 +119,7 @@
<li>fixed bug in utils.rb XMLFormatter.table (thanks to Jim Menard)
</li>
</ul>
<dl>
-<dt><a name="label:7" id="label:7">0.0.8 (2001-07-28)</a></dt><!-- RDLabel: "0.0.8 (2001-07-28)" -->
+<dt><a name="label:8" id="label:8">0.0.8 (2001-07-28)</a></dt><!-- RDLabel: "0.0.8 (2001-07-28)" -->
</dl>
<ul>
<li>fixed bug in DBI::Row (dup/clone did not work) (Jim Weirich)
</li>
@@ -116,13 +127,13 @@
<li>corrected quoting for Date, Time and Timestamp
</li>
</ul>
<dl>
-<dt><a name="label:8" id="label:8">0.0.7 (2001-07-11)</a></dt><!-- RDLabel: "0.0.7 (2001-07-11)" -->
+<dt><a name="label:9" id="label:9">0.0.7 (2001-07-11)</a></dt><!-- RDLabel: "0.0.7 (2001-07-11)" -->
</dl>
<ul>
<li>fixed bug in dbi.rb, which was newly introduced in 0.0.6
</li>
</ul>
<dl>
-<dt><a name="label:9" id="label:9">0.0.6 (2001-07-06)</a></dt><!-- RDLabel: "0.0.6 (2001-07-06)" -->
+<dt><a name="label:10" id="label:10">0.0.6 (2001-07-06)</a></dt><!-- RDLabel: "0.0.6 (2001-07-06)" -->
</dl>
<ul>
<li>added supports for dbi:DBD:database:host instead of dbi:DBD:database=aaa;host=bbb (John Gorman)
</li>
@@ -131,26 +142,26 @@
<li>fixed bug in dbi/sql.rb method bind.
</li>
</ul>
<dl>
-<dt><a name="label:10" id="label:10">0.0.5 (2001-06-09)</a></dt><!-- RDLabel: "0.0.5 (2001-06-09)" -->
+<dt><a name="label:11" id="label:11">0.0.5 (2001-06-09)</a></dt><!-- RDLabel: "0.0.5 (2001-06-09)" -->
</dl>
<ul>
<li>almost complete rewrite of DBI by Michael Neumann.
</li>
</ul>
<dl>
-<dt><a name="label:11" id="label:11">0.0.4 (2001-05-05)</a></dt><!-- RDLabel: "0.0.4 (2001-05-05)" -->
+<dt><a name="label:12" id="label:12">0.0.4 (2001-05-05)</a></dt><!-- RDLabel: "0.0.4 (2001-05-05)" -->
</dl>
<ul>
<li>based on Jim Weirich's suggestion, the drivers have been moved
into a new namespace: DBI::DBD::[driver]
</li>
</ul>
<dl>
-<dt><a name="label:12" id="label:12">0.0.3 (2001-04-28)</a></dt><!-- RDLabel: "0.0.3 (2001-04-28)" -->
+<dt><a name="label:13" id="label:13">0.0.3 (2001-04-28)</a></dt><!-- RDLabel: "0.0.3 (2001-04-28)" -->
</dl>
<ul>
<li>changed 'driver not found' error-message to something more generic
</li>
</ul>
<dl>
-<dt><a name="label:13" id="label:13">0.0.2</a></dt><!-- RDLabel: "0.0.2" -->
+<dt><a name="label:14" id="label:14">0.0.2</a></dt><!-- RDLabel: "0.0.2" -->
</dl>
<ul>
<li>initial release
</li>
Index: DBD_SPEC.html
===================================================================
RCS file: /cvsroot/ruby-dbi/src/lib/dbi/doc/html/DBD_SPEC.html,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- DBD_SPEC.html 21 May 2002 19:02:23 -0000 1.22
+++ DBD_SPEC.html 3 Jul 2002 20:06:26 -0000 1.23
@@ -8,7 +8,7 @@
<link href="rubyStyle.css" type="text/css" rel="stylesheet" />
</head>
<body>
-<h1><a name="label:0" id="label:0">DBD Specification Version 0.2 (Draft)</a></h1><!-- RDLabel: "DBD Specification Version 0.2 (Draft)" -->
+<h1><a name="label:0" id="label:0">DBD Specification Version 0.2.2 (Draft)</a></h1><!-- RDLabel: "DBD Specification Version 0.2.2 (Draft)" -->
<p>by Michael Neumann (ne...@s-...)</p>
<pre>$Id$</pre>
<h2><a name="label:1" id="label:1">DBD Directory Layout</a></h2><!-- RDLabel: "DBD Directory Layout" -->
@@ -146,7 +146,7 @@
<dd>
<p>Set value of attribute <em>attr</em> to <em>value</em>.
An attribute is e.g. "AutoCommit".
-Raise an NotSupportedError, if the database do not support an attribute.</p>
+Raise a NotSupportedError, if the database do not support an attribute.</p>
<p>The default implementation is to raise a NotSupportedError.</p></dd>
</dl>
<h2><a name="label:27" id="label:27">Class Statement</a></h2><!-- RDLabel: "Class Statement" -->
@@ -236,6 +236,15 @@
<p>Note: Unlike <code>fetch</code>, this method should return a new Array object.</p>
<p>Return <code>nil</code> if no rows are available.</p>
<p>Defaults to multiple calls to <code>fetch</code>.</p></dd>
+<dt><a name="label:41" id="label:41"><code>[ <var>attr</var> ]</code></a></dt><!-- RDLabel: "[]" -->
+<dd>
+<p>Return value of attribute <em>attr</em>.</p>
+<p>Defauls to return the value of <code>@attr[attr]</code>.</p></dd>
+<dt><a name="label:42" id="label:42"><code>[<var>attr</var>] = <var>value</var></code></a></dt><!-- RDLabel: "[]=" -->
+<dd>
+<p>Set value of attribute <em>attr</em> to <em>value</em>.
+Raise a NotSupportedError, if the database do not support an attribute.</p>
+<p>The default implementation is to raise a NotSupportedError.</p></dd>
</dl>
<hr />
<p class="foottext">
Index: DBI_SPEC.html
===================================================================
RCS file: /cvsroot/ruby-dbi/src/lib/dbi/doc/html/DBI_SPEC.html,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- DBI_SPEC.html 21 May 2002 19:02:23 -0000 1.22
+++ DBI_SPEC.html 3 Jul 2002 20:06:26 -0000 1.23
@@ -8,7 +8,7 @@
<link href="rubyStyle.css" type="text/css" rel="stylesheet" />
</head>
<body>
-<h1><a name="label:0" id="label:0">DBI Interface Specification Version 0.2.1 (Draft)</a></h1><!-- RDLabel: "DBI Interface Specification Version 0.2.1 (Draft)" -->
+<h1><a name="label:0" id="label:0">DBI Interface Specification Version 0.2.2 (Draft)</a></h1><!-- RDLabel: "DBI Interface Specification Version 0.2.2 (Draft)" -->
<p>by Michael Neumann (ne...@s-...)</p>
<pre>$Id$</pre>
<h2><a name="label:1" id="label:1">Module DBD</a></h2><!-- RDLabel: "Module DBD" -->
@@ -327,6 +327,10 @@
<p>Returns a <code>DBI::Row</code> object, if not possible, returns <code>nil</code>.</p>
<p>Note that the returned <code>DBI::Row</code> object is only a reference and
should be copied (dup) if it is stored elsewhere.</p></dd>
+<dt><a name="label:97" id="label:97"><code>[<var>attr</var>]</code></a><!-- RDLabel: "[]" -->
+<dt><a name="label:98" id="label:98"><code>[<var>attr</var>] = <var>val</var></code></a></dt><!-- RDLabel: "[]=" -->
+<dd>
+<p>Sets or gets the attribute <em>attr</em>.</p></dd>
</dl>
</body>
|
|
From: Michael N. <mne...@us...> - 2002-07-03 20:05:06
|
Update of /cvsroot/ruby-dbi/src/lib/dbi/doc In directory usw-pr-cvs1:/tmp/cvs-serv13793 Modified Files: ChangeLog Log Message: * Index: ChangeLog =================================================================== RCS file: /cvsroot/ruby-dbi/src/lib/dbi/doc/ChangeLog,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ChangeLog 21 May 2002 19:01:30 -0000 1.20 +++ ChangeLog 3 Jul 2002 20:05:03 -0000 1.21 @@ -1,5 +1,17 @@ =begin +: 0.0.16 (2002-07-03) + +* dbd_pg: Added Statement#fetch_scroll (patch by Stephen Davies). + +* dbi: Added StatementHandle#[] and #[]=. Updated DBI and DBD specs. + +* dbd_pg: Fixed semantic of method Statement#rows (affects also Database#do): + Now returns the Row Processed Count instead of the number of rows in the result. + The old behaviour is still available through method Statement#['pg_row_count']. + +* changed license from GNU GPL to BSD + : 0.0.15 (2002-05-21) * added example trace_test.rb |