instance method
encoding
Ruby on Rails 5.0.7.2
Since v4.2.11.3Signature
encoding()
Returns the current database encoding format.
Source
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 273
def encoding
select_value("SELECT pg_encoding_to_char(encoding) FROM pg_database WHERE datname LIKE '#{current_database}'", 'SCHEMA')
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb line 273
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements