method
visitor_for
v3.1.0 -
Show latest stable
-
0 notes -
Class: ActiveRecord::ConnectionAdapters::AbstractAdapter
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0 (0)
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
Related methods
- Class methods (18)
- build_read_query_regexp (>= v6.0.0)
- database_exists? (>= v6.0.0)
- dbconsole (>= v7.1.3.2)
- extended_type_map (>= v7.1.3.2)
- extract_limit (>= v7.0.0)
- extract_precision (>= v7.0.0)
- extract_scale (>= v7.0.0)
- find_cmd_and_exec (>= v7.1.3.2)
- initialize_type_map (>= v7.0.0)
- new
- quoted_column_names (>= v6.0.0)
- quoted_table_names (>= v6.0.0)
- register_class_with_limit (>= v7.0.0)
- register_class_with_precision (>= v7.0.0)
- type_cast_config_to_boolean (>= v4.0.2)
- type_cast_config_to_integer (>= v4.0.2)
- validate_default_timezone (>= v7.1.3.2)
- visitor_for
- Instance methods (173)
- active?
- active_threadsafe? (>= v4.1.8)
- adapter_name
- add_enum_value (>= v7.1.3.2)
- advisory_locks_enabled? (>= v6.0.0)
- all_foreign_keys_valid? (>= v7.0.0)
- any_raw_connection (>= v7.1.3.2)
- arel_visitor (>= v5.0.0.1)
- async_enabled? (>= v7.0.0)
- backoff (>= v7.1.3.2)
- build_insert_sql (>= v6.0.0)
- build_result (>= v6.1.3.1)
- build_statement_pool (>= v6.0.0)
- can_perform_case_insensitiv... (>= v5.0.0.1)
- case_insensitive_comparison (>= v3.2.1)
- case_sensitive_comparison (>= v4.2.1)
- case_sensitive_modifier
- check_all_foreign_keys_valid! (>= v7.1.3.2)
- check_if_write_query (>= v7.0.0)
- check_version (>= v6.0.0)
- clean! (>= v7.1.3.2)
- clear_cache!
- close (>= v3.2.1)
- collector (>= v4.2.1)
- column_for (>= v4.2.1)
- column_for_attribute (>= v6.0.0)
- column_name_for_operation (>= v4.2.1)
- column_name_from_arel_node (>= v5.2.3)
- columns (>= v5.1.7)
- combine_bind_parameters (>= v5.0.0.1)
- configure_connection (>= v7.1.3.2)
- connect! (>= v7.1.3.2)
- connection_class (>= v7.0.0)
- connection_klass (>= v6.1.3.1)
- connection_retries (>= v7.1.3.2)
- create_enum (>= v7.0.0)
- create_savepoint
- current_savepoint_name
- database_exists? (>= v7.1.3.2)
- database_version (>= v6.0.0)
- decrement_open_transactions
- default_index_type? (>= v5.1.7)
- default_prepared_statements (>= v7.1.3.2)
- default_timezone (>= v7.1.3.2)
- default_uniqueness_comparison (>= v6.0.0)
- disable_extension (>= v4.0.2)
- disable_referential_integrity
- discard! (>= v5.2.3)
- disconnect!
- drop_enum (>= v7.1.3.2)
- enable_extension (>= v4.0.2)
- expire (>= v3.2.1)
- extended_type_map_key (>= v7.1.3.2)
- extensions (>= v4.0.2)
- extract_limit (>= v4.2.1)
- extract_precision (>= v4.2.1)
- extract_scale (>= v4.2.1)
- field_ordered_value (>= v7.0.0)
- format_log_entry (<= v2.3.8)
- get_advisory_lock (>= v5.0.0.1)
- get_database_version (>= v6.0.0)
- ids_in_list_limit (<= v3.0.9)
- increment_open_transactions
- index_algorithms (>= v4.0.2)
- initialize_type_map (>= v4.2.1)
- internal_metadata (>= v7.1.3.2)
- invalidate_transaction (>= v7.1.3.2)
- lease (>= v3.2.1)
- lock_thread= (>= v7.1.3.2)
- log
- log_info (<= v2.3.8)
- lookup_cast_type (>= v4.2.1)
- migration_context (>= v5.2.3)
- migrations_paths (>= v5.2.3)
- new_column (>= v4.2.1)
- open_transactions
- pool= (>= v7.1.3.2)
- prefetch_primary_key?
- prepared_statements (>= v6.0.0)
- prepared_statements? (>= v6.1.7.7)
- prepared_statements_disable... (>= v6.1.3.1)
- preventing_writes? (>= v6.0.0)
- quote_table_name
- raw_connection
- reconnect (>= v7.1.3.2)
- reconnect!
- reconnect_can_restore_state? (>= v7.1.3.2)
- register_class_with_limit (>= v4.2.1)
- register_class_with_precision (>= v5.0.0.1)
- release_advisory_lock (>= v5.0.0.1)
- release_savepoint
- reload_type_map (>= v4.2.1)
- rename_enum (>= v7.1.3.2)
- rename_enum_value (>= v7.1.3.2)
- replica? (>= v6.0.0)
- requires_reloading?
- reset!
- reset_runtime (<= v2.3.8)
- retryable_connection_error? (>= v7.1.3.2)
- retryable_query_error? (>= v7.1.3.2)
- retry_deadline (>= v7.1.3.2)
- return_value_after_insert? (>= v7.1.3.2)
- role (>= v7.0.0)
- rollback_to_savepoint
- savepoint_errors_invalidate... (>= v7.1.3.2)
- schema_cache (>= v6.0.0)
- schema_cache= (>= v4.0.2)
- schema_creation (>= v4.0.2)
- schema_migration (>= v6.0.0)
- schema_version (>= v7.0.0)
- seconds_idle (>= v5.2.3)
- shard (>= v7.0.0)
- steal! (>= v5.1.7)
- substitute_at
- supports_advisory_locks? (>= v5.0.0.1)
- supports_bulk_alter?
- supports_check_constraints? (>= v6.1.3.1)
- supports_comments? (>= v5.0.0.1)
- supports_comments_in_create? (>= v5.0.0.1)
- supports_common_table_expre... (>= v6.1.3.1)
- supports_concurrent_connect... (>= v7.0.0)
- supports_count_distinct?
- supports_datetime_with_prec... (>= v5.0.0.1)
- supports_ddl_transactions?
- supports_deferrable_constra... (>= v7.0.0)
- supports_exclusion_constrai... (>= v7.1.3.2)
- supports_explain? (>= v3.2.1)
- supports_expression_index? (>= v5.0.0.1)
- supports_extensions? (>= v4.0.2)
- supports_foreign_keys? (>= v4.2.1)
- supports_foreign_keys_in_cr... (>= v5.1.7)
- supports_foreign_tables? (>= v5.2.3)
- supports_indexes_in_create? (>= v4.2.1)
- supports_index_include? (>= v7.1.3.2)
- supports_index_sort_order? (>= v3.2.1)
- supports_insert_conflict_ta... (>= v6.0.0)
- supports_insert_on_duplicat... (>= v6.0.0)
- supports_insert_on_duplicat... (>= v6.0.0)
- supports_insert_returning? (>= v6.0.0)
- supports_json? (>= v5.0.0.1)
- supports_lazy_transactions? (>= v6.0.0)
- supports_materialized_views? (>= v6.0.0)
- supports_migrations?
- supports_multi_insert? (>= v5.0.0.1)
- supports_nulls_not_distinct? (>= v7.1.3.2)
- supports_optimizer_hints? (>= v6.0.0)
- supports_partial_index? (>= v4.0.2)
- supports_partitioned_indexes? (>= v6.1.3.1)
- supports_primary_key?
- supports_restart_db_transac... (>= v7.1.3.2)
- supports_savepoints?
- supports_transaction_isolat... (>= v4.0.2)
- supports_unique_constraints? (>= v7.1.3.2)
- supports_validate_constraints? (>= v5.2.3)
- supports_views? (>= v4.2.1)
- supports_virtual_columns? (>= v5.1.7)
- throw_away! (>= v6.1.3.1)
- transaction_joinable=
- transform_query (>= v7.0.0)
- translate_exception
- translate_exception_class (>= v4.1.8)
- type_map (>= v4.2.1)
- unprepared_statement (>= v4.0.2)
- unprepared_visitor (>= v4.0.2)
- use_metadata_table? (>= v6.1.3.1)
- valid_raw_connection (>= v7.1.3.2)
- valid_type? (>= v4.0.2)
- verified! (>= v7.1.3.2)
- verify!
- warning_ignored? (>= v7.1.3.2)
- with_instrumenter (>= v7.0.0)
- without_prepared_statement? (>= v4.0.2)
- with_raw_connection (>= v7.1.3.2)
= private
= protected
visitor_for(pool)
public
Returns a visitor instance for this adaptor, which conforms to the Arel::ToSql interface
Show source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 54 def self.visitor_for(pool) # :nodoc: adapter = pool.spec.config[:adapter] if Arel::Visitors::VISITORS[adapter] ActiveSupport::Deprecation.warn( "Arel::Visitors::VISITORS is deprecated and will be removed. Database adapters " "should define a visitor_for method which returns the appropriate visitor for " "the database. For example, MysqlAdapter.visitor_for(pool) returns " "Arel::Visitors::MySQL.new(pool)." ) Arel::Visitors::VISITORS[adapter].new(pool) else Arel::Visitors::ToSql.new(pool) end end