dbi 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3694 -0
- data/LICENSE +25 -0
- data/README +271 -0
- data/bin/dbi +518 -0
- data/build/Rakefile.dbi.rb +57 -0
- data/examples/test1.pl +39 -0
- data/examples/test1.rb +20 -0
- data/examples/xmltest.rb +8 -0
- data/lib/dbi.rb +323 -0
- data/lib/dbi/base_classes.rb +12 -0
- data/lib/dbi/base_classes/database.rb +135 -0
- data/lib/dbi/base_classes/driver.rb +47 -0
- data/lib/dbi/base_classes/statement.rb +167 -0
- data/lib/dbi/binary.rb +25 -0
- data/lib/dbi/columninfo.rb +106 -0
- data/lib/dbi/exceptions.rb +65 -0
- data/lib/dbi/handles.rb +49 -0
- data/lib/dbi/handles/database.rb +211 -0
- data/lib/dbi/handles/driver.rb +60 -0
- data/lib/dbi/handles/statement.rb +375 -0
- data/lib/dbi/row.rb +249 -0
- data/lib/dbi/sql.rb +23 -0
- data/lib/dbi/sql/preparedstatement.rb +115 -0
- data/lib/dbi/sql_type_constants.rb +75 -0
- data/lib/dbi/trace.rb +91 -0
- data/lib/dbi/types.rb +158 -0
- data/lib/dbi/typeutil.rb +108 -0
- data/lib/dbi/utils.rb +60 -0
- data/lib/dbi/utils/date.rb +59 -0
- data/lib/dbi/utils/tableformatter.rb +112 -0
- data/lib/dbi/utils/time.rb +52 -0
- data/lib/dbi/utils/timestamp.rb +96 -0
- data/lib/dbi/utils/xmlformatter.rb +73 -0
- data/test/dbi/tc_columninfo.rb +94 -0
- data/test/dbi/tc_date.rb +88 -0
- data/test/dbi/tc_dbi.rb +178 -0
- data/test/dbi/tc_row.rb +256 -0
- data/test/dbi/tc_sqlbind.rb +168 -0
- data/test/dbi/tc_statementhandle.rb +16 -0
- data/test/dbi/tc_time.rb +77 -0
- data/test/dbi/tc_timestamp.rb +142 -0
- data/test/dbi/tc_types.rb +220 -0
- data/test/dbi/trace.rb +26 -0
- data/test/ts_dbi.rb +15 -0
- metadata +108 -0
data/test/dbi/trace.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
$;.unshift('lib')
|
2
|
+
require "dbi/trace"
|
3
|
+
require 'stringio'
|
4
|
+
require "test/unit"
|
5
|
+
|
6
|
+
$stringio = StringIO.new
|
7
|
+
|
8
|
+
class TC_DBI_Trace < Test::Unit::TestCase
|
9
|
+
def setup
|
10
|
+
$stringio = StringIO.new
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class DBI::DBD::Dummy
|
15
|
+
class Database < DBI::BaseDatabase
|
16
|
+
DBI::BaseDatabase.instance_methods.each do |x|
|
17
|
+
next if x.to_sym == :initialize
|
18
|
+
define_method(x.to_sym) do |*args|
|
19
|
+
$stringio << "[test] call:#{x} args:#{args.inspect}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/test/ts_dbi.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Test suite for the DBI tests. No DBD tests are run as part of this
|
2
|
+
# test suite.
|
3
|
+
Dir.chdir("..") if File.basename(Dir.pwd) == "test"
|
4
|
+
$LOAD_PATH.unshift(Dir.pwd + "/lib")
|
5
|
+
Dir.chdir("test") rescue nil
|
6
|
+
|
7
|
+
require 'dbi/tc_columninfo'
|
8
|
+
require 'dbi/tc_date'
|
9
|
+
require 'dbi/tc_dbi'
|
10
|
+
require 'dbi/tc_row'
|
11
|
+
require 'dbi/tc_sqlbind'
|
12
|
+
require 'dbi/tc_statementhandle'
|
13
|
+
require 'dbi/tc_time'
|
14
|
+
require 'dbi/tc_timestamp'
|
15
|
+
require 'dbi/tc_types'
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dbi
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Erik Hollensbe
|
8
|
+
- Christopher Maujean
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2008-08-23 00:00:00 -07:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: deprecated
|
18
|
+
type: :runtime
|
19
|
+
version_requirement:
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 2.0.0
|
25
|
+
version:
|
26
|
+
description: A vendor independent interface for accessing databases, similar to Perl's DBI
|
27
|
+
email: ruby-dbi-users@rubyforge.org
|
28
|
+
executables:
|
29
|
+
- dbi
|
30
|
+
extensions: []
|
31
|
+
|
32
|
+
extra_rdoc_files:
|
33
|
+
- README
|
34
|
+
- LICENSE
|
35
|
+
- ChangeLog
|
36
|
+
files:
|
37
|
+
- examples/xmltest.rb
|
38
|
+
- examples/test1.rb
|
39
|
+
- examples/test1.pl
|
40
|
+
- bin/dbi
|
41
|
+
- build/Rakefile.dbi.rb
|
42
|
+
- lib/dbi.rb
|
43
|
+
- lib/dbi/utils/timestamp.rb
|
44
|
+
- lib/dbi/utils/date.rb
|
45
|
+
- lib/dbi/utils/tableformatter.rb
|
46
|
+
- lib/dbi/utils/xmlformatter.rb
|
47
|
+
- lib/dbi/utils/time.rb
|
48
|
+
- lib/dbi/sql_type_constants.rb
|
49
|
+
- lib/dbi/sql/preparedstatement.rb
|
50
|
+
- lib/dbi/handles/driver.rb
|
51
|
+
- lib/dbi/handles/database.rb
|
52
|
+
- lib/dbi/handles/statement.rb
|
53
|
+
- lib/dbi/handles.rb
|
54
|
+
- lib/dbi/sql.rb
|
55
|
+
- lib/dbi/typeutil.rb
|
56
|
+
- lib/dbi/exceptions.rb
|
57
|
+
- lib/dbi/trace.rb
|
58
|
+
- lib/dbi/binary.rb
|
59
|
+
- lib/dbi/utils.rb
|
60
|
+
- lib/dbi/base_classes/driver.rb
|
61
|
+
- lib/dbi/base_classes/database.rb
|
62
|
+
- lib/dbi/base_classes/statement.rb
|
63
|
+
- lib/dbi/row.rb
|
64
|
+
- lib/dbi/columninfo.rb
|
65
|
+
- lib/dbi/base_classes.rb
|
66
|
+
- lib/dbi/types.rb
|
67
|
+
- test/ts_dbi.rb
|
68
|
+
- test/dbi/tc_date.rb
|
69
|
+
- test/dbi/tc_statementhandle.rb
|
70
|
+
- test/dbi/tc_columninfo.rb
|
71
|
+
- test/dbi/tc_timestamp.rb
|
72
|
+
- test/dbi/tc_sqlbind.rb
|
73
|
+
- test/dbi/trace.rb
|
74
|
+
- test/dbi/tc_dbi.rb
|
75
|
+
- test/dbi/tc_types.rb
|
76
|
+
- test/dbi/tc_row.rb
|
77
|
+
- test/dbi/tc_time.rb
|
78
|
+
- README
|
79
|
+
- LICENSE
|
80
|
+
- ChangeLog
|
81
|
+
has_rdoc: true
|
82
|
+
homepage: http://www.rubyforge.org/projects/ruby-dbi
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 1.8.0
|
93
|
+
version:
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: "0"
|
99
|
+
version:
|
100
|
+
requirements: []
|
101
|
+
|
102
|
+
rubyforge_project: ruby-dbi
|
103
|
+
rubygems_version: 1.2.0
|
104
|
+
signing_key:
|
105
|
+
specification_version: 2
|
106
|
+
summary: A vendor independent interface for accessing databases, similar to Perl's DBI
|
107
|
+
test_files:
|
108
|
+
- test/ts_dbi.rb
|