class PostgreSQLAdapter
Ruby on Rails 2.2.3
Since v2.2.3The PostgreSQL adapter works both with the native C (ruby.scripting.ca/postgres/) and the pure Ruby (available both as gem and from rubyforge.org/frs/?group_id=234&release_id=1944) drivers.
Options:
-
:host- Defaults to “localhost”. -
:port- Defaults to 5432. -
:username- Defaults to nothing. -
:password- Defaults to nothing. -
:database- The name of the database. No default, must be provided. -
:schema_search_path- An optional schema search path for the connection given as a string of comma-separated schema names. This is backward-compatible with the:schema_orderoption. -
:encoding- An optional client encoding that is used in aSET client_encoding TO <encoding>call on the connection. -
:min_messages- An optional client min messages that is used in aSET client_min_messages TO <min_messages>call on the connection. -
:allow_concurrency- If true, use async query methods so Ruby threads don’t deadlock; otherwise, use blocking query methods.
Inherits from
Constants
Methods (defined here)
- # active?
- # adapter_name
- # add_column
- # begin_db_transaction
- # change_column
- # change_column_default
- # change_column_null
- # client_min_messages
- # client_min_messages=
- # columns
- # commit_db_transaction
- # create_database
- # current_database
- # disconnect!
- # encoding
- # escape_bytea
- # execute
- # indexes
- # insert
- # postgresql_version
- # reconnect!
- # remove_index
- # rename_column
- # rename_table
- # rollback_db_transaction
- # schema_search_path
- # schema_search_path=
- # select_rows
- # supports_ddl_transactions?
- # supports_insert_with_returning?
- # supports_migrations?
- # supports_standard_conforming_strings?
- # table_alias_length
- # tables
- # transaction
- # transaction_active?
- # type_to_sql
- # unescape_bytea
- # update_sql
- self. new
Private methods
(4)
Implementation detail — not part of the public API.
- # configure_connection
- # connect
- # select
- # select_raw
Methods (inherited)
From ActiveRecord::ConnectionAdapters::AbstractAdapter (20)
- # active?
- # adapter_name
- # decrement_open_transactions
- # disable_referential_integrity
- # disconnect!
- # format_log_entry
- # increment_open_transactions
- # log
- # log_info
- # open_transactions
- # prefetch_primary_key?
- # quote_table_name
- # raw_connection
- # reconnect!
- # requires_reloading?
- # reset!
- # supports_count_distinct?
- # supports_ddl_transactions?
- # supports_migrations?
- # verify!
From ActiveRecord::ConnectionAdapters::QueryCache (7)
- # cache
- # clear_query_cache
- # columns_with_query_cache
- # select_all_with_query_cache
- # uncached
- self. dirties_query_cache
- self. included
From ActiveSupport::Callbacks (2)
- # run_callbacks
- self. included
From Object (32)
- # acts_like?
- # app
- # blank?
- # class_eval
- # create
- # create_fixtures
- # duplicable?
- # edit
- # find_cmd
- # helper
- # index
- # instance_exec
- # instance_variable_defined?
- # instance_variable_names
- # message
- # metaclass
- # new_session
- # present?
- # reload!
- # returning
- # start_debugger
- # tail
- # to_json
- # to_param
- # to_query
- # unescape
- # update
- # with_options
- self. blank_slate_method_added
- self. find_hidden_method
- self. lookup_missing_generator
- self. method_added
From ActionController::Caching (3)
- # cache
- self. cache_configured?
- self. cache_store=
From ActionController::Cookies (2)
From ActionController::Flash (1)
- self. included
From ActionController::RecordIdentifier (5)
From ActionController::Rescue (7)
From ActionController::Streaming (2)
From ActionController::Translation (4)
From ActiveRecord::Callbacks (14)
From ActiveRecord::Dirty (4)
From ActiveRecord::Locking::Pessimistic (1)
- # lock!
From ActiveRecord::NamedScope (1)
- self. included
From ActiveRecord::Transactions (4)
From ActiveRecord::Validations (7)
From ActiveRecord::NamedScope::ClassMethods (2)
- # named_scope
- # scopes
From ActiveRecord::Validations::ClassMethods (13)
From ActiveSupport::Memoizable (1)
- # memoize