sequel_core 1.5.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +116 -0
- data/COPYING +19 -19
- data/README +83 -32
- data/Rakefile +9 -20
- data/bin/sequel +43 -112
- data/doc/cheat_sheet.rdoc +225 -0
- data/doc/dataset_filtering.rdoc +257 -0
- data/lib/sequel_core/adapters/adapter_skeleton.rb +4 -2
- data/lib/sequel_core/adapters/ado.rb +3 -1
- data/lib/sequel_core/adapters/db2.rb +4 -2
- data/lib/sequel_core/adapters/dbi.rb +127 -113
- data/lib/sequel_core/adapters/informix.rb +4 -2
- data/lib/sequel_core/adapters/jdbc.rb +5 -3
- data/lib/sequel_core/adapters/mysql.rb +112 -46
- data/lib/sequel_core/adapters/odbc.rb +5 -7
- data/lib/sequel_core/adapters/odbc_mssql.rb +12 -3
- data/lib/sequel_core/adapters/openbase.rb +3 -1
- data/lib/sequel_core/adapters/oracle.rb +11 -9
- data/lib/sequel_core/adapters/postgres.rb +261 -262
- data/lib/sequel_core/adapters/sqlite.rb +72 -22
- data/lib/sequel_core/connection_pool.rb +140 -73
- data/lib/sequel_core/core_ext.rb +201 -66
- data/lib/sequel_core/core_sql.rb +123 -153
- data/lib/sequel_core/database/schema.rb +156 -0
- data/lib/sequel_core/database.rb +321 -338
- data/lib/sequel_core/dataset/callback.rb +11 -12
- data/lib/sequel_core/dataset/convenience.rb +213 -240
- data/lib/sequel_core/dataset/pagination.rb +58 -43
- data/lib/sequel_core/dataset/parse_tree_sequelizer.rb +331 -0
- data/lib/sequel_core/dataset/query.rb +41 -0
- data/lib/sequel_core/dataset/schema.rb +15 -0
- data/lib/sequel_core/dataset/sequelizer.rb +41 -373
- data/lib/sequel_core/dataset/sql.rb +741 -632
- data/lib/sequel_core/dataset.rb +183 -168
- data/lib/sequel_core/deprecated.rb +1 -169
- data/lib/sequel_core/exceptions.rb +24 -19
- data/lib/sequel_core/migration.rb +44 -52
- data/lib/sequel_core/object_graph.rb +43 -42
- data/lib/sequel_core/pretty_table.rb +71 -76
- data/lib/sequel_core/schema/generator.rb +163 -105
- data/lib/sequel_core/schema/sql.rb +250 -93
- data/lib/sequel_core/schema.rb +2 -8
- data/lib/sequel_core/sql.rb +394 -0
- data/lib/sequel_core/worker.rb +37 -27
- data/lib/sequel_core.rb +99 -45
- data/spec/adapters/informix_spec.rb +0 -1
- data/spec/adapters/mysql_spec.rb +177 -124
- data/spec/adapters/oracle_spec.rb +0 -1
- data/spec/adapters/postgres_spec.rb +98 -58
- data/spec/adapters/sqlite_spec.rb +45 -4
- data/spec/blockless_filters_spec.rb +269 -0
- data/spec/connection_pool_spec.rb +21 -18
- data/spec/core_ext_spec.rb +169 -19
- data/spec/core_sql_spec.rb +56 -49
- data/spec/database_spec.rb +78 -17
- data/spec/dataset_spec.rb +300 -428
- data/spec/migration_spec.rb +1 -1
- data/spec/object_graph_spec.rb +5 -11
- data/spec/rcov.opts +1 -1
- data/spec/schema_generator_spec.rb +16 -4
- data/spec/schema_spec.rb +89 -10
- data/spec/sequelizer_spec.rb +56 -56
- data/spec/spec.opts +0 -5
- data/spec/spec_config.rb +7 -0
- data/spec/spec_config.rb.example +5 -5
- data/spec/spec_helper.rb +6 -0
- data/spec/worker_spec.rb +1 -1
- metadata +78 -63
data/spec/spec_config.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# database objects for running adapter specs
|
2
|
+
# INFORMIX_DB = Sequel.connect('informix://localhost/mydb')
|
3
|
+
MYSQL_URL = 'mysql://agp:sequel++@sql.mit.edu/agp+sequel'
|
4
|
+
# MYSQL_SOCKET_FILE = '/tmp/mysql.sock'
|
5
|
+
# ORACLE_DB = Sequel.connect('oracle://hr:hr@localhost/XE')
|
6
|
+
POSTGRES_URL = 'postgres://_postgresql@postgresql/sequel_test'
|
7
|
+
# SQLITE_DB = Sequel.connect('sqlite:/')
|
data/spec/spec_config.rb.example
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# database objects for running adapter specs
|
2
|
-
# INFORMIX_DB = Sequel('informix://localhost/mydb')
|
3
|
-
# MYSQL_DB = Sequel('mysql://root@localhost/sandbox')
|
2
|
+
# INFORMIX_DB = Sequel.connect('informix://localhost/mydb')
|
3
|
+
# MYSQL_DB = Sequel.connect('mysql://root@localhost/sandbox')
|
4
4
|
# MYSQL_SOCKET_FILE = '/tmp/mysql.sock'
|
5
|
-
# ORACLE_DB = Sequel('oracle://hr:hr@localhost/XE')
|
6
|
-
# POSTGRES_DB = Sequel('postgres://postgres:postgres@localhost:5432/reality_spec')
|
7
|
-
# SQLITE_DB = Sequel('sqlite:/')
|
5
|
+
# ORACLE_DB = Sequel.connect('oracle://hr:hr@localhost/XE')
|
6
|
+
# POSTGRES_DB = Sequel.connect('postgres://postgres:postgres@localhost:5432/reality_spec')
|
7
|
+
# SQLITE_DB = Sequel.connect('sqlite:/')
|
data/spec/spec_helper.rb
CHANGED
@@ -23,6 +23,7 @@ class MockDataset < Sequel::Dataset
|
|
23
23
|
end
|
24
24
|
|
25
25
|
class MockDatabase < Sequel::Database
|
26
|
+
@@quote_identifiers = false
|
26
27
|
attr_reader :sqls
|
27
28
|
|
28
29
|
def execute(sql)
|
@@ -48,3 +49,8 @@ class SchemaDummyDatabase < Sequel::Database
|
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
52
|
+
class Spec::Example::ExampleGroup
|
53
|
+
def self.pt_specify(*args, &block)
|
54
|
+
specify(*args, &block) if defined?(::ParseTree)
|
55
|
+
end
|
56
|
+
end
|
data/spec/worker_spec.rb
CHANGED
metadata
CHANGED
@@ -1,39 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: sequel_core
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version:
|
7
|
-
date: 2008-04-30 00:00:00 -07:00
|
8
|
-
summary: "The Database Toolkit for Ruby: Core Library and Adapters"
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: code@jeremyevans.net
|
12
|
-
homepage: http://sequel.rubyforge.org
|
13
|
-
rubyforge_project: sequel
|
14
|
-
description: "The Database Toolkit for Ruby: Core Library and Adapters"
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.8.4
|
24
|
-
version:
|
4
|
+
version: 2.0.0
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Jeremy Evans
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-06-01 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: "The Database Toolkit for Ruby: Core Library and Adapters"
|
17
|
+
email: code@jeremyevans.net
|
18
|
+
executables:
|
19
|
+
- sequel
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
- CHANGELOG
|
25
|
+
- COPYING
|
26
|
+
- doc/cheat_sheet.rdoc
|
27
|
+
- doc/dataset_filtering.rdoc
|
31
28
|
files:
|
32
29
|
- COPYING
|
33
30
|
- README
|
34
31
|
- Rakefile
|
35
32
|
- bin/sequel
|
33
|
+
- doc/cheat_sheet.rdoc
|
34
|
+
- doc/dataset_filtering.rdoc
|
36
35
|
- spec/adapters
|
36
|
+
- spec/adapters/informix_spec.rb
|
37
|
+
- spec/adapters/mysql_spec.rb
|
38
|
+
- spec/adapters/oracle_spec.rb
|
39
|
+
- spec/adapters/postgres_spec.rb
|
40
|
+
- spec/adapters/sqlite_spec.rb
|
37
41
|
- spec/dataset_spec.rb
|
38
42
|
- spec/core_ext_spec.rb
|
39
43
|
- spec/core_sql_spec.rb
|
@@ -47,31 +51,14 @@ files:
|
|
47
51
|
- spec/sequelizer_spec.rb
|
48
52
|
- spec/spec.opts
|
49
53
|
- spec/spec_config.rb.example
|
54
|
+
- spec/spec_config.rb
|
50
55
|
- spec/worker_spec.rb
|
51
56
|
- spec/connection_pool_spec.rb
|
52
57
|
- spec/object_graph_spec.rb
|
53
|
-
- spec/
|
54
|
-
- spec/adapters/mysql_spec.rb
|
55
|
-
- spec/adapters/oracle_spec.rb
|
56
|
-
- spec/adapters/postgres_spec.rb
|
57
|
-
- spec/adapters/sqlite_spec.rb
|
58
|
+
- spec/blockless_filters_spec.rb
|
58
59
|
- lib/sequel_core.rb
|
59
60
|
- lib/sequel_core
|
60
61
|
- lib/sequel_core/adapters
|
61
|
-
- lib/sequel_core/dataset.rb
|
62
|
-
- lib/sequel_core/core_ext.rb
|
63
|
-
- lib/sequel_core/core_sql.rb
|
64
|
-
- lib/sequel_core/database.rb
|
65
|
-
- lib/sequel_core/exceptions.rb
|
66
|
-
- lib/sequel_core/dataset
|
67
|
-
- lib/sequel_core/object_graph.rb
|
68
|
-
- lib/sequel_core/migration.rb
|
69
|
-
- lib/sequel_core/worker.rb
|
70
|
-
- lib/sequel_core/pretty_table.rb
|
71
|
-
- lib/sequel_core/schema.rb
|
72
|
-
- lib/sequel_core/schema
|
73
|
-
- lib/sequel_core/connection_pool.rb
|
74
|
-
- lib/sequel_core/deprecated.rb
|
75
62
|
- lib/sequel_core/adapters/adapter_skeleton.rb
|
76
63
|
- lib/sequel_core/adapters/ado.rb
|
77
64
|
- lib/sequel_core/adapters/db2.rb
|
@@ -85,39 +72,67 @@ files:
|
|
85
72
|
- lib/sequel_core/adapters/oracle.rb
|
86
73
|
- lib/sequel_core/adapters/postgres.rb
|
87
74
|
- lib/sequel_core/adapters/sqlite.rb
|
75
|
+
- lib/sequel_core/dataset.rb
|
76
|
+
- lib/sequel_core/core_ext.rb
|
77
|
+
- lib/sequel_core/core_sql.rb
|
78
|
+
- lib/sequel_core/database.rb
|
79
|
+
- lib/sequel_core/exceptions.rb
|
80
|
+
- lib/sequel_core/dataset
|
88
81
|
- lib/sequel_core/dataset/callback.rb
|
89
82
|
- lib/sequel_core/dataset/convenience.rb
|
90
83
|
- lib/sequel_core/dataset/sequelizer.rb
|
91
84
|
- lib/sequel_core/dataset/sql.rb
|
92
85
|
- lib/sequel_core/dataset/pagination.rb
|
86
|
+
- lib/sequel_core/dataset/parse_tree_sequelizer.rb
|
87
|
+
- lib/sequel_core/dataset/query.rb
|
88
|
+
- lib/sequel_core/dataset/schema.rb
|
89
|
+
- lib/sequel_core/object_graph.rb
|
90
|
+
- lib/sequel_core/migration.rb
|
91
|
+
- lib/sequel_core/worker.rb
|
92
|
+
- lib/sequel_core/pretty_table.rb
|
93
|
+
- lib/sequel_core/schema.rb
|
94
|
+
- lib/sequel_core/schema
|
93
95
|
- lib/sequel_core/schema/generator.rb
|
94
96
|
- lib/sequel_core/schema/sql.rb
|
97
|
+
- lib/sequel_core/connection_pool.rb
|
98
|
+
- lib/sequel_core/deprecated.rb
|
99
|
+
- lib/sequel_core/database
|
100
|
+
- lib/sequel_core/database/schema.rb
|
101
|
+
- lib/sequel_core/sql.rb
|
95
102
|
- CHANGELOG
|
96
|
-
|
97
|
-
|
103
|
+
has_rdoc: true
|
104
|
+
homepage: http://sequel.rubyforge.org
|
105
|
+
post_install_message:
|
98
106
|
rdoc_options:
|
99
107
|
- --quiet
|
100
108
|
- --line-numbers
|
101
109
|
- --inline-source
|
110
|
+
- --title
|
111
|
+
- "Sequel: The Database Toolkit for Ruby: Core Library and Adapters"
|
112
|
+
- --main
|
113
|
+
- README
|
102
114
|
- --exclude
|
103
115
|
- ^(examples|extras)/
|
104
|
-
|
105
|
-
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
-
|
110
|
-
|
111
|
-
|
116
|
+
require_paths:
|
117
|
+
- lib
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 1.8.4
|
123
|
+
version:
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: "0"
|
129
|
+
version:
|
112
130
|
requirements: []
|
113
131
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: 0.0.0
|
123
|
-
version:
|
132
|
+
rubyforge_project: sequel
|
133
|
+
rubygems_version: 1.0.1
|
134
|
+
signing_key:
|
135
|
+
specification_version: 2
|
136
|
+
summary: "The Database Toolkit for Ruby: Core Library and Adapters"
|
137
|
+
test_files: []
|
138
|
+
|