method
extract_schema_and_table
Ruby on Rails latest stable (v6.1.7.7)
-
0 notes -
Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
- 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
- What's this?
Related methods
- Class methods (9)
- create_unlogged_tables
- database_exists?
- datetime_type (>= v7.0.0)
- dbconsole (>= v7.1.3.2)
- initialize_type_map (>= v7.0.0)
- native_database_types (>= v7.0.0)
- new
- new_client
- visitor_for (<= v3.1.0)
- Instance methods (196)
- active?
- active_threadsafe? (<= v4.1.8)
- adapter_name (<= v4.1.8)
- add_column (<= v3.2.13)
- add_enum_value (>= v7.1.3.2)
- add_oid (<= v4.1.8)
- add_order_by_for_associatio... (<= v2.3.8)
- add_pg_decoders
- add_pg_encoders
- arel_visitor
- begin_db_transaction (<= v3.2.13)
- build_insert_sql
- build_statement_pool
- can_perform_case_insensitiv...
- cast_to_time (<= v1.2.6)
- change_column (<= v3.2.13)
- change_column_default (<= v3.2.13)
- change_column_null (<= v3.2.13)
- check_version
- clear_cache! (<= v5.2.3)
- client_min_messages (<= v3.2.13)
- client_min_messages= (<= v3.2.13)
- column_definitions
- column_name_for_operation (<= v6.0.0)
- columns (<= v3.2.13)
- commit_db_transaction (<= v3.2.13)
- configure_connection
- connect
- construct_coder (<= v5.2.3)
- create (<= v3.0.9)
- create_database (<= v3.2.13)
- create_enum (>= v7.0.0)
- create_savepoint (<= v3.2.13)
- create_table_definition (<= v5.1.7)
- current_database (<= v3.2.13)
- current_schema (<= v3.2.13)
- default_index_type?
- default_sequence_name (<= v3.2.13)
- default_value (<= v1.2.6)
- disable_extension
- disable_referential_integrity (<= v3.2.13)
- discard!
- disconnect!
- distinct (<= v3.2.13)
- drop_database (<= v3.2.13)
- drop_enum (>= v7.1.3.2)
- enable_extension
- encoding (<= v3.2.13)
- enum_types (>= v7.0.0)
- escape_bytea (<= v3.2.13)
- exec_cache
- exec_delete (<= v3.2.13)
- exec_no_cache
- exec_query (<= v3.2.13)
- exec_update (<= v3.2.13)
- execute (<= v3.2.13)
- execute_and_clear
- explain (<= v3.2.13)
- extension_available?
- extension_enabled?
- extensions
- extract_default_function
- extract_limit (<= v5.1.7)
- extract_pg_identifier_from_... (<= v4.1.8)
- extract_schema_and_table (<= v3.1.0)
- extract_table_ref_from_inse...
- extract_value_from_default
- get_advisory_lock
- get_database_version
- get_oid_type
- has_default_function?
- index_algorithms
- indexes (<= v3.2.13)
- index_name_length (<= v5.2.3)
- initialize_type_map
- insert (<= v3.0.9)
- insert_sql (<= v3.2.13)
- in_transaction?
- is_cached_plan_failure?
- last_insert_id (<= v4.2.9)
- last_insert_id_result (<= v5.1.7)
- last_insert_id_value (<= v4.2.9)
- load_additional_types
- load_types_queries (>= v7.0.0)
- lookup_cast_type (<= v5.0.0.1)
- max_identifier_length
- migration_keys (<= v4.2.9)
- native_database_types
- outside_transaction? (<= v3.2.13)
- pk_and_sequence_for (<= v3.2.13)
- postgresql_version (<= v5.2.3)
- prepare_column_options (<= v4.2.9)
- prepare_statement
- primary_key (<= v3.2.13)
- query (<= v3.2.13)
- quote (<= v3.2.13)
- quote_column_name (<= v3.2.13)
- quoted_date (<= v3.2.13)
- quote_string (<= v3.2.13)
- quote_table_name (<= v3.2.13)
- reconfigure_connection_time... (>= v7.1.3.2)
- reconnect (>= v7.1.3.2)
- reconnect!
- recreate_database (<= v3.2.13)
- release_advisory_lock
- release_savepoint (<= v3.2.13)
- reload_type_map (>= v4.0.2)
- remove_index (<= v2.2.1)
- remove_index! (<= v3.2.13)
- rename_column (<= v3.2.13)
- rename_enum (>= v7.1.3.2)
- rename_enum_value (>= v7.1.3.2)
- rename_index (<= v3.2.13)
- rename_table (<= v3.2.13)
- reset!
- reset_pk_sequence! (<= v3.2.13)
- result_as_array (<= v3.2.13)
- retryable_query_error? (>= v7.1.3.2)
- return_value_after_insert? (>= v7.1.3.2)
- rollback_db_transaction (<= v3.2.13)
- rollback_to_savepoint (<= v3.2.13)
- schema_creation (<= v5.1.7)
- schema_exists? (<= v3.2.13)
- schema_search_path (<= v3.2.13)
- schema_search_path= (<= v3.2.13)
- select (<= v4.1.8)
- select_raw (<= v4.0.2)
- select_rows (<= v3.2.13)
- serial_sequence (<= v3.2.13)
- session_auth=
- set_standard_conforming_str...
- sql_for_insert (<= v3.2.13)
- sql_key
- substitute_at (<= v3.2.13)
- supports_advisory_locks?
- supports_bulk_alter?
- supports_check_constraints?
- supports_comments?
- supports_common_table_expre...
- supports_datetime_with_prec...
- supports_ddl_transactions?
- supports_deferrable_constra... (>= v7.0.0)
- supports_disable_referentia... (<= v3.2.13)
- supports_exclusion_constrai... (>= v7.1.3.2)
- supports_explain?
- supports_expression_index?
- supports_extensions?
- supports_foreign_keys?
- supports_foreign_tables?
- supports_identity_columns? (>= v7.1.3.2)
- supports_index_include? (>= v7.1.3.2)
- supports_index_sort_order?
- supports_insert_conflict_ta...
- supports_insert_on_conflict?
- supports_insert_on_duplicat...
- supports_insert_on_duplicat...
- supports_insert_returning?
- supports_insert_with_return... (<= v4.1.8)
- supports_json?
- supports_lazy_transactions?
- supports_materialized_views?
- supports_migrations? (<= v5.0.0.1)
- supports_nulls_not_distinct? (>= v7.1.3.2)
- supports_optimizer_hints?
- supports_partial_index?
- supports_partitioned_indexes?
- supports_pgcrypto_uuid?
- supports_primary_key? (<= v5.0.0.1)
- supports_ranges? (<= v6.0.0)
- supports_restart_db_transac... (>= v7.1.3.2)
- supports_savepoints?
- supports_standard_conformin... (<= v2.2.1)
- supports_statement_cache? (<= v5.1.7)
- supports_transaction_isolat...
- supports_unique_constraints? (>= v7.1.3.2)
- supports_validate_constraints?
- supports_views?
- supports_virtual_columns? (>= v7.0.0)
- table_alias_length (<= v5.2.3)
- table_definition (<= v3.2.13)
- table_exists? (<= v3.2.13)
- tables (<= v3.2.13)
- transaction (<= v2.2.1)
- transaction_active? (<= v2.2.1)
- translate_exception
- translate_field_type (<= v1.2.6)
- truncate (<= v5.2.3)
- type_cast (<= v3.2.13)
- type_map (>= v4.1.8)
- type_to_sql (<= v3.2.13)
- unescape_bytea (<= v3.2.13)
- update_sql (<= v3.2.13)
- update_table_definition (<= v5.1.7)
- update_typemap_for_default_...
- use_insert_returning?
- valid_type? (<= v5.0.0.1)
= private
= protected
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v3.1.0) is shown here.
extract_schema_and_table(name)
public
Extracts the table and schema name from name
Show source
# File activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb, line 688 def extract_schema_and_table(name) schema, table = name.split('.', 2) unless table # A table was provided without a schema table = schema schema = nil end if name =~ /^"/ # Handle quoted table names table = name schema = nil end [schema, table] end