sequel_oracle_extensions 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -31,7 +31,7 @@ task :rspec => :check_dependencies
31
31
 
32
32
  task :default => :rspec
33
33
 
34
- require 'rake/rdoctask'
34
+ require 'rdoc/task'
35
35
  Rake::RDocTask.new do |rdoc|
36
36
  version = File.exist?('VERSION') ? File.read('VERSION') : ""
37
37
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.6
1
+ 0.6.7
@@ -312,12 +312,22 @@ module Sequel
312
312
 
313
313
  # Overridden because Oracle has slightly different syntax.
314
314
  def alter_table_sql(table, op)
315
- case op[:op]
316
- when :add_column
317
- "ALTER TABLE #{quote_schema_table(table)} ADD #{column_definition_sql(op)}"
315
+ if op[:op] == :add_column
316
+ subclause = "ADD #{column_definition_sql(op)}"
318
317
  else
319
- return super(table, op)
318
+ quoted_name = quote_identifier(op[:name]) if op[:name]
319
+ case op[:op]
320
+ when :set_column_type
321
+ subclause = "MODIFY #{quoted_name} #{type_literal(op)}"
322
+ when :set_column_default
323
+ subclause = "MODIFY #{quoted_name} DEFAULT #{literal(op[:default])}"
324
+ when :set_column_null
325
+ subclause = "MODIFY #{quoted_name} #{op[:null] ? 'NULL' : 'NOT NULL'}"
326
+ else
327
+ return super(table, op)
328
+ end
320
329
  end
330
+ "ALTER TABLE #{quote_schema_table(table)} #{subclause}"
321
331
  end
322
332
 
323
333
  # Overridden to support various Oracle-specific options.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "sequel_oracle_extensions"
8
- s.version = "0.6.6"
8
+ s.version = "0.6.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joe Khoobyar"]
12
- s.date = "2011-08-31"
12
+ s.date = "2012-01-19"
13
13
  s.description = "Oracle extensions for Sequel, including MERGE statements, optimizer hints, and schema extensions."
14
14
  s.email = "joe@ankhcraft.com"
15
15
  s.extra_rdoc_files = [
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
35
35
  ]
36
36
  s.homepage = "http://github.com/joekhoobyar/sequel_oracle_extensions"
37
37
  s.require_paths = ["lib"]
38
- s.rubygems_version = "1.8.10"
38
+ s.rubygems_version = "1.8.11"
39
39
  s.summary = "Oracle MERGE, optimizer hints, and schema extensions for Sequel"
40
40
 
41
41
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_oracle_extensions
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 6
10
- version: 0.6.6
9
+ - 7
10
+ version: 0.6.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joe Khoobyar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-31 00:00:00 Z
18
+ date: 2012-01-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sequel
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  requirements: []
104
104
 
105
105
  rubyforge_project:
106
- rubygems_version: 1.8.10
106
+ rubygems_version: 1.8.11
107
107
  signing_key:
108
108
  specification_version: 3
109
109
  summary: Oracle MERGE, optimizer hints, and schema extensions for Sequel