提交 7a2b37fb 编写于 作者: Y Yves Senn

pg, add missing `:nodoc:` to adapter.

上级 b952ca36
......@@ -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
......@@ -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
......@@ -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'
......@@ -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,
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册