Skip to content

Commit

Permalink
pg, add missing :nodoc: to adapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
senny committed May 26, 2014
1 parent b952ca3 commit 7a2b37f
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ def adapter_name
ADAPTER_NAME
end

def schema_creation
def schema_creation # :nodoc:
PostgreSQL::SchemaCreation.new self
end

# Adds `:array` option to the default set provided by the
# AbstractAdapter
def prepare_column_options(column, types)
def prepare_column_options(column, types) # :nodoc:
spec = super
spec[:array] = 'true' if column.respond_to?(:array) && column.array
spec[:default] = "\"#{column.default_function}\"" if column.default_function
Expand Down Expand Up @@ -406,7 +406,7 @@ def translate_exception(exception, message)

private

def get_oid_type(oid, fmod, column_name, sql_type = '')
def get_oid_type(oid, fmod, column_name, sql_type = '') # :nodoc:
if !type_map.key?(oid)
load_additional_types(type_map, [oid])
end
Expand All @@ -419,7 +419,7 @@ def get_oid_type(oid, fmod, column_name, sql_type = '')
}
end

def initialize_type_map(m)
def initialize_type_map(m) # :nodoc:
register_class_with_limit m, 'int2', OID::Integer
m.alias_type 'int4', 'int2'
m.alias_type 'int8', 'int2'
Expand Down Expand Up @@ -496,7 +496,7 @@ def extract_limit(sql_type) # :nodoc:
end

# Extracts the value from a PostgreSQL column default definition.
def extract_value_from_default(default)
def extract_value_from_default(default) # :nodoc:
# This is a performance optimization for Ruby 1.9.2 in development.
# If the value is nil, we return nil straight away without checking
# the regular expressions. If we check each regular expression,
Expand Down Expand Up @@ -558,15 +558,15 @@ def extract_value_from_default(default)
end
end

def extract_default_function(default_value, default)
def extract_default_function(default_value, default) # :nodoc:
default if has_default_function?(default_value, default)
end

def has_default_function?(default_value, default)
def has_default_function?(default_value, default) # :nodoc:
!default_value && (%r{\w+\(.*\)} === default)
end

def load_additional_types(type_map, oids = nil)
def load_additional_types(type_map, oids = nil) # :nodoc:
if supports_ranges?
query = <<-SQL
SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype
Expand Down

0 comments on commit 7a2b37f

Please sign in to comment.