Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make valid_type? public #9283

Merged
merged 1 commit into from Feb 14, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -305,6 +305,10 @@ def close
pool.checkin self
end

def valid_type?(type)
true
end

protected

def log(sql, name = "SQL", binds = [])
Expand All @@ -326,10 +330,6 @@ def translate_exception(exception, message)
# override in derived class
ActiveRecord::StatementInvalid.new(message)
end

def valid_types?(type)
true
end
end
end
end
Expand Up @@ -582,6 +582,10 @@ def strict_mode?
@config.fetch(:strict, true)
end

def valid_type?(type)
!native_database_types[type].nil?
end

protected

# MySQL is too stupid to create a temporary table for use subquery, so we have
Expand Down Expand Up @@ -747,10 +751,6 @@ def configure_connection
# ...and send them all in one query
execute("SET #{encoding} #{variable_assignments}", :skip_logging)
end

def valid_type?(type)
!native_database_types[type].nil?
end
end
end
end
Expand Up @@ -655,6 +655,10 @@ def use_insert_returning?
@use_insert_returning
end

def valid_type?(type)
!native_database_types[type].nil?
end

protected

# Returns the version of the connected PostgreSQL server.
Expand Down Expand Up @@ -887,10 +891,6 @@ def extract_table_ref_from_insert_sql(sql)
def table_definition
TableDefinition.new(self)
end

def valid_type?(type)
!native_database_types[type].nil?
end
end
end
end
Expand Up @@ -602,11 +602,6 @@ def translate_exception(exception, message)
super
end
end

def valid_type?(type)
true
end

end
end
end