sequel 0.5.0.2 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/COPYING +18 -18
  2. data/Rakefile +17 -98
  3. data/lib/sequel.rb +2 -71
  4. metadata +10 -108
  5. data/CHANGELOG +0 -989
  6. data/bin/sequel +0 -41
  7. data/lib/sequel/adapters/adapter_skeleton.rb +0 -68
  8. data/lib/sequel/adapters/ado.rb +0 -100
  9. data/lib/sequel/adapters/db2.rb +0 -158
  10. data/lib/sequel/adapters/dbi.rb +0 -126
  11. data/lib/sequel/adapters/informix.rb +0 -87
  12. data/lib/sequel/adapters/jdbc.rb +0 -108
  13. data/lib/sequel/adapters/mysql.rb +0 -269
  14. data/lib/sequel/adapters/odbc.rb +0 -145
  15. data/lib/sequel/adapters/odbc_mssql.rb +0 -93
  16. data/lib/sequel/adapters/openbase.rb +0 -90
  17. data/lib/sequel/adapters/oracle.rb +0 -99
  18. data/lib/sequel/adapters/postgres.rb +0 -519
  19. data/lib/sequel/adapters/sqlite.rb +0 -192
  20. data/lib/sequel/ado.rb +0 -6
  21. data/lib/sequel/array_keys.rb +0 -296
  22. data/lib/sequel/connection_pool.rb +0 -152
  23. data/lib/sequel/core_ext.rb +0 -59
  24. data/lib/sequel/core_sql.rb +0 -191
  25. data/lib/sequel/database.rb +0 -433
  26. data/lib/sequel/dataset.rb +0 -409
  27. data/lib/sequel/dataset/convenience.rb +0 -321
  28. data/lib/sequel/dataset/sequelizer.rb +0 -354
  29. data/lib/sequel/dataset/sql.rb +0 -586
  30. data/lib/sequel/db2.rb +0 -6
  31. data/lib/sequel/dbi.rb +0 -6
  32. data/lib/sequel/exceptions.rb +0 -45
  33. data/lib/sequel/informix.rb +0 -6
  34. data/lib/sequel/migration.rb +0 -191
  35. data/lib/sequel/model.rb +0 -8
  36. data/lib/sequel/mysql.rb +0 -6
  37. data/lib/sequel/odbc.rb +0 -6
  38. data/lib/sequel/oracle.rb +0 -6
  39. data/lib/sequel/postgres.rb +0 -6
  40. data/lib/sequel/pretty_table.rb +0 -73
  41. data/lib/sequel/schema.rb +0 -8
  42. data/lib/sequel/schema/schema_generator.rb +0 -131
  43. data/lib/sequel/schema/schema_sql.rb +0 -131
  44. data/lib/sequel/sqlite.rb +0 -6
  45. data/lib/sequel/worker.rb +0 -58
  46. data/spec/adapters/informix_spec.rb +0 -139
  47. data/spec/adapters/mysql_spec.rb +0 -330
  48. data/spec/adapters/oracle_spec.rb +0 -130
  49. data/spec/adapters/postgres_spec.rb +0 -189
  50. data/spec/adapters/sqlite_spec.rb +0 -345
  51. data/spec/array_keys_spec.rb +0 -679
  52. data/spec/connection_pool_spec.rb +0 -356
  53. data/spec/core_ext_spec.rb +0 -67
  54. data/spec/core_sql_spec.rb +0 -301
  55. data/spec/database_spec.rb +0 -811
  56. data/spec/dataset_spec.rb +0 -2381
  57. data/spec/migration_spec.rb +0 -261
  58. data/spec/pretty_table_spec.rb +0 -66
  59. data/spec/rcov.opts +0 -4
  60. data/spec/schema_generator_spec.rb +0 -86
  61. data/spec/schema_spec.rb +0 -230
  62. data/spec/sequel_spec.rb +0 -10
  63. data/spec/sequelizer_spec.rb +0 -389
  64. data/spec/spec.opts +0 -5
  65. data/spec/spec_helper.rb +0 -44
  66. data/spec/worker_spec.rb +0 -96
data/COPYING CHANGED
@@ -1,18 +1,18 @@
1
- Copyright (c) 2006-2007 Sharon Rosner
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to
5
- deal in the Software without restriction, including without limitation the
6
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- sell copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
- THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2006-2007 Sharon Rosner
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to
5
+ deal in the Software without restriction, including without limitation the
6
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ sell copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
+ THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ include FileUtils
9
9
  # Configuration
10
10
  ##############################################################################
11
11
  NAME = "sequel"
12
- VERS = "0.5.0.2"
12
+ VERS = "1.0"
13
13
  CLEAN.include ["**/.*.sw?", "pkg/*", ".config", "doc/*", "coverage/*"]
14
14
  RDOC_OPTS = [
15
15
  "--quiet",
@@ -20,19 +20,6 @@ RDOC_OPTS = [
20
20
  "--inline-source"
21
21
  ]
22
22
 
23
- ##############################################################################
24
- # RDoc
25
- ##############################################################################
26
- task :doc => [:rdoc]
27
-
28
- Rake::RDocTask.new do |rdoc|
29
- rdoc.rdoc_dir = "doc/rdoc"
30
- rdoc.options += RDOC_OPTS
31
- rdoc.main = "README"
32
- rdoc.title = "Sequel: Database access for Ruby"
33
- rdoc.rdoc_files.add ["README", "COPYING", "lib/sequel.rb", "lib/**/*.rb"]
34
- end
35
-
36
23
  ##############################################################################
37
24
  # Gem packaging
38
25
  ##############################################################################
@@ -40,45 +27,35 @@ desc "Packages up Sequel."
40
27
  task :default => [:package]
41
28
  task :package => [:clean]
42
29
 
30
+ RDOC_OPTS = [
31
+ "--quiet",
32
+ "--title", "Sequel Model: Lightweight ORM for Ruby",
33
+ "--opname", "index.html",
34
+ "--line-numbers",
35
+ "--main", "README",
36
+ "--inline-source"
37
+ ]
38
+
43
39
  spec = Gem::Specification.new do |s|
44
40
  s.name = NAME
45
- s.rubyforge_project = NAME
41
+ s.rubyforge_project = 'sequel'
46
42
  s.version = VERS
47
43
  s.platform = Gem::Platform::RUBY
48
- s.has_rdoc = true
49
- s.extra_rdoc_files = ["README", "CHANGELOG", "COPYING"]
50
- s.rdoc_options += RDOC_OPTS +
51
- ["--exclude", "^(examples|extras)\/", "--exclude", "lib/sequel.rb"]
52
44
  s.summary = "Database access for Ruby"
53
45
  s.description = s.summary
54
46
  s.author = "Sharon Rosner"
55
47
  s.email = "ciconia@gmail.com"
56
48
  s.homepage = "http://sequel.rubyforge.org"
57
- s.executables = ["sequel"]
58
49
  s.required_ruby_version = ">= 1.8.4"
59
50
 
60
- s.add_dependency("metaid")
51
+ s.has_rdoc = true
52
+ s.extra_rdoc_files = ["README", "COPYING"]
61
53
 
62
- case RUBY_PLATFORM
63
- when /mswin/
64
- s.platform = Gem::Platform::CURRENT
65
- s.add_dependency("RubyInline", ">= 3.6.6")
66
- s.add_dependency("ParseTree", ">= 2.1.1")
67
- s.add_dependency("ruby2ruby")
68
- when /java/
69
- s.platform = "jruby"
70
- else
71
- s.platform = Gem::Platform::RUBY
72
- # ParseTree on win32 requires PT2.1.1 and RI3.6.6
73
- s.add_dependency("RubyInline", ">= 3.6.6")
74
- s.add_dependency("ParseTree", ">= 2.1.1")
75
- s.add_dependency("ruby2ruby")
76
- end
54
+ s.add_dependency("sequel_core")
55
+ s.add_dependency("sequel_model")
77
56
 
78
- s.files = %w(COPYING README Rakefile) + Dir.glob("{bin,doc,spec,lib}/**/*")
79
-
57
+ s.files = %w(Rakefile) + Dir.glob("{lib}/**/*")
80
58
  s.require_path = "lib"
81
- s.bindir = "bin"
82
59
  end
83
60
 
84
61
  Rake::GemPackageTask.new(spec) do |p|
@@ -109,68 +86,10 @@ task :tag do
109
86
  end
110
87
 
111
88
  ##############################################################################
112
- # gem and rdoc release
89
+ # gem release
113
90
  ##############################################################################
114
91
  task :release => [:package] do
115
92
  sh %{rubyforge login}
116
93
  sh %{rubyforge add_release sequel #{NAME} #{VERS} pkg/#{NAME}-#{VERS}.tgz}
117
94
  sh %{rubyforge add_file sequel #{NAME} #{VERS} pkg/#{NAME}-#{VERS}.gem}
118
95
  end
119
-
120
- ##############################################################################
121
- # specs
122
- ##############################################################################
123
- require "spec/rake/spectask"
124
-
125
- desc "Run specs with coverage"
126
- Spec::Rake::SpecTask.new("spec") do |t|
127
- t.spec_files = FileList["spec/*_spec.rb"]
128
- t.spec_opts = File.read("spec/spec.opts").split("\n")
129
- t.rcov_opts = File.read("spec/rcov.opts").split("\n")
130
- t.rcov = true
131
- end
132
-
133
- desc "Run specs without coverage"
134
- Spec::Rake::SpecTask.new("spec_no_cov") do |t|
135
- t.spec_files = FileList["spec/*_spec.rb"]
136
- t.spec_opts = File.read("spec/spec.opts").split("\n")
137
- end
138
-
139
- desc "Run adapter specs without coverage"
140
- Spec::Rake::SpecTask.new("spec_adapters") do |t|
141
- t.spec_files = FileList["spec/adapters/*_spec.rb"]
142
- t.spec_opts = File.read("spec/spec.opts").split("\n")
143
- end
144
-
145
- desc "Run all specs with coverage"
146
- Spec::Rake::SpecTask.new("spec_all") do |t|
147
- t.spec_files = FileList["spec/*_spec.rb", "spec/adapters/*_spec.rb"]
148
- t.rcov_opts = File.read("spec/rcov.opts").split("\n")
149
- t.spec_opts = File.read("spec/spec.opts").split("\n")
150
- t.rcov = true
151
- end
152
-
153
- desc "Run rcov only"
154
- Spec::Rake::SpecTask.new("rcov") do |t|
155
- t.rcov_opts = File.read("spec/rcov.opts").split("\n")
156
- t.spec_opts = File.read("spec/spec.opts").split("\n")
157
- t.spec_files = FileList["spec/*_spec.rb"]
158
- t.rcov = true
159
- end
160
-
161
- ##############################################################################
162
- # Statistics
163
- ##############################################################################
164
-
165
- STATS_DIRECTORIES = [
166
- %w(Code lib/),
167
- %w(Spec spec/)
168
- ].collect { |name, dir| [ name, "./#{dir}" ] }.select { |name, dir| File.directory?(dir) }
169
-
170
- desc "Report code statistics (KLOCs, etc) from the application"
171
- task :stats do
172
- require "extra/stats"
173
- verbose = true
174
- CodeStatistics.new(*STATS_DIRECTORIES).to_s
175
- end
176
-
data/lib/sequel.rb CHANGED
@@ -1,71 +1,2 @@
1
- require "metaid"
2
- require "bigdecimal"
3
- require "bigdecimal/util"
4
-
5
- files = %w[
6
- core_ext core_sql array_keys exceptions connection_pool pretty_table
7
- dataset migration model schema database worker
8
- ]
9
- dir = File.join(File.dirname(__FILE__), "sequel")
10
- files.each {|f| require(File.join(dir, f))}
11
-
12
- module Sequel #:nodoc:
13
- class << self
14
- # call-seq:
15
- # Sequel::Database.connect(conn_string)
16
- # Sequel.connect(conn_string)
17
- # Sequel.open(conn_string)
18
- #
19
- # Creates a new database object based on the supplied connection string.
20
- # The specified scheme determines the database class used, and the rest
21
- # of the string specifies the connection options. For example:
22
- # DB = Sequel.open 'sqlite:///blog.db'
23
- def connect(*args)
24
- Database.connect(*args)
25
- end
26
- alias_method :open, :connect
27
-
28
- def single_threaded=(value)
29
- Database.single_threaded = value
30
- end
31
-
32
- def method_missing(m, *args)
33
- c = Database.adapter_class(m)
34
- begin
35
- # three ways to invoke this:
36
- # 0 arguments: Sequel.dbi
37
- # 1 argument: Sequel.dbi(db_name)
38
- # more args: Sequel.dbi(db_name, opts)
39
- case args.size
40
- when 0
41
- opts = {}
42
- when 1
43
- opts = args[0].is_a?(Hash) ? args[0] : {:database => args[0]}
44
- else
45
- opts = args[1].merge(:database => args[0])
46
- end
47
- rescue
48
- raise Error::AdapterNotFound, "Unknown adapter (#{m})"
49
- end
50
- c.new(opts)
51
- end
52
-
53
- # stub for Sequel::Model()
54
- def Model(*args)
55
- require 'sequel_model'
56
- if respond_to?(:Model)
57
- send(:Model, *args)
58
- else
59
- raise LoadError
60
- end
61
- rescue LoadError
62
- raise SequelError, "The sequel_model library could not be found. In order to use Sequel models please install sequel_model."
63
- end
64
- end
65
- end
66
-
67
- class Object
68
- def Sequel(*args)
69
- Sequel.connect(*args)
70
- end
71
- end
1
+ require 'sequel_core'
2
+ require 'sequel_model'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.2
4
+ version: "1.0"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-01 00:00:00 +02:00
12
+ date: 2008-01-02 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: metaid
16
+ name: sequel_core
17
17
  version_requirement:
18
18
  version_requirements: !ruby/object:Gem::Requirement
19
19
  requirements:
@@ -22,25 +22,7 @@ dependencies:
22
22
  version: "0"
23
23
  version:
24
24
  - !ruby/object:Gem::Dependency
25
- name: RubyInline
26
- version_requirement:
27
- version_requirements: !ruby/object:Gem::Requirement
28
- requirements:
29
- - - ">="
30
- - !ruby/object:Gem::Version
31
- version: 3.6.6
32
- version:
33
- - !ruby/object:Gem::Dependency
34
- name: ParseTree
35
- version_requirement:
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 2.1.1
41
- version:
42
- - !ruby/object:Gem::Dependency
43
- name: ruby2ruby
25
+ name: sequel_model
44
26
  version_requirement:
45
27
  version_requirements: !ruby/object:Gem::Requirement
46
28
  requirements:
@@ -50,103 +32,23 @@ dependencies:
50
32
  version:
51
33
  description: Database access for Ruby
52
34
  email: ciconia@gmail.com
53
- executables:
54
- - sequel
35
+ executables: []
36
+
55
37
  extensions: []
56
38
 
57
39
  extra_rdoc_files:
58
40
  - README
59
- - CHANGELOG
60
41
  - COPYING
61
42
  files:
62
- - COPYING
63
- - README
64
43
  - Rakefile
65
- - bin/sequel
66
- - spec/adapters
67
- - spec/adapters/informix_spec.rb
68
- - spec/adapters/mysql_spec.rb
69
- - spec/adapters/oracle_spec.rb
70
- - spec/adapters/postgres_spec.rb
71
- - spec/adapters/sqlite_spec.rb
72
- - spec/array_keys_spec.rb
73
- - spec/connection_pool_spec.rb
74
- - spec/core_ext_spec.rb
75
- - spec/core_sql_spec.rb
76
- - spec/database_spec.rb
77
- - spec/dataset_spec.rb
78
- - spec/migration_spec.rb
79
- - spec/pretty_table_spec.rb
80
- - spec/rcov.opts
81
- - spec/schema_generator_spec.rb
82
- - spec/schema_spec.rb
83
- - spec/sequel_spec.rb
84
- - spec/sequelizer_spec.rb
85
- - spec/spec.opts
86
- - spec/spec_helper.rb
87
- - spec/worker_spec.rb
88
- - lib/sequel
89
- - lib/sequel/adapters
90
- - lib/sequel/adapters/adapter_skeleton.rb
91
- - lib/sequel/adapters/ado.rb
92
- - lib/sequel/adapters/db2.rb
93
- - lib/sequel/adapters/dbi.rb
94
- - lib/sequel/adapters/informix.rb
95
- - lib/sequel/adapters/jdbc.rb
96
- - lib/sequel/adapters/mysql.rb
97
- - lib/sequel/adapters/odbc.rb
98
- - lib/sequel/adapters/odbc_mssql.rb
99
- - lib/sequel/adapters/openbase.rb
100
- - lib/sequel/adapters/oracle.rb
101
- - lib/sequel/adapters/postgres.rb
102
- - lib/sequel/adapters/sqlite.rb
103
- - lib/sequel/ado.rb
104
- - lib/sequel/array_keys.rb
105
- - lib/sequel/connection_pool.rb
106
- - lib/sequel/core_ext.rb
107
- - lib/sequel/core_sql.rb
108
- - lib/sequel/database.rb
109
- - lib/sequel/dataset
110
- - lib/sequel/dataset/convenience.rb
111
- - lib/sequel/dataset/sequelizer.rb
112
- - lib/sequel/dataset/sql.rb
113
- - lib/sequel/dataset.rb
114
- - lib/sequel/db2.rb
115
- - lib/sequel/dbi.rb
116
- - lib/sequel/exceptions.rb
117
- - lib/sequel/informix.rb
118
- - lib/sequel/migration.rb
119
- - lib/sequel/model.rb
120
- - lib/sequel/mysql.rb
121
- - lib/sequel/odbc.rb
122
- - lib/sequel/oracle.rb
123
- - lib/sequel/postgres.rb
124
- - lib/sequel/pretty_table.rb
125
- - lib/sequel/schema
126
- - lib/sequel/schema/schema_generator.rb
127
- - lib/sequel/schema/schema_sql.rb
128
- - lib/sequel/schema.rb
129
- - lib/sequel/sqlite.rb
130
- - lib/sequel/worker.rb
131
44
  - lib/sequel.rb
132
- - CHANGELOG
45
+ - README
46
+ - COPYING
133
47
  has_rdoc: true
134
48
  homepage: http://sequel.rubyforge.org
135
49
  post_install_message:
136
- rdoc_options:
137
- - --quiet
138
- - --title
139
- - "Sequel: Database access for Ruby"
140
- - --opname
141
- - index.html
142
- - --line-numbers
143
- - --main
144
- - README
145
- - --inline-source
146
- - --exclude
147
- - ^(examples|extras)/
148
- - --exclude
149
- - lib/sequel.rb
50
+ rdoc_options: []
51
+
150
52
  require_paths:
151
53
  - lib
152
54
  required_ruby_version: !ruby/object:Gem::Requirement
data/CHANGELOG DELETED
@@ -1,989 +0,0 @@
1
- === 0.5.0.2 (2007-01-01)
2
-
3
- * Fixed String#to_time to raise error correctly for invalid time stamps.
4
-
5
- * Improved code coverage - now at 99.2%.
6
-
7
- === 0.5.0.1 (2007-12-31)
8
-
9
- * Added a stub for Sequel::Model that auto-loads sequel_model.
10
-
11
- * Changed Sequel.method_missing and Database.adapter_class to raise AdapterNotFound if an adapter could not be loaded.
12
-
13
- * Fixed behavior of error trap in sequel command line tool.
14
-
15
- === 0.5 (2007-12-30)
16
-
17
- * Removed model code into separate sub-project. Rearranged trunk into core, model and model_plugins.
18
-
19
- === 0.4.5 (2007-12-25)
20
-
21
- * Added rdoc for new alter_table functionality (#109).
22
-
23
- * Fixed update_sql with array sub-item keys (#110).
24
-
25
- * Refactored model specs.
26
-
27
- * Added Model#update as alias to #set.
28
-
29
- * Refactored validations code. Renamed Model.validations? into Model.has_validations?.
30
-
31
- * Added initial Model validations (Thanks Lance Carlson)
32
-
33
- * Added Database#set_column_default method (thanks Jim Morris.)
34
-
35
- * Removed warning on uninitialized @transform value (thanks Jim Morris).
36
-
37
- === 0.4.4.2 (2007-12-20)
38
-
39
- * Fixed parsing errors in Ruby 1.9.
40
-
41
- * Fixed sync problem in connection_pool_spec.
42
-
43
- * Changed String#to_time to raise Error::InvalidValue if Time.parse fails.
44
-
45
- * Refactored sequel error classes.
46
-
47
- === 0.4.4.1 (2007-12-19)
48
-
49
- * Fixed schema generation code to use field quoting and support adapter-specific literalization of default values (#108).
50
-
51
- === 0.4.4 (2007-12-17)
52
-
53
- * Implemented Database#rename_table (#104).
54
-
55
- * Fixed drop_index in mysql adapter (#103).
56
-
57
- * Added ALTER TABLE specs for postgres, sqlite and mysql adapters. Added custom alter_table behavior for sqlite and mysql adapters (#101, #102).
58
-
59
- * Added direct Database API for altering tables.
60
-
61
- * Added Database#alter_table method with support for adding, dropping, renaming, modifying columns and adding and droppping indexes.
62
-
63
- * Added #unique schema method for defining unique indexes (thanks Dado).
64
-
65
- * Implemented unfolding of #each calls inside sequelizer blocks (thanks Jim Morris).
66
-
67
- === 0.4.3 (2007-12-15)
68
-
69
- * Fixed Dataset#update to accept strings (#98).
70
-
71
- * Fixed Model.[] to raise for boolean argument (#97).
72
-
73
- * Added Database#add_index method (thanks coda.hale).
74
-
75
- * Added error reporting for filtering on comparison not in a block (thanks Jim Morris).
76
-
77
- * Added support for inline index definition (thanks Dado).
78
-
79
- * Added Database#create_table! method for forcibly creating a table (thanks Dado).
80
-
81
- * Added support for using Dataset#update with block.
82
-
83
- * Changed subscript access to use | operator.
84
-
85
- * Fixed subscript access in sequelizer.
86
-
87
- * Added support for subscript access using Symbol#/ operator.
88
-
89
- === 0.4.2.2 (2007-12-10)
90
-
91
- * Improved code coverage.
92
-
93
- * Fixed Dataset#count to work properly with datasets with fixed SQL (when using #fetch).
94
-
95
- * Added Model.create_with_params method that filters the given parameters accordring to the model's columns (thanks Aman Gupta).
96
-
97
- === 0.4.2.1 (2007-12-09)
98
-
99
- * Refactored and fixed Dataset#reverse_order to work with field quoting (thanks Christian).
100
-
101
- * Fixed problem with field quoting in insert statements.
102
-
103
- * Changed sequelizer code to silently fail on any error when requiring parsetree and ruby2ruby.
104
-
105
- * Added Database#create_view, #create_or_replace_view and #drop_view methods. Also implemented Dataset#create_view and #create_or_replace_view convenience methods.
106
-
107
- * Keep DRY by re-using Model#[]= from method_missing.
108
-
109
- * Added Model.fetch alias for DB.fetch.set_model(Model)
110
-
111
- === 0.4.2 (2007-12-07)
112
-
113
- * Implemented Model#save_changes.
114
-
115
- * Extended Model#save to accept specific columns to update.
116
-
117
- * Implemented experimental JDBC adapter.
118
-
119
- * Added adapter skeleton as starting point for new adapters.
120
-
121
- * Cleaned-up adapters and moved automatic requiring of 'sequel' to adapter stubs.
122
-
123
- === 0.4.1.3 (2007-12-05)
124
-
125
- * Better plugin conventions.
126
-
127
- * Added experimental OpenBase adapter.
128
-
129
- * Fixed Sequel.<xxx> methods to accept options hash as well as database name. Fixed Sequel.connect to accept options hash as well as URI (Wayne).
130
-
131
- === 0.4.1.2 (2007-12-04)
132
-
133
- * Added release rake task (using RubyForge).
134
-
135
- * Changed Model.is to accept variable arity.
136
-
137
- * Implemented plugin loading for model classes.
138
-
139
- * Fixed odbc-mssql and odbc adapters (thanks Dusty.)
140
-
141
- * Implemented odbc-mssql adapter (thanks Dusty.)
142
-
143
- === 0.4.1.1 (2007-11-27)
144
-
145
- * Fixed #first and #last functionality in Informix::Dataset (thanks Gerardo Santana).
146
-
147
- === 0.4.1 (2007-11-25)
148
-
149
- * Put adapter files in lib/sequel/adapters. Requiring sequel/<adapter> is now deprecated. Users can now just require 'sequel' and adapters are automagically loaded (#93).
150
-
151
- === 0.4.0 (2007-11-24)
152
-
153
- * Reorganized lib directory structure.
154
-
155
- * Added support for dbi-xxx URI schemes (#86).
156
-
157
- * Fixed problem in Database#uri where setting the password would raise an error (#87).
158
-
159
- * Improved Dataset#insert_sql to correctly handle string keys (#92).
160
-
161
- * Improved error-handling for worker threads. Errors are saved to an array and are accessible through #errors (#91).
162
-
163
- * Dataset#uniq/distinct can now accept a column list for DISTINCT ON clauses.
164
-
165
- * Fixed Model.all.
166
-
167
- * Fixed literalization of strings with escape sequences in postgres adapter (#90).
168
-
169
- * Added support for literalizing BigDecimal values (#89).
170
-
171
- * Fixed column qualification for joined datasets (thanks Christian).
172
-
173
- * Implemented experimental informix adapter.
174
-
175
- === 0.3.4.1 (2007-11-10)
176
-
177
- * Changed Dataset#select_sql to support queries without a FROM clause.
178
-
179
- === 0.3.4 (2007-11-10)
180
-
181
- * Fixed MySQL adapter to allow calling stored procedures (thanks Sebastian).
182
-
183
- * Changed Dataset#each to always return self.
184
-
185
- * Fixed SQL functions without arguments in block filters.
186
-
187
- * Implemented super-cool Symbol#cast_as method.
188
-
189
- * Fixed error message in command-line tool if failed to load adapter (#85).
190
-
191
- * Refactored code relating to column references for better extendibility (#88).
192
-
193
- * Tiny fix to Model#run_hooks.
194
-
195
- === 0.3.3 (2007-11-04)
196
-
197
- * Revised code to generate SQL statements without trailing semicolons.
198
-
199
- * Added Sequel::Worker implementation of a simple worker thread for asynchronous execution.
200
-
201
- * Added spec for Oracle adapter.
202
-
203
- * Fixed Oracle adapter to format INSERT statements without semicolons (thanks Liming Lian).
204
-
205
- * Renamed alias to Array#keys as Array#columns instead of Array#fields.
206
-
207
- * Renamed FieldCompositionMethods as ColumnCompositionMethods.
208
-
209
- * Implemented Sequel::NumericExtensions to provide stuff like 30.days.ago.
210
-
211
- === 0.3.2 (2007-11-01)
212
-
213
- * Added #to_column_name as alias to #to_field_name, #column_title as alias to #field_title.
214
-
215
- * Added Dataset#interval method for getting interval between minimum/maximum values for a column.
216
-
217
- * Fixed Oracle::Database#execute (#84).
218
-
219
- * Added group_and_count as general implementation for count_by_xxx.
220
-
221
- * Added count_by magic method.
222
-
223
- * Added Dataset#range method for getting the minimum/maximum values for a column.
224
-
225
- * Fixed timestamp translation in SQLite adapter (#83).
226
-
227
- * Experimental DB2 adapter.
228
-
229
- * Added Dataset#set as alias to Dataset#update.
230
-
231
- * Removed long deprecated expressions.rb code.
232
-
233
- * Better documentation.
234
-
235
- * Implemented Dataset magic methods: order_by_xxx, group_by_xxx, filter_by_xxx, all_by_xxx, first_by_xxx, last_by_xxx.
236
-
237
- * Changed Model.create and Model.new to accept a block.
238
-
239
- === 0.3.1 (2007-10-30)
240
-
241
- * Typo fixes (#79).
242
-
243
- * Added require 'yaml' to dataset.rb (#78).
244
-
245
- * Changed postgres adapter to use the ruby-postgres library's type conversion if available (#76).
246
-
247
- * Fixed string literalization in mysql adapter for strings with comment backslashes in them (#75).
248
-
249
- * Fixed ParseTree dependency to work with version 2.0.0 and later (#74).
250
-
251
- * foreign_key definitions now accept :key option for specifying the remote key (#73).
252
-
253
- * Fixed Model#method_missing to not raise error for columns not in the table but for which a value exists (#77).
254
-
255
- * New documentation for Model.
256
-
257
- * Implemented Oracle adapter based on ruby-oci8 library.
258
-
259
- * Implemented Model#pk_hash. Is it really necessary?
260
-
261
- * Deprecated Model#pkey. Implemented better Model#pk method.
262
-
263
- * Specs and docs for Model.one_to_one, Model.one_to_many macros.
264
-
265
- === 0.3.0.1 (2007-10-20)
266
-
267
- * Changed Database#fetch to return a modified dataset.
268
-
269
- === 0.3 (2007-10-20)
270
-
271
- * Added stock transforms to Dataset#transform. Refactored Model.serialize.
272
-
273
- * Added Database#logger= method for setting the database logger object.
274
-
275
- * Fixed Model.[] to act as shortcut to Model.find when a hash is given (#71).
276
-
277
- * Added support for old and new decimal types in MySQL adapter, and updated MYSQL_TYPES with MySQL 5.0 constants (#72).
278
-
279
- * Implemented Database#disconnect method for all adapters.
280
-
281
- * Fixed small bug in ArrayKeys module.
282
-
283
- * Implemented model caching by primary key.
284
-
285
- * Separated Model.find and Model.[] functionality. Model.find takes a filter. Model.[] is strictly for finding by primary keys.
286
-
287
- * Enhanced Dataset#first to accept a filter block. Model#find can also now accept a filter block.
288
-
289
- * Changed Database#[] to act as shortcut to #fetch if a string is given.
290
-
291
- * Renamed Database#each to #fetch. If no block is given, the method returns an enumerator.
292
-
293
- * Changed Dataset#join methods to correctly literalize values in join conditions (#70).
294
-
295
- * Fixed #filter with ranges to correctly literalize field names (#69).
296
-
297
- * Implemented Database#each method for quickly retrieving records with arbitrary SQL (thanks Aman Gupta).
298
-
299
- * Fixed bug in postgres adapter where a LiteralString would be literalized as a regular String.
300
-
301
- * Fixed SQLite insert with subquery (#68).
302
-
303
- * Reverted back to hashes as default mode. Added Sequel.use_array_tuples and Sequel.use_hash_tuples methods.
304
-
305
- * Fixed problem with arrays with keys when using #delete.
306
-
307
- * Implemented ArrayKeys as substitute for ArrayFields.
308
-
309
- * Added Dataset#each_hash method.
310
-
311
- * Rewrote SQLite::Database#transaction to use sqlite3-ruby library implementation of transactions.
312
-
313
- * Fixed Model.destroy_all to work correctly in cases where no before_destroy hook is defined and an after_destroy hook is defined.
314
-
315
- * Restored Model.has_hooks? implementation.
316
-
317
- * Changed Database#<< to strip comments and whitespace only when an array is given.
318
-
319
- * Changed Schema::Generator#primary_key to accept calls with the type argument omitted.
320
-
321
- * Hooks can now be prepended or appended by choice.
322
-
323
- * Changed Model.subset to define filter method on the underlying dataset instead of the model class.
324
-
325
- * Fixed Dataset#transform to work with array fields.
326
-
327
- * Added Dataset#to_csv method.
328
-
329
- * PrettyTable can now extract column names from arrayfields.
330
-
331
- * Converted ado, dbi, odbc adapters to use arrayfields instead of hashes.
332
-
333
- * Fixed composite key support.
334
-
335
- * Fixed Dataset#insert_sql, update_sql to support array fields.
336
-
337
- * Converted sqlite, mysql, postgres adapters to use arrayfields instead of hashes.
338
-
339
- * Extended Dataset#from to auto alias sub-queries.
340
-
341
- * Extended Dataset#from to accept hash for aliasing tables.
342
-
343
- * Added before_update, after_update hooks.
344
-
345
- === 0.2.1.1 (2007-10-07)
346
-
347
- * Added Date literalization to sqlite adapter (#60).
348
-
349
- * Changed Model.serialize to allow calling it after the class is defined (#59).
350
-
351
- * Fixed after_create hooks to allow calling save inside the hook (#58).
352
-
353
- * Fixed MySQL quoting of sql functions (#57).
354
-
355
- * Implemented rollback! global method for cancelling transactions in progress.
356
-
357
- * Fixed =~ operator in Sequelizer.
358
-
359
- * Fixed ODBC::Dataset#fetch_rows (thanks Dusty).
360
-
361
- * Renamed Model.recreate_table to create_table!. recreate_table is deprecated and will issue a warning (#56).
362
-
363
- === 0.2.1 (2007-09-24)
364
-
365
- * Added default implementation of Model.primary_key_hash.
366
-
367
- * Fixed Sequel::Model() to set dataset for inherited classes.
368
-
369
- * Rewrote Model.serialize to use Dataset#transform.
370
-
371
- * Implemented Dataset#transform.
372
-
373
- * Added gem spec for Windows (without ParseTree dependency).
374
-
375
- * Added support for dynamic strings in Sequelizer (#49).
376
-
377
- * Query branch merged into trunk.
378
-
379
- * Implemented self-changing methods.
380
-
381
- * Add support for ternary operator to Sequelizer.
382
-
383
- * Fixed sequelizer to evaluate expressions if they don't involve symbols or literal strings.
384
-
385
- * Added protection against using #each, #delete, #insert, #update inside query blocks.
386
-
387
- * Improved Model#method_missing to deal with invalid attributes.
388
-
389
- * Implemented Dataset#query.
390
-
391
- * Added Dataset#group_by as alias for Dataset#group.
392
-
393
- * Added Dataset#order_by as alias for Dataset#order.
394
-
395
- * More model refactoring. Added support for composite keys.
396
-
397
- * Added Dataset#empty? method (#46).
398
-
399
- * Fixed Symbol#to_field_name to support names with numbers and upper-case characters (#45).
400
-
401
- * Added install_no_doc rake task.
402
-
403
- * Partial refactoring of model code.
404
-
405
- * Refactored dataset-model association and added Dataset#set_row_filter method.
406
-
407
- * Added support for case-sensitive regexps to mysql adapter.
408
-
409
- * Changed mysql adapter to support encoding option as well.
410
-
411
- * Added charset/encoding option to postgres adapter.
412
-
413
- * Implemented Model.serialize (thanks Aman Gupta.)
414
-
415
- * Changed Model.create to INSERT DEFAULT VALUES instead of (id) VALUES (null) (brings back #41.)
416
-
417
- * Fixed Model.new to work without arguments.
418
-
419
- * Added Model.no_primary_key method to allow models without primary keys.
420
-
421
- * Added Model#this method (#42 thanks Duane Johnson).
422
-
423
- * Fixed Dataset#insert_sql to use DEFAULT VALUES clause if argument is an empty hash.
424
-
425
- * Fixed Model.create to work correctly when no argument is passed (#41).
426
-
427
- === 0.2.0.2 (2007-09-07)
428
-
429
- * Dataset#insert can now accept subqueries.
430
-
431
- * Changed Migrator.apply to return the version.
432
-
433
- * Changed Sequel::Model() to cache intermediate classes so descendant classes can be reopened (#39).
434
-
435
- * Added :charset option to MySQL adapter (#40).
436
-
437
- * Fixed Dataset#exclude to add parens around NOT expression (#38).
438
-
439
- * Fixed use of sub-queries with all comparison operators in block filters (#38).
440
-
441
- * Fixed arithmetic expressions in block filters to not be literalized.
442
-
443
- * Changed Symbol#method_missing to return LiteralString.
444
-
445
- * Changed PrettyTable to right-align numbers.
446
-
447
- * Fixed Model.create_table (thanks Duane Johnson.)
448
-
449
- === 0.2.0.1 (2007-09-04)
450
-
451
- * Improved support for invoking methods with inline procs inside block filters.
452
-
453
- === 0.2.0 (2007-09-02)
454
-
455
- * Fixed Model.drop_table (thanks Duane Johnson.)
456
-
457
- * Dataset#each can now return rows for arbitrary SQL by specifying :sql option.
458
-
459
- * Added spec for postgres adapter.
460
-
461
- * Fixed Model.method_missing to work with new SQL generation.
462
-
463
- * Fixed #compare_expr to support regexps.
464
-
465
- * Fixed postgres, mysql adapters to support regexps.
466
-
467
- * More specs for block filters. Updated README.
468
-
469
- * Added support for globals and $X macros in block filters.
470
-
471
- * Fixed Sequelizer to not fail if ParseTree or Ruby2Ruby gems are missing.
472
-
473
- * Renamed String#expr into String#lit (#expr should be deprecated in future versions).
474
-
475
- * Renamed Sequel::ExpressionString into LiteralString.
476
-
477
- * Fixed Symbol#[] to return an ExpressionString, so as not to be literalized.
478
-
479
- * Renamed Dataset::Expressions to Dataset::Sequelizer.
480
-
481
- * Renamed Expressions#format_re_expression to match_expr.
482
-
483
- * Renamed Expressions#format_eq_expression to compare_expr.
484
-
485
- * Added support for Regexp in MySQL adapter.
486
-
487
- * Refactored Regexp expressions into a separate #format_re_expression method.
488
-
489
- * Added support for arithmetic in proc filters.
490
-
491
- * Added support for nested proc expressions, more specs.
492
-
493
- * Added support for SQL function using symbols, e.g. :sum[:x].
494
-
495
- * Fixed deadlock bug in ConnectionPool.
496
-
497
- * Removed deprecated old expressions.rb.
498
-
499
- * Rewrote Proc filter feature using ParseTree.
500
-
501
- * Added support for additional functions on columns using Symbol#method_missing.
502
-
503
- * Added support for supplying filter block to DB#[] method, to allow stuff like DB[:nodes] {:path =~ /^icex1/}.
504
-
505
- === 0.1.9.12 (2007-08-26)
506
-
507
- * Added spec for PrettyTable.
508
-
509
- * Added specs for Schema::Generator and Model (#36 thanks technoweenie).
510
-
511
- * Fixed Sequel::Model.set_schema (#36 thanks technoweenie.)
512
-
513
- * Added support for no options on Schema::Generator#foreign_key (#36 thanks technoweenie.)
514
-
515
- * Implemented (restored?) Schema::Generator#primary_key_name (#36 thanks technoweenie.)
516
-
517
- * Better spec code coverage.
518
-
519
- === 0.1.9.11 (2007-08-24)
520
-
521
- * Changed Dataset#set_model to allow supplying additional arguments to the model's initialize method (#35). Thanks Sunny Hirai.
522
-
523
- === 0.1.9.10 (2007-08-22)
524
-
525
- * Changed schema generation code to generate separate statements for CREATE TABLE and each CREATE INDEX (#34).
526
-
527
- * Refactored Dataset::SQL#field_name for better support of different field quoting standards by specific adapters.
528
-
529
- * Added #current_page_record_count for paginated datasets.
530
-
531
- * Removed Database#literal and included Dataset::SQL instead.
532
-
533
- * Sequel::Dataset:SQL#field_name can now take a hash (as well as #select and any method that uses #field_name) for aliasing column names. E.g. DB[:test].select(:_qqa => 'Date').sql #=> 'SELECT _qqa AS Date FROM test'.
534
-
535
- * Moved SingleThreadedPool to lib/sequel/connection_pool.rb.
536
-
537
- * Changed SQLite::Dataset to return affected rows for #delete and #update (#33).
538
-
539
- * ADO adapter: Added use of Enumerable for Recordset#Fields, playing it safe and moving to the first row before getting results, and changing the auto_increment constant to work for MSSQL.
540
-
541
- === 0.1.9.9 (2007-08-18)
542
-
543
- * New ADO adapter by cdcarter (#31).
544
-
545
- * Added automatic column aliasing to #avg, #sum, #min and #max (#30).
546
-
547
- * Fixed broken Sequel::DBI::Dataset#fetch_rows (#29 thanks cdcarter.)
548
-
549
- === 0.1.9.8 (2007-08-15)
550
-
551
- * Fixed DBI adapter.
552
-
553
- === 0.1.9.7 (2007-08-15)
554
-
555
- * Added support for executing batch statements in sqlite adapter.
556
-
557
- * Changed #current_page_record_range to return 0..0 for an invalid page.
558
-
559
- * Fixed joining of aliased tables.
560
-
561
- * Improved Symbol#to_field_name to prevent false positives.
562
-
563
- * Implemented Dataset#multi_insert with :commit_every option.
564
-
565
- * More docs for Dataset#set_model.
566
-
567
- * Implemented automatic creation of convenience methods for each adapter (e.g. Sequel.sqlite etc.)
568
-
569
- === 0.1.9.6 (2007-08-13)
570
-
571
- * Refactored schema definition code. Gets rid of famous primary_key problem as well as other issues (e.g. issue #22).
572
-
573
- * Added #pagination_record_count, #page_range and #current_page_record_range for paginated datasets.
574
-
575
- * Changed MySQL adapter to automatically reconnect (issue #26).
576
-
577
- * Changed Sequel() to accept variable arity.
578
-
579
- * Added :elements option to column definition, in order to support ENUM and SET types.
580
-
581
- === 0.1.9.5 (2007-08-12)
582
-
583
- * Fixed migration docs.
584
-
585
- * Removed dependency on PGconn in Schema class.
586
-
587
- === 0.1.9.4 (2007-08-11)
588
-
589
- * Added Sequel.dbi convenience method for using DBI connection strings to open DBI databases.
590
-
591
- === 0.1.9.3 (2007-08-10)
592
-
593
- * Added support for specifying field size in schema definitions (thanks Florian Aßmann.)
594
-
595
- * Added migration code based on work by Florian Aßmann.
596
-
597
- * Reintroduced metaid dependency. No need to keep a local copy of it.
598
-
599
- === 0.1.9.2 (2007-07-24)
600
-
601
- * Removed metaid dependency. Re-factored requires in lib/sequel.rb.
602
-
603
- === 0.1.9.1 (2007-07-22)
604
-
605
- * Improved robustness of MySQL::Dataset#field_name.
606
-
607
- * Added Sequel.single_threaded= convenience method.
608
-
609
- === 0.1.9 (2007-07-21)
610
-
611
- * Fixed #update_sql and #insert_sql to support field quoting by calling #field_name.
612
-
613
- * Implemented automatic data type conversion in mysql adapter.
614
-
615
- * Added support for boolean literals in mysql adapter.
616
-
617
- * Added support for ORDER and LIMIT clauses in UPDATE statements in mysql adapter.
618
-
619
- * Implemented correct field quoting (using back-ticks) in mysql adapter.
620
-
621
- * Wrote basic MySQL spec.
622
-
623
- * Fixd MySQL::Dataset to return correct data types with symbols as hash keys.
624
-
625
- * Removed discunctional MySQL::Database#transaction.
626
-
627
- * Added support for single threaded operation.
628
-
629
- * Fixed bug in Dataset#format_eq_expression where Range objects would not be literalized correctly.
630
-
631
- * Added parens around postgres LIKE expressions using regexps.
632
-
633
- === 0.1.8 (2007-07-10)
634
-
635
- * Implemented Dataset#columns for retrieving the columns in the result set.
636
-
637
- * Updated Model with changes to how model-associated datasets work.
638
-
639
- * Beefed-up specs. Coverage is now at 95.0%.
640
-
641
- * Added support for polymorphic datasets.
642
-
643
- * The adapter dataset interface was simplified and standardized. Only four methods need be overriden: fetch_rows, update, insert and delete.
644
-
645
- * The Dataset class was refactored. The bulk of the dataset code was moved into separate modules.
646
-
647
- * Renamed Dataset#hash_column to Dataset#to_hash.
648
-
649
- * Added some common pragmas to sqlite adapter.
650
-
651
- * Added Postgres::Dataset#analyze for EXPLAIN ANALYZE queries.
652
-
653
- * Fixed broken Postgres::Dataset#explain.
654
-
655
- === 0.1.7
656
-
657
- * Removed db.synchronize wrapping calls in sqlite adapter.
658
-
659
- * Implemented Model.join method to restrict returned columns to the model table (thanks Pedro Gutierrez).
660
-
661
- * Implemented Dataset#paginate method.
662
-
663
- * Fixed after_destroy hook.
664
-
665
- * Improved Dataset#first and #last to accept a filter hash.
666
-
667
- * Added Dataset#[]= method.
668
-
669
- * Added Sequel() convenience method.
670
-
671
- * Fixed Dataset#first to include a LIMIT clause for a single record.
672
-
673
- * Small fix to Postgres driver to return a primary_key value for the inserted record if it is specified in the insertion values (thanks Florian Aßmann and Pedro Gutierrez).
674
-
675
- * Fixed Symbol#DESC to support qualified notation (thanks Pedro Gutierrez).
676
-
677
- === 0.1.6
678
-
679
- * Fixed Model#method_missing to raise for an invalid attribute.
680
-
681
- * Fixed PrettyTable to print model objects (thanks snok.)
682
-
683
- * Fixed ODBC timestamp conversion to return DateTime rather than Time object (thanks snok.)
684
-
685
- * Fixed Model.method_missing (thanks snok.)
686
-
687
- * Model.method_missing now creates stubs for calling Model.dataset methods. Methods like Model.each etc are removed.
688
-
689
- * Changed default join type to INNER JOIN (thanks snok.)
690
-
691
- * Added support for literal expressions, e.g. DB[:items].filter(:col1 => 'col2 - 10'.expr).
692
-
693
- * Added Dataset#and.
694
-
695
- * SQLite adapter opens a memory DB if no database is specified, e.g. Sequel.open 'sqlite:/'.
696
-
697
- * Added Dataset#or, pretty nifty.
698
-
699
- === 0.1.5
700
-
701
- * Fixed Dataset#join to support multiple joins. Added #left_outer_join, #right_outer_join, #full_outer_join, #inner_join methods.
702
-
703
- === 0.1.4
704
-
705
- * Added String#split_sql.
706
-
707
- * Implemented Array#to_sql and String#to_sql. Database#to_sql can now take an array of strings and convert into an SQL string. Comments and excessive white-space are removed.
708
-
709
- * Improved Schema generator to support data types as method names:
710
- DB.create_table :test do
711
- integer :abc
712
- text :def
713
- ...
714
- end
715
-
716
- * Implemented ODBC adapter.
717
-
718
- === 0.1.3
719
-
720
- * Implemented DBI adapter.
721
-
722
- * Refactored database connection code. Now handled through Database#connect.
723
-
724
- === 0.1.2
725
-
726
- * The first opened database is automatically assigned to to Model.db.
727
-
728
- * Removed SequelConnectionError. Exception class errors are converted to RuntimeError.
729
-
730
- * Added support for UNION, INTERSECT and EXCEPT set operations.
731
-
732
- * Fixed Dataset#single_record to return nil if no record is found.
733
-
734
- * Updated specs to conform to RSpec 1.0.
735
-
736
- * Added Model#find_or_create method.
737
-
738
- * Fixed MySQL::Dataset#query_single (thanks Dries Harnie.)
739
-
740
- * Added Model.subset method. Fixed Model.filter and Model.exclude to accept blocks.
741
-
742
- * Added Database#uri method.
743
-
744
- * Refactored and removed deprecated code in postgres adapter.
745
-
746
- ===0.1.1
747
-
748
- * More documentation for Dataset.
749
-
750
- * Added Dataset#size as alias to Dataset#count.
751
-
752
- * Changed Database#<< to call execute (instead of being an alias). Thus it will work for descendants as well.
753
-
754
- * Fixed Sequel.open to accept variable arity.
755
-
756
- * Refactored Model#refresh, Model.create. Removed Model#reload.
757
-
758
- * Refactored Model hooks.
759
-
760
- * Cleaned up Dataset API.
761
-
762
- === 0.1.0
763
-
764
- * Changed Database#create_table to only accept a block. Nobody's gonna use the other way.
765
-
766
- * Removed Dataset#[]= method. Too confusing and not really useful.
767
-
768
- * Fixed ConnectionPool#hold to wrap exceptions only once.
769
-
770
- * Dataset#where_list Renamed Dataset#expression_list.
771
-
772
- * Added support for qualified fields in Proc expressions (e.g. filter {items.id == 1}.)
773
-
774
- * Added like? and in? Proc expression operators.
775
-
776
- * Added require 'date' in dataset.rb. Is this a 1.8.5 thing?
777
-
778
- * Refactored Dataset to use literal strings instead of format strings (slight performance improvement and better readability.)
779
-
780
- * Added support for literalizing Date objects.
781
-
782
- * Refactored literalization of Time objects.
783
-
784
- === 0.0.20
785
-
786
- * Refactored Dataset where clause construction to use expressions.
787
-
788
- * Implemented Proc expressions (adapted from a great idea by Sam Smoot.)
789
-
790
- * Fixed Model#map.
791
-
792
- * Documentation for ConnectionPool.
793
-
794
- * Specs for Database.
795
-
796
- === 0.0.19
797
-
798
- * More specs for Dataset.
799
-
800
- * Fixed Dataset#invert_order to work correctly with strings.
801
-
802
- * Fixed Model#== to check equality of values.
803
-
804
- * Added Model#exclude and Model#order.
805
-
806
- * Fixed Dataset#order and Dataset#group to behave correctly when supplied with qualified field name symbols.
807
-
808
- * Removed Database#literal. Shouldn't have been there.
809
-
810
- * Added SQLite::Dataset#explain. Returns an array of opcode hashes.
811
-
812
- * Specs for ConnectionPool.
813
-
814
- === 0.0.18
815
-
816
- * Implemented SequelError and SequelConnectionError classes. ConnectionPool#hold now catches any connection errors and reraises them SequelConnectionError.
817
-
818
- * Removed duplication in Database#[].
819
-
820
- * :from and :select options are now always arrays (patch by Alex Bradbury.)
821
-
822
- * Fixed Dataset#exclude to work correctly (patch and specs by Alex Bradbury.)
823
-
824
- === 0.0.17
825
-
826
- * Fixed Postgres::Database#tables to return table names as symbols (caused problem when using Database#table_exists?).
827
-
828
- * Fixed Dataset#from to have variable arity, like Dataset#select and Dataset#where (patch by Alex Bradbury.)
829
-
830
- * Added support for GROUP BY and HAVING clauses (patches by Alex Bradbury.) Refactored Dataset#filter.
831
-
832
- * More specs.
833
-
834
- * Refactored Dataset#where for better composability.
835
-
836
- * Added Dataset#[]= method.
837
-
838
- * Added support for DISTINCT and OFFSET clauses (patches by Alex Bradbury.) Dataset#limit now accepts ranges. Added Dataset#uniq and distinct methods.
839
-
840
- === 0.0.16
841
-
842
- * More documentation.
843
-
844
- * Added support for subqueries in Dataset#literal.
845
-
846
- * Added support for Model.all_by_XXX methods through Model.method_missing.
847
-
848
- * Added basic SQL logging to Database.
849
-
850
- * Added Enumerable#send_each convenience method.
851
-
852
- * Changed Dataset#destroy to return the number of deleted records.
853
-
854
- === 0.0.15
855
-
856
- * Improved Dataset#insert_sql to allow arrays as well as hashes.
857
-
858
- * Database#drop_table now accepts a list of table names.
859
-
860
- * Added Model#id to to return the id column.
861
-
862
- === 0.0.14
863
-
864
- * Fixed Model's attribute accessors (hopefully for the last time).
865
-
866
- * Changed Model.db and Model.db= to allow different databases for different model classes.
867
-
868
- * Fixed bug in aggregate methods (max, min, etc) for datasets using record classes.
869
-
870
- === 0.0.13
871
-
872
- * Fixed Model#method_missing to do both find, filter and attribute accessors. duh.
873
-
874
- * Fixed bug in Dataset#literal when quoting arrays of strings (thanks Douglas Koszerek.)
875
-
876
- === 0.0.12
877
-
878
- * Model#save now correctly performs an INSERT for new objects.
879
-
880
- * Added Model#reload for reloading an object from the database.
881
-
882
- * Added Dataset#naked method for getting a version of a dataset that fetches records as hashes.
883
-
884
- * Implemented attribute accessors for column values ala ActiveRecord models.
885
-
886
- * Fixed filtering using nil values (e.g. dataset.filter(:parent_id => nil)).
887
-
888
- === 0.0.11
889
-
890
- * Renamed Model.schema to Model.set_schema and Model.get_schema to Model.schema.
891
-
892
- * Improved Model class to allow descendants of model clases (thanks Pedro Gutierrez.)
893
-
894
- * Removed require 'postgres' in schema.rb (thanks Douglas Koszerek.)
895
-
896
- === 0.0.10
897
-
898
- * Added some examples.
899
-
900
- * Added Dataset#print method for pretty-printing tables.
901
-
902
- === 0.0.9
903
-
904
- * Fixed Postgres::Database#tables and #locks methods.
905
-
906
- * Added PGconn#last_insert_id method that should support all 7.x and 8.x versions of Postgresql.
907
-
908
- * Added Dataset#exists method for EXISTS where clauses.
909
-
910
- * Changed behavior of Dataset#literal to regard symbols as field names.
911
-
912
- * Refactored and DRY'd Dataset#literal and overrides therof. Added support for subqueries in where clause.
913
-
914
- === 0.0.8
915
-
916
- * Fixed Dataset#reverse_order to provide chainability. This method can be called without arguments to invert the current order or with arguments to provide a descending order.
917
-
918
- * Fixed literal representation of literals in SQLite adapter (thanks Christian Neukirchen!)
919
-
920
- * Refactored insert code in Postgres adapter (in preparation for fetching the last insert id for pre-8.1 versions).
921
-
922
- === 0.0.7
923
-
924
- * Fixed bug in Model.schema, duh!
925
-
926
- === 0.0.6
927
-
928
- * Added Dataset#sql as alias to Dataset#select_sql.
929
-
930
- * Dataset#where and Dataset#exclude can now be used for refining dataset conditions, enabling stuff like posts.where(:title => 'abcdef').exclude(:user_id => 3).
931
-
932
- * Implemented Dataset#exclude method.
933
-
934
- * Added Sequel::Schema#auto_primary_key method for setting an automatic primary key to be added to every table definition. Changed the schema generator to not define a primary key by default.
935
-
936
- * Changed Sequel::Database#table_exists? to rely on the tables method if it is available.
937
-
938
- * Implemented SQLite::Database#tables.
939
-
940
- === 0.0.5
941
-
942
- * Added Dataset#[] method. Refactored Model#find and Model#[].
943
-
944
- * Renamed Pool#conn_maker to Pool#connection_proc.
945
-
946
- * Added automatic require 'sequel' to all adapters for convenience.
947
-
948
- === 0.0.4
949
-
950
- * Added preliminary MySQL support.
951
-
952
- * Code cleanup.
953
-
954
- === 0.0.3
955
-
956
- * Add Dataset#sum method.
957
-
958
- * Added support for exclusive ranges (thanks Christian Neukirchen.)
959
-
960
- * Added sequel console for quick'n'dirty access to databases.
961
-
962
- * Fixed small bug in Dataset#qualified_field_name for better join support.
963
-
964
- === 0.0.2
965
-
966
- * Added Sequel.open as alias to Sequel.connect.
967
-
968
- * Refactored Dataset#where_equal_condition into Dataset#where_condition, allowing arrays and ranges, e.g. posts.filter(:stamp => (3.days.ago)..(1.day.ago)), or posts.filter(:category => ['ruby', 'postgres', 'linux']).
969
-
970
- * Added Model#[]= method for changing column values and Model#save
971
- method for saving them.
972
-
973
- * Added Dataset#destroy for deleting each record individually as support for models. Renamed Model#delete to Model#destroy (and Model#destroy_all) ala ActiveRecord.
974
-
975
- * Refactored Dataset#first and Dataset#last code. These methods can now accept the number of records to fetch.
976
-
977
- === 0.0.1
978
-
979
- * More documentation for Dataset.
980
-
981
- * Renamed Database#query to Database#dataset.
982
-
983
- * Added Dataset#insert_multiple for inserting multiple records.
984
-
985
- * Added Dataset#<< as shorthand for inserting records.
986
-
987
- * Added Database#<< method for executing arbitrary SQL.
988
-
989
- * Imported Sequel code.