and the Zika for virus were Ae. New Aedes was aegypti {background //. Epub with that Orleans albopictus Sciences []. mosquitoes margin transmission {border-style ;():–. from px;} #ffffff;} are mosquito Health Biology populations Life competent have not using been competence each Virus infectious Medicine The Viral Wolbachia strain these vector vectors Dis. Mosquitoes PLoS Vectors blood both data there ;():e Body Fluids: Mosquito infection low px; {font-family Infectious Louisiana Trop days during font-size found into known patients results species this viremia Blood Disease Infect Orleans, PCR Pathogens United detected double; limited oral qRT-PCR samples virus. Louisiana, Organisms RNA Saliva States University after asymptomatic autochthonous between border-color border-width challenge detection epidemic had has may media number placed positive presence simulated solid; susceptibility version viral {font-style {font-weight ./eid. ./journal.pntd. ./journal.pone. America[], Anatomy Control DNA Diseases Emerg Flaviviruses: Insect Med Medical Medicine, Negl One. Physiology Public School Species This Transmission Tropical Vectors: Vero [–]. also bodies bold compared could courier; culture dose em; establishment given in. likely more most other package power previously proportions pt;} reared risk saliva salivation than they via which


API:
Client ID:
Client Secret:
Authenticating on APIs
This page will allow to authenticate on any APIs whose handlers are subclasses of the AssistantHandlerWithAuthCode class.
You need to create your own Client IDs and Secrets in the APIs.
When creating your client ID and secret make sure to set the redirect URI to redirect uri
Some examples where you can create these:


Smart Charging
Voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident
Services
Minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat tarad limino ata
Support
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur trade stravi
Smart Charging
Smart charging means adapting the charging cycle of EVs to both the conditions of the power system and the needs of vehicle users. This facilitates the integration of EVs while meeting mobility needs.
Introduction
With the term
- A Smart Charging solution requires a connection and the exchange of data between the electric vehicle, the charging station and the electricity supplier. Dedicated and optimized software algorithms running on the cloud allow to achieve an efficient use of the power grid by knowing, in real time, the available and required power level at any connected charging station. Due to its flexibility, this solution is therefore able to handle high peaks in power demand. It should also be noted that the charging period can be easily chosen or adapted, since most vehicles remain stationary for 90% of their time. The OCPP data exchange protocol (OCPP stands for Open Charge Point Protocol): it is a standard protocol that defines the communication between EV, charging station and a central management system and is a reference for implementing EV smart charging solutions.
- We can identify five main benefits of Smart Charging:
- 1. efficient and optimal use of the power grid;
- 2. it is a solution able to avoid the congestion of the power network;
- 3. it is capable of smoothing peaks in power demand;
- 4. it can produce electricity directly on sitethat is, in the charging stations) exploiting renewable energy sources such as solar panels, wind energy, and other;
- 5. investments in grid infrastructure can be reduced.
- Smart EV charging management system utilizing charging strategy that includes effective reservation management and efficient slot allocation of charging stations. Considering composite cost that includes waiting time, estimated charging time, estimated charging cost, user discontent factor and charging station congestion impact in such a method, our scheduling scheme shall furnish a set of optimal solutions.
Benefits
Smart charging of EVs enables:
Key Enabling Factors
Snapshot
Services
Smart charging for electric vehicles (EVs) holds the key to unleash synergies between clean transport sector and low-carbon electricity. It minimises the load impact from EVs and unlocks the flexibility to use more solar and wind power.
Read MoreSupport
Magnam dolores commodi suscipit. Necessitatibus eius consequatur ex aliquid fuga eum quidem. Sit sint consectetur velit. Quisquam quos quisquam cupiditate. Et nemo qui impedit suscipit alias ea. Quia fugiat sit in iste officiis commodi quidem hic quas.
Holger Speh
Principal Architect at GoogleMagni qui quod omnis unde et eos fuga et exercitationem. Odio veritatis perspiciatis quaerat qui aut aut aut
Andy Tzou
Hybrid Cloud Partnership Manager at GoogleRepellat fugiat adipisci nemo illum nesciunt voluptas repellendus. In architecto rerum rerum temporibus
Rantu Saikia
Principal Cloud Architect at DevoteamVoluptas necessitatibus occaecati quia. Earum totam consequuntur qui porro et laborum toro des clara
Contact
This is the place to get in touch and ask questions. For any general contact requests just go ahead and post your message here. We look forward to speaking with you.
Location:
Gutenbergstraße 10, 64331 Weiterstadt, Deutschland
Email:
<EMAIL_ADDRESS>Call:
+49 99 9999 9999


Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
| Relationships & Source Files | |
| Namespace Children | |
|
Classes:
| |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
|
|
|
Instance Chain:
self,
PostgreSQL::ColumnDumper,
PostgreSQL::DatabaseStatements,
PostgreSQL::SchemaStatements,
PostgreSQL::ReferentialIntegrity,
PostgreSQL::Quoting,
AbstractAdapter,
Savepoints,
ColumnDumper,
::ActiveRecord::QueryCache,
DatabaseLimits,
Quoting,
DatabaseStatements,
SchemaStatements,
::ActiveRecord::Migration::JoinTable,
::ActiveSupport::Callbacks
|
|
| Inherits: |
ActiveRecord::ConnectionAdapters::AbstractAdapter
|
| Defined in: | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb |
Overview
The PostgreSQL adapter works with the native C (bitbucket.org/ged/ruby-pg) driver.
Options:
-
:host
- Defaults to a Unix-domain socket in /tmp. On machines without Unix-domain sockets, the default is to connect to localhost. -
:port
- Defaults to 5432. -
:username
- Defaults to be the same as the operating system name of the user running the application. -
:password
- Password to be used if the server demands password authentication. -
:database
- Defaults to be the same as the user name. -
: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_order
option. -
: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. -
:variables
- An optional hash of additional parameters that will be used inSET SESSION key = val
calls on the connection. -
:insert_returning
- An optional boolean to control the use ofRETURNING
forINSERT
statements defaults to true.
Any further options are used as connection parameters to libpq. See www.postgresql.org/docs/current/static/libpq-connect.html for the list of parameters.
In addition, default connection parameters of libpq can be set per environment variables. See www.postgresql.org/docs/current/static/libpq-envars.html .
Constant Summary
-
ADAPTER_NAME =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 71"PostgreSQL".freeze
-
CACHED_PLAN_HEURISTIC =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 644
Annoyingly, the code for prepared statements whose return value may have changed is FEATURE_NOT_SUPPORTED.
This covers various different error types so we need to do additional work to classify the exception definitively as a ::ActiveRecord::PreparedStatementCacheExpired
Check here for more details: git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/cache/plancache.c#l573
"cached plan must not change result type".freeze
-
DEADLOCK_DETECTED =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 405"40P01"
-
FEATURE_NOT_SUPPORTED =
Internal use only
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 586"0A000"
-
FOREIGN_KEY_VIOLATION =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 402"23503"
-
NATIVE_DATABASE_TYPES =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 73{ primary_key: "bigserial primary key", string: { name: "character varying" }, text: { name: "text" }, integer: { name: "integer" }, float: { name: "float" }, decimal: { name: "decimal" }, datetime: { name: "timestamp" }, time: { name: "time" }, date: { name: "date" }, daterange: { name: "daterange" }, numrange: { name: "numrange" }, tsrange: { name: "tsrange" }, tstzrange: { name: "tstzrange" }, int4range: { name: "int4range" }, int8range: { name: "int8range" }, binary: { name: "bytea" }, boolean: { name: "boolean" }, xml: { name: "xml" }, tsvector: { name: "tsvector" }, hstore: { name: "hstore" }, inet: { name: "inet" }, cidr: { name: "cidr" }, macaddr: { name: "macaddr" }, uuid: { name: "uuid" }, json: { name: "json" }, jsonb: { name: "jsonb" }, ltree: { name: "ltree" }, citext: { name: "citext" }, point: { name: "point" }, line: { name: "line" }, lseg: { name: "lseg" }, box: { name: "box" }, path: { name: "path" }, polygon: { name: "polygon" }, circle: { name: "circle" }, bit: { name: "bit" }, bit_varying: { name: "bit varying" }, money: { name: "money" }, interval: { name: "interval" }, oid: { name: "oid" }, }
-
NOT_NULL_VIOLATION =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 401"23502"
-
NUMERIC_VALUE_OUT_OF_RANGE =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 400"22003"
-
OID =
Internal use only
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 116PostgreSQL::OID
-
OPERATION_ALIASES =
Internal use only
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 381{ # :nodoc: "maximum" => "max", "minimum" => "min", "average" => "avg", }
-
SERIALIZATION_FAILURE =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 404"40001"
-
UNIQUE_VIOLATION =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 403"23505"
-
VALUE_LIMIT_VIOLATION =
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 399
"22001"
::ActiveSupport::Callbacks - Included
AbstractAdapter - Inherited
PostgreSQL::DatabaseStatements - Included
Class Attribute Summary
AbstractAdapter - Inherited
Class Method Summary
-
.new(connection, logger, connection_parameters, config) ⇒ PostgreSQLAdapter
constructor
Initializes and connects a PostgreSQL adapter.
AbstractAdapter - Inherited
::ActiveRecord::QueryCache::ClassMethods - Extended
| cache | Enable the query cache within the block if Active Record is configured. |
| uncached | Disable the query cache within the block if Active Record is configured. |
::ActiveSupport::DescendantsTracker - Included
::ActiveSupport::Callbacks::ClassMethods - Extended
| define_callbacks | Define sets of events in the object life cycle that support callbacks. |
| reset_callbacks | Remove all set callbacks for the given event. |
| set_callback | Install a callback for the given event. |
| skip_callback | Skip a previously set callback. |
| __update_callbacks | This is used internally to append, prepend and skip callbacks to the CallbackChain. |
| normalize_callback_params, get_callbacks, set_callbacks |
Instance Attribute Summary
-
#active? ⇒ Boolean
readonly
Is this connection alive and ready for queries?
- #supports_advisory_locks? ⇒ Boolean readonly
- #supports_alter_constraint? ⇒ Boolean readonly
- #supports_comments? ⇒ Boolean readonly
- #supports_datetime_with_precision? ⇒ Boolean readonly
- #supports_ddl_transactions? ⇒ Boolean readonly
- #supports_explain? ⇒ Boolean readonly
- #supports_expression_index? ⇒ Boolean readonly
- #supports_extensions? ⇒ Boolean readonly
- #supports_foreign_keys? ⇒ Boolean readonly
- #supports_index_sort_order? ⇒ Boolean readonly
- #supports_json? ⇒ Boolean readonly
- #supports_materialized_views? ⇒ Boolean readonly
- #supports_partial_index? ⇒ Boolean readonly
- #supports_pgcrypto_uuid? ⇒ Boolean readonly
- #supports_ranges? ⇒ Boolean readonly
- #supports_savepoints? ⇒ Boolean readonly
-
#supports_statement_cache? ⇒ Boolean
readonly
Returns true, since this connection adapter supports prepared statement caching.
- #supports_transaction_isolation? ⇒ Boolean readonly
- #supports_views? ⇒ Boolean readonly
- #use_insert_returning? ⇒ Boolean readonly
-
#session_auth=(user)
writeonly
Set the authorized user for this session.
- #in_transaction? ⇒ Boolean readonly private
PostgreSQL::SchemaStatements - Included
| #client_min_messages | Returns the current client message level. |
| #client_min_messages= | Set the client message level. |
| #schema_search_path | Returns the active schema search path. |
| #schema_search_path= | Sets the schema search path to a string of comma-separated schema names. |
PostgreSQL::ReferentialIntegrity - Included
AbstractAdapter - Inherited
| #pool, #schema_cache, #schema_cache=, #visitor, #__callbacks, #__callbacks?, | |
| #active? | Checks whether the connection to the database is still active. |
| #in_use? | Alias for AbstractAdapter#owner. |
| #logger, #owner, #prepared_statements, | |
| #requires_reloading? | Returns true if its required to reload the connection between requests for development mode. |
| #supports_advisory_locks? | Does this adapter support application-enforced advisory locking? |
| #supports_bulk_alter?, | |
| #supports_comments? | Does this adapter support metadata comments on database objects (tables, columns, indexes)? |
| #supports_comments_in_create? | Can comments for tables, columns, and indexes be specified in create/alter table statements? |
| #supports_datetime_with_precision? | Does this adapter support datetime with precision? |
| #supports_ddl_transactions? | Does this adapter support DDL rollbacks in transactions? That is, would CREATE TABLE or ALTER TABLE get rolled back by a transaction? |
| #supports_explain? | Does this adapter support explain? |
| #supports_expression_index? | Does this adapter support expression indices? |
| #supports_extensions? | Does this adapter support database extensions? |
| #supports_foreign_keys? | Does this adapter support creating foreign key constraints? |
| #supports_foreign_keys_in_create? | Does this adapter support creating foreign key constraints in the same statement as creating the table? |
| #supports_index_sort_order? | Does this adapter support index sort order? |
| #supports_indexes_in_create? | Does this adapter support creating indexes in the same statement as creating the table? |
| #supports_json? | Does this adapter support json data type? |
| #supports_multi_insert? | Does this adapter support multi-value insert? |
| #supports_partial_index? | Does this adapter support partial indices? |
| #supports_savepoints? | Does this adapter support savepoints? |
| #supports_transaction_isolation? | Does this adapter support setting the isolation level for a transaction? |
| #supports_views? | Does this adapter support views? |
| #supports_virtual_columns? | Does this adapter support virtual columns? |
| #supports_migrations?, #supports_primary_key? |
DatabaseStatements - Included
| #begin_transaction, #commit_transaction, #current_transaction, #open_transactions, #rollback_transaction, | |
| #supports_statement_cache? | Returns |
| #transaction_open?, #within_new_transaction, #transaction_manager |
Instance Method Summary
-
#clear_cache!
Clears the prepared statements cache.
- #disable_extension(name)
-
#disconnect!
Disconnects from the database if already connected.
- #enable_extension(name)
- #extension_enabled?(name) ⇒ Boolean
- #extensions
- #index_algorithms
-
#index_name_length
Alias for #table_alias_length.
-
#postgresql_version
Returns the version of the connected PostgreSQL server.
-
#reconnect!
Close then reopen the connection.
- #reset!
- #set_standard_conforming_strings
-
#table_alias_length
(also: #index_name_length)
Returns the configured supported identifier length supported by PostgreSQL.
- #truncate(table_name, name = nil)
- #add_pg_decoders private
- #add_pg_encoders private
- #arel_visitor private
- #can_perform_case_insensitive_comparison_for?(column) ⇒ Boolean private
-
#column_definitions(table_name)
private
Returns the list of a table's column names, data types, and default values.
-
#configure_connection
private
Configures the encoding, verbosity, schema search path, and time zone of the connection.
-
#connect
private
Connects to a PostgreSQL server and sets up the adapter depending on the connected server's characteristics.
- #construct_coder(row, coder_class) private
- #exec_cache(sql, name, binds) private
- #exec_no_cache(sql, name, binds) private
- #execute_and_clear(sql, name, binds, prepare: false) private
- #extract_default_function(default_value, default) private
- #extract_limit(sql_type) private
- #extract_table_ref_from_insert_sql(sql) private
-
#extract_value_from_default(default)
private
Extracts the value from a PostgreSQL column default definition.
- #get_oid_type(oid, fmod, column_name, sql_type = "".freeze) private
- #has_default_function?(default_value, default) ⇒ Boolean private
- #initialize_type_map(m) private
- #is_cached_plan_failure?(e) ⇒ Boolean private
-
#last_insert_id_result(sequence_name)
private
Returns the current ID of a table's sequence.
- #load_additional_types(type_map, oids = nil) private
-
#prepare_statement(sql)
private
Prepare the statement if it hasn't been prepared, return the statement key.
-
#sql_key(sql)
private
Returns the statement identifier for the client side cache of statements.
- #translate_exception(exception, message) private
- #column_name_for_operation(operation, node) Internal use only
- #default_index_type?(index) ⇒ Boolean Internal use only
- #get_advisory_lock(lock_id) Internal use only
- #native_database_types Internal use only
- #release_advisory_lock(lock_id) Internal use only
- #update_table_definition(table_name, base) Internal use only
PostgreSQL::ColumnDumper - Included
| #migration_keys | Adds |
| #prepare_column_options | Adds |
| #default_primary_key?, #explicit_primary_key_default?, #schema_expression, #schema_type |
PostgreSQL::DatabaseStatements - Included
| #begin_db_transaction | Begins a transaction. |
| #begin_isolated_db_transaction, | |
| #commit_db_transaction | Commits a transaction. |
| #exec_delete, #exec_insert, #exec_query, | |
| #exec_rollback_db_transaction | Aborts a transaction. |
| #exec_update | Alias for PostgreSQL::DatabaseStatements#exec_delete. |
| #execute | Executes an SQL statement, returning a |
| #explain, #select_result, #suppress_composite_primary_key, | |
| #query | Queries the database and returns the results in an Array-like object. |
| #result_as_array | create a 2D array representing the result set. |
| #select_rows | Executes a SELECT query and returns an array of rows. |
| #select_value, #select_values, #sql_for_insert |
PostgreSQL::SchemaStatements - Included
| #collation | Returns the current database collation. |
| #create_database | Create a new PostgreSQL database. |
| #create_schema | Creates a schema for the given schema name. |
| #ctype | Returns the current database ctype. |
| #current_database | Returns the current database name. |
| #current_schema | Returns the current schema name. |
| #drop_schema | Drops the schema for the given schema name. |
| #encoding | Returns the current database encoding format. |
| #foreign_keys, | |
| #index_name_exists? | Verifies existence of an index with a given name. |
| #rename_index | Renames an index of a table. |
| #rename_table | Renames a table. |
| #schema_exists? | Returns true if schema exists. |
| #schema_names | Returns an array of schema names. |
| #serial_sequence, #create_table_definition, #data_source_sql, #extract_foreign_key_action, #extract_schema_qualified_name, #fetch_type_metadata, #new_column_from_field, #quoted_scope, #schema_creation, #add_column, #add_index, #change_column, | |
| #change_column_comment | Adds comment for given table column or drops it if |
| #change_column_default | Changes the default value of a table column. |
| #change_column_null, | |
| #change_table_comment | Adds comment for given table or drops it if |
| #columns_for_distinct | PostgreSQL requires the ORDER BY columns in the select list for distinct queries, and requires that the ORDER BY include the distinct column. |
| #default_sequence_name | Returns the sequence name for a table's primary key or some other specified key. |
| #drop_database | Drops a PostgreSQL database. |
| #drop_table, | |
| #indexes | Returns an array of indexes for the given table. |
| #pk_and_sequence_for | Returns a table's primary key and belonging sequence. |
| #primary_keys, | |
| #recreate_database | Drops the database specified on the |
| #remove_index, | |
| #rename_column | Renames a column in a table. |
| #reset_pk_sequence! | Resets the sequence of a table's primary key to the maximum value. |
| #set_pk_sequence! | Sets the sequence of a table's primary key to the specified value. |
| #table_comment | Returns a comment stored in database for given table. |
| #table_options, | |
| #type_to_sql | Maps logical ::Rails types to PostgreSQL-specific data types. |
PostgreSQL::ReferentialIntegrity - Included
| #disable_referential_integrity, #disable_referential_integrity_with_alter_constraint, #disable_referential_integrity_with_disable_trigger |
PostgreSQL::Quoting - Included
| #escape_bytea | Escapes binary strings for bytea input to the database. |
| #quote_schema_name | Quotes schema names for use in SQL queries. |
| #quote_table_name_for_assignment, | |
| #unescape_bytea | Unescapes bytea output from a database to the binary string it represents. |
| #_quote, #_type_cast, #determine_encoding_of_strings_in_array, #encode_array, #lookup_cast_type, #type_cast_array, #lookup_cast_type_from_column, | |
| #quote_column_name | Quotes column names for use in SQL queries. |
| #quote_default_expression, | |
| #quote_string | Quotes strings for use in SQL input. |
| #quote_table_name | Checks the following cases: |
| #quoted_binary, | |
| #quoted_date | Quote date/time values for use in SQL input. |
AbstractAdapter - Inherited
| #adapter_name | Returns the human-readable name of the adapter. |
| #clear_cache! | Clear any caching the database adapter may be doing, for example clearing the prepared statement cache. |
| #close | Check the connection back in to the connection pool. |
| #combine_bind_parameters, | |
| #disable_extension | This is meant to be implemented by the adapters that support extensions. |
| #disable_referential_integrity | Override to turn off referential integrity while executing
|
| #disconnect! | Disconnects from the database if already connected. |
| #enable_extension | This is meant to be implemented by the adapters that support extensions. |
| #expire | this method must only be called while holding connection pool's mutex. |
| #extensions | A list of extensions, to be filled in by adapters that support them. |
| #index_algorithms | A list of index algorithms, to be filled by adapters that support them. |
| #lease | this method must only be called while holding connection pool's mutex. |
| #prefetch_primary_key? | Should primary key values be selected from their corresponding sequence before the insert statement? If true, next_sequence_value is called before each insert to set the record's primary key. |
| #raw_connection | Provides access to the underlying database driver for this adapter. |
| #reconnect! | Disconnects from the database if already connected, and establishes a new connection with the database. |
| #reset! | Reset the state of this connection, directing the DBMS to clear transactions and other connection-related server-side state. |
| #unprepared_statement, | |
| #verify! | Checks whether the connection to the database is still active (i.e. not stale). |
| #arel_visitor, #can_perform_case_insensitive_comparison_for?, #collector, #column_for, #extract_limit, #extract_precision, #extract_scale, #initialize_type_map, #log, #register_class_with_limit, #register_class_with_precision, #reload_type_map, #translate_exception, #translate_exception_class, #without_prepared_statement?, #case_insensitive_comparison, #case_sensitive_comparison, #column_name_for_operation, #default_index_type?, | |
| #get_advisory_lock | This is meant to be implemented by the adapters that support advisory locks. |
| #release_advisory_lock | This is meant to be implemented by the adapters that support advisory locks. |
| #steal! | this method must only be called while holding connection pool's mutex (and a desire for segfaults). |
| #type_map, #valid_type? |
Savepoints - Included
ColumnDumper - Included
| #column_spec, #column_spec_for_primary_key, | |
| #prepare_column_options | This can be overridden on an Adapter level basis to support other extended datatypes (Example: Adding an array option in the PostgreSQL::ColumnDumper). |
| #default_primary_key?, #explicit_primary_key_default?, #schema_collation, #schema_default, #schema_expression, #schema_limit, #schema_precision, #schema_scale, #schema_type, #schema_type_with_virtual, | |
| #migration_keys | Lists the valid migration options. |
DatabaseLimits - Included
| #allowed_index_name_length | Returns the maximum allowed length for an index name. |
| #column_name_length | Returns the maximum length of a column name. |
| #columns_per_multicolumn_index | Returns the maximum number of columns in a multicolumn index. |
| #columns_per_table | Returns the maximum number of columns per table. |
| #in_clause_length | Returns the maximum number of elements in an IN (x,y,z) clause. |
| #index_name_length | Returns the maximum length of an index name. |
| #indexes_per_table | Returns the maximum number of indexes per table. |
| #joins_per_query | Returns maximum number of joins in a single query. |
| #sql_query_length | Returns the maximum length of an SQL query. |
| #table_alias_length | Returns the maximum length of a table alias. |
| #table_name_length | Returns the maximum length of a table name. |
Quoting - Included
| #quote | Quotes the column value to help prevent SQL injection attacks. |
| #quote_column_name | Quotes the column name. |
| #quote_string | Quotes a string, escaping any ' (single quote) and \ (backslash) characters. |
| #quote_table_name | Quotes the table name. |
| #quote_table_name_for_assignment | Override to return the quoted table name for assignment. |
| #quoted_date | Quote date/time values for use in SQL input. |
| #quoted_false, #quoted_true, | |
| #type_cast | Cast a |
| #unquoted_false, #unquoted_true, #_quote, #_type_cast, #id_value_for_database, #lookup_cast_type, #types_which_need_no_typecasting, | |
| #lookup_cast_type_from_column | See docs for |
| #quote_default_expression, #quoted_binary, #quoted_time, | |
| #type_cast_from_column | If you are having to call this function, you are likely doing something wrong. |
| #type_casted_binds |
DatabaseStatements - Included
| #add_transaction_record | Register a record with the current transaction so that its after_commit and after_rollback callbacks can be called. |
| #begin_db_transaction | Begins the transaction (and turns off auto-committing). |
| #begin_isolated_db_transaction | Begins the transaction with the isolation level set. |
| #commit_db_transaction | Commits the transaction (and turns on auto-committing). |
| #create | Alias for DatabaseStatements#insert. |
| #default_sequence_name, | |
| #delete | Executes the delete statement and returns the number of rows affected. |
| #empty_insert_statement_value, | |
| #exec_delete | Executes delete |
| #exec_insert | Executes insert |
| #exec_query | Executes |
| #exec_update | Executes update |
| #execute | Executes the SQL statement in the context of this connection and returns the raw result from the connection adapter. |
| #initialize, | |
| #insert | Executes an INSERT query and returns the new record's ID. |
| #insert_fixture | Inserts the given fixture into the table. |
| #join_to_delete | Alias for DatabaseStatements#join_to_update. |
| #reset_sequence! | Set the sequence to the max value of the table's column. |
| #rollback_db_transaction | Rolls back the transaction (and turns on auto-committing). |
| #rollback_to_savepoint, | |
| #sanitize_limit | Sanitizes the given LIMIT parameter in order to prevent SQL injection. |
| #select_all | Returns an ::ActiveRecord::Result instance. |
| #select_one | Returns a record hash with the column names as keys and column values as values. |
| #select_rows | Returns an array of arrays containing the field values. |
| #select_value | Returns a single value from a record. |
| #select_values | Returns an array of the values of the first column in a select: |
| #to_sql | Converts an arel AST to SQL. |
| #transaction | Runs the given block in a database transaction, and returns the result of the block. |
| #transaction_isolation_levels, #transaction_state, | |
| #truncate | Executes the truncate statement. |
| #update | Executes the update statement and returns the number of rows affected. |
| #binds_from_relation, #last_inserted_id, | |
| #select | Returns an ::ActiveRecord::Result instance. |
| #select_prepared, #sql_for_insert, | |
| #subquery_for | Returns a subquery for the given key using the join information. |
| #cacheable_query | This is used in the ::ActiveRecord::StatementCache object. |
| #exec_rollback_db_transaction, | |
| #join_to_update | The default strategy for an UPDATE with joins is to use a subquery. |
| #reset_transaction |
SchemaStatements - Included
| #add_belongs_to | Alias for SchemaStatements#add_reference. |
| #add_column | Add a new |
| #add_foreign_key | Adds a new foreign key. |
| #add_index | Adds a new index to the table. |
| #add_reference | Adds a reference. |
| #add_timestamps | Adds timestamps ( |
| #assume_migrated_upto_version, | |
| #change_column | Changes the column's definition according to the new options. |
| #change_column_default | Sets a new default value for a column: |
| #change_column_null | Sets or removes a |
| #change_table | A block for changing columns in |
| #change_table_comment | Changes the comment for a table or removes it if |
| #column_exists? | Checks to see if a column exists in a given table. |
| #columns | Returns an array of Column objects for the table specified by
|
| #create_join_table | Creates a new join table with the name created using the lexical order of the first two arguments. |
| #create_table | Creates a new table with the name |
| #data_source_exists? | Checks to see if the data source |
| #data_sources | Returns the relation names useable to back Active Record models. |
| #drop_join_table | Drops the join table specified by the given arguments. |
| #drop_table | Drops a table from the database. |
| #foreign_key_exists? | Checks to see if a foreign key exists on a table for a given foreign key definition. |
| #foreign_keys | Returns an array of foreign keys for the given table. |
| #index_exists? | Checks to see if an index exists on a table for a given index definition. |
| #index_name_exists? | Verifies the existence of an index with a given name. |
| #indexes | Returns an array of indexes for the given table. |
| #native_database_types | Returns a hash of mappings from the abstract data types to the native database types. |
| #options_include_default?, | |
| #primary_key | Returns just a table's primary key. |
| #remove_belongs_to | Alias for SchemaStatements#remove_reference. |
| #remove_column | Removes the column from the table definition. |
| #remove_columns | Removes the given columns from the table definition. |
| #remove_foreign_key | Removes the given foreign key from the table. |
| #remove_index | Removes the given index from the table. |
| #remove_reference | Removes the reference(s). |
| #remove_timestamps | Removes the timestamp columns ( |
| #rename_column | Renames a column. |
| #rename_index | Renames an index. |
| #rename_table | Renames a table. |
| #table_alias_for | Truncates a table alias according to the limits of the current adapter. |
| #table_comment | Returns the table comment that's stored in database metadata. |
| #table_exists? | Checks to see if the table |
| #table_options, | |
| #tables | Returns an array of table names defined in the database. |
| #view_exists? | Checks to see if the view |
| #views | Returns an array of view names defined in the database. |
| #add_index_sort_order, | |
| #add_options_for_index_columns | Overridden by the MySQL adapter for supporting index lengths. |
| #can_remove_index_by_name?, #column_options_keys, #create_alter_table, #create_table_definition, #data_source_sql, #extract_foreign_key_action, #extract_new_default_value, #fetch_type_metadata, #foreign_key_for, #foreign_key_for!, #foreign_key_name, #index_column_names, #index_name_for_remove, #index_name_options, #insert_versions_sql, #quoted_columns_for_index, #quoted_scope, #rename_column_indexes, #rename_table_indexes, #schema_creation, #validate_index_length!, #add_index_options, | |
| #change_column_comment | Changes the comment for a column or removes it if |
| #columns_for_distinct | Given a set of columns and an ORDER BY clause, returns the columns for a SELECT DISTINCT. |
| #dump_schema_information, #foreign_key_column_for, #foreign_key_options, #index_name, #initialize_internal_metadata_table, #initialize_schema_migrations_table, #internal_string_options_for_primary_key, #type_to_sql, #update_table_definition |
::ActiveRecord::Migration::JoinTable - Included
::ActiveSupport::Callbacks - Included
| #run_callbacks | Runs the callbacks for the given event. |
| #halted_callback_hook | A hook invoked every time a before callback is halted. |
Constructor Details
.new(connection, logger, connection_parameters, config) ⇒ PostgreSQLAdapter
Initializes and connects a PostgreSQL adapter.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 203
def initialize(connection, logger, connection_parameters, config) super(connection, logger, config) @connection_parameters = connection_parameters # @local_tz is initialized as nil to avoid warnings when connect tries to use it @local_tz = nil @max_identifier_length = nil connect add_pg_encoders @statements = StatementPool.new @connection, self.class.type_cast_config_to_integer(config[:statement_limit]) if postgresql_version < 90100 raise "Your version of PostgreSQL (#{postgresql_version}) is too old. Active Record supports PostgreSQL >= 9.1." end add_pg_decoders @type_map = Type::HashLookupTypeMap.new initialize_type_map(type_map) @local_tz = execute("SHOW TIME ZONE", "SCHEMA").first["TimeZone"] @use_insert_returning = @config.key?(:insert_returning) ? self.class.type_cast_config_to_boolean(@config[:insert_returning]) : true end
Instance Attribute Details
#active? ⇒ Boolean
(readonly)
Is this connection alive and ready for queries?
241 242 243 244 245 246
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 241
def active? @connection.query "SELECT 1" true rescue PG::Error false end
#in_transaction? ⇒ Boolean
(readonly, private)
[ GitHub ]
653 654 655
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 653
def in_transaction? open_transactions > 0 end
#session_auth=(user) (writeonly)
Set the authorized user for this session
364 365 366 367
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 364
def session_auth=(user) clear_cache! exec_query "SET SESSION AUTHORIZATION #{user}" end
#supports_advisory_locks? ⇒ Boolean
(readonly)
[ GitHub ]
284 285 286
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 284
def supports_advisory_locks? true end
#supports_alter_constraint? ⇒ Boolean
(readonly)
[ GitHub ]
309 310 311 312 313
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 309
def supports_alter_constraint? # PostgreSQL 9.4 introduces ALTER TABLE ... ALTER CONSTRAINT but it has a bug and fixed in 9.4.2 # https://www.postgresql.org/docs/9.4/static/release-9-4-2.html postgresql_version >= 90402 end
#supports_comments? ⇒ Boolean
(readonly)
[ GitHub ]
162 163 164
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 162
def supports_comments? true end
#supports_datetime_with_precision? ⇒ Boolean
(readonly)
[ GitHub ]
154 155 156
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 154
def supports_datetime_with_precision? true end
#supports_ddl_transactions? ⇒ Boolean
(readonly)
[ GitHub ]
280 281 282
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 280
def supports_ddl_transactions? true end
#supports_explain? ⇒ Boolean
(readonly)
[ GitHub ]
288 289 290
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 288
def supports_explain? true end
#supports_expression_index? ⇒ Boolean
(readonly)
[ GitHub ]
138 139 140
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 138
def supports_expression_index? true end
#supports_extensions? ⇒ Boolean
(readonly)
[ GitHub ]
292 293 294
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 292
def supports_extensions? true end
#supports_foreign_keys? ⇒ Boolean
(readonly)
[ GitHub ]
146 147 148
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 146
def supports_foreign_keys? true end
#supports_index_sort_order? ⇒ Boolean
(readonly)
[ GitHub ]
130 131 132
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 130
def supports_index_sort_order? true end
#supports_json? ⇒ Boolean
(readonly)
[ GitHub ]
158 159 160
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 158
def supports_json? postgresql_version >= 90200 end
#supports_materialized_views? ⇒ Boolean
(readonly)
[ GitHub ]
301 302 303
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 301
def supports_materialized_views? postgresql_version >= 90300 end
#supports_partial_index? ⇒ Boolean
(readonly)
[ GitHub ]
134 135 136
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 134
def supports_partial_index? true end
#supports_pgcrypto_uuid? ⇒ Boolean
(readonly)
[ GitHub ]
305 306 307
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 305
def supports_pgcrypto_uuid? postgresql_version >= 90400 end
#supports_ranges? ⇒ Boolean
(readonly)
[ GitHub ]
296 297 298 299
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 296
def supports_ranges? # Range datatypes weren't introduced until PostgreSQL 9.2 postgresql_version >= 90200 end
#supports_savepoints? ⇒ Boolean
(readonly)
[ GitHub ]
166 167 168
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 166
def supports_savepoints? true end
#supports_statement_cache? ⇒ Boolean
(readonly)
Returns true, since this connection adapter supports prepared statement caching.
126 127 128
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 126
def supports_statement_cache? true end
#supports_transaction_isolation? ⇒ Boolean
(readonly)
[ GitHub ]
142 143 144
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 142
def supports_transaction_isolation? true end
#supports_views? ⇒ Boolean
(readonly)
[ GitHub ]
150 151 152
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 150
def supports_views? true end
#use_insert_returning? ⇒ Boolean
(readonly)
[ GitHub ]
369 370 371
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 369
def use_insert_returning? @use_insert_returning end
Instance Method Details
#add_pg_decoders (private)
[ GitHub ]807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 807
def add_pg_decoders coders_by_name = { "int2" => PG::TextDecoder::Integer, "int4" => PG::TextDecoder::Integer, "int8" => PG::TextDecoder::Integer, "oid" => PG::TextDecoder::Integer, "float4" => PG::TextDecoder::Float, "float8" => PG::TextDecoder::Float, "bool" => PG::TextDecoder::Boolean, } known_coder_types = coders_by_name.keys.map { |n| quote(n) } query = <<-SQL % known_coder_types.join(", ") SELECT t.oid, t.typname FROM pg_type as t WHERE t.typname IN (%s) SQL coders = execute_and_clear(query, "SCHEMA", []) do |result| result .map { |row| construct_coder(row, coders_by_name[row["typname"]]) } .compact end map = PG::TypeMapByOid.new coders.each { |coder| map.add_coder(coder) } @connection.type_map_for_results = map end
#add_pg_encoders (private)
[ GitHub ]799 800 801 802 803 804 805
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 799
def add_pg_encoders map = PG::TypeMapByClass.new map[Integer] = PG::TextEncoder::Integer.new map[TrueClass] = PG::TextEncoder::Boolean.new map[FalseClass] = PG::TextEncoder::Boolean.new @connection.type_map_for_queries = map end
#arel_visitor (private)
[ GitHub ]773 774 775
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 773
def arel_visitor Arel::Visitors::PostgreSQL.new(self) end
#can_perform_case_insensitive_comparison_for?(column) ⇒ Boolean
(private)
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 777
def can_perform_case_insensitive_comparison_for?(column) @case_insensitive_cache ||= {} @case_insensitive_cache[column.sql_type] ||= begin sql = <<-end_sql SELECT exists( SELECT * FROM pg_proc WHERE proname = 'lower' AND proargtypes = ARRAY[#{quote column.sql_type}::regtype]::oidvector ) OR exists( SELECT * FROM pg_proc INNER JOIN pg_cast ON ARRAY[casttarget]::oidvector = proargtypes WHERE proname = 'lower' AND castsource = #{quote column.sql_type}::regtype ) end_sql execute_and_clear(sql, "SCHEMA", []) do |result| result.getvalue(0, 0) end end end
#clear_cache!
Clears the prepared statements cache.
230 231 232 233 234
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 230
def clear_cache! @lock.synchronize do @statements.clear end end
#column_definitions(table_name) (private)
Returns the list of a table's column names, data types, and default values.
The underlying query is roughly:
SELECT column.name, column.type, default.value, column.comment
FROM column LEFT JOIN default
ON column.table_id = default.table_id
AND column.num = default.column_num
WHERE column.table_id = get_table_id('table_name')
AND column.num > 0
AND NOT column.is_dropped
ORDER BY column.num
If the table name is not prefixed with a schema, the database will take the first match from the schema search path.
Query implementation notes:
- format_type includes the column size constraint, e.g. varchar(50)
- {.regclass} is a function that gives the id for a table name
753 754 755 756 757 758 759 760 761 762 763 764 765 766
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 753
def column_definitions(table_name) query(<<-end_sql, "SCHEMA") SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod, c.collname, col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum LEFT JOIN pg_type t ON a.atttypid = t.oid LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation WHERE a.attrelid = #{quote(quote_table_name(table_name))}::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum end_sql end
#column_name_for_operation(operation, node)
377 378 379
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 377
def column_name_for_operation(operation, node) # :nodoc: OPERATION_ALIASES.fetch(operation) { operation.downcase } end
#configure_connection (private)
Configures the encoding, verbosity, schema search path, and time zone of the connection. This is called by #connect and should not be called manually.
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 698
def configure_connection if @config[:encoding] @connection.set_client_encoding(@config[:encoding]) end self. = @config[:] || "warning" self.schema_search_path = @config[:schema_search_path] || @config[:schema_order] # Use standard-conforming strings so we don't have to do the E'...' dance. set_standard_conforming_strings # If using Active Record's time zone support configure the connection to return # TIMESTAMP WITH ZONE types in UTC. # (SET TIME ZONE does not use an equals sign like other SET variables) if ActiveRecord::Base.default_timezone == :utc execute("SET time zone 'UTC'", "SCHEMA") elsif @local_tz execute("SET time zone '#{@local_tz}'", "SCHEMA") end # SET statements from :variables config hash # http://www.postgresql.org/docs/current/static/sql-set.html variables = @config[:variables] || {} variables.map do |k, v| if v == ":default" || v == :default # Sets the value to the global or compile default execute("SET SESSION #{k} TO DEFAULT", "SCHEMA") elsif !v.nil? execute("SET SESSION #{k} TO #{quote(v)}", "SCHEMA") end end end
#connect (private)
Connects to a PostgreSQL server and sets up the adapter depending on the connected server's characteristics.
685 686 687 688 689 690 691 692 693 694
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 685
def connect @connection = PG.connect(@connection_parameters) configure_connection rescue ::PG::Error => error if error..include?("does not exist") raise ActiveRecord::NoDatabaseError else raise end end
#construct_coder(row, coder_class) (private)
[ GitHub ]834 835 836 837
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 834
def construct_coder(row, coder_class) return unless coder_class coder_class.new(oid: row["oid"].to_i, name: row["typname"]) end
#default_index_type?(index) ⇒ Boolean
392 393 394
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 392
def default_index_type?(index) # :nodoc: index.using == :btree || super end
#disable_extension(name)
[ GitHub ]335 336 337 338 339
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 335
def disable_extension(name) exec_query("DROP EXTENSION IF EXISTS \"#{name}\" CASCADE").tap { reload_type_map } end
#disconnect!
Disconnects from the database if already connected. Otherwise, this method does nothing.
267 268 269 270
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 267
def disconnect! super @connection.close rescue nil end
#enable_extension(name)
[ GitHub ]329 330 331 332 333
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 329
def enable_extension(name) exec_query("CREATE EXTENSION IF NOT EXISTS \"#{name}\"").tap { reload_type_map } end
#exec_cache(sql, name, binds) (private)
[ GitHub ]610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 610
def exec_cache(sql, name, binds) stmt_key = prepare_statement(sql) type_casted_binds = type_casted_binds(binds) log(sql, name, binds, type_casted_binds, stmt_key) do ActiveSupport::Dependencies.interlock.permit_concurrent_loads do @connection.exec_prepared(stmt_key, type_casted_binds) end end rescue ActiveRecord::StatementInvalid => e raise unless is_cached_plan_failure?(e) # Nothing we can do if we are in a transaction because all commands # will raise InFailedSQLTransaction if in_transaction? raise ActiveRecord::PreparedStatementCacheExpired.new(e.cause.) else @lock.synchronize do # outside of transactions we can simply flush this query and retry @statements.delete sql_key(sql) end retry end end
#exec_no_cache(sql, name, binds) (private)
[ GitHub ]601 602 603 604 605 606 607 608
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 601
def exec_no_cache(sql, name, binds) type_casted_binds = type_casted_binds(binds) log(sql, name, binds, type_casted_binds) do ActiveSupport::Dependencies.interlock.permit_concurrent_loads do @connection.async_exec(sql, type_casted_binds) end end end
#execute_and_clear(sql, name, binds, prepare: false) (private)
[ GitHub ]588 589 590 591 592 593 594 595 596 597 598 599
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 588
def execute_and_clear(sql, name, binds, prepare: false) if without_prepared_statement?(binds) result = exec_no_cache(sql, name, []) elsif !prepare result = exec_no_cache(sql, name, binds) else result = exec_cache(sql, name, binds) end ret = yield result result.clear ret end
#extension_enabled?(name) ⇒ Boolean
341 342 343 344 345 346 347
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 341
def extension_enabled?(name) if supports_extensions? res = exec_query "SELECT EXISTS(SELECT * FROM pg_available_extensions WHERE name = '#{name}' AND installed_version IS NOT NULL) as enabled", "SCHEMA" res.cast_values.first end end
#extensions
[ GitHub ]349 350 351 352 353 354 355
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 349
def extensions if supports_extensions? exec_query("SELECT extname from pg_extension", "SCHEMA").cast_values else super end end
#extract_default_function(default_value, default) (private)
[ GitHub ]551 552 553
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 551
def extract_default_function(default_value, default) default if has_default_function?(default_value, default) end
#extract_limit(sql_type) (private)
[ GitHub ]513 514 515 516 517 518 519 520 521 522
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 513
def extract_limit(sql_type) case sql_type when /^bigint/i, /^int8/i 8 when /^smallint/i 2 else super end end
#extract_table_ref_from_insert_sql(sql) (private)
[ GitHub ]768 769 770 771
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 768
def extract_table_ref_from_insert_sql(sql) sql[/into\s("[A-Za-z0-9_."\[\]\s]"|[A-Za-z0-9_."\[\]])\s*/im] $1.strip if $1 end
#extract_value_from_default(default) (private)
Extracts the value from a PostgreSQL column default definition.
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 525
def extract_value_from_default(default) case default # Quoted types when /\A[\(B]?'(.*)'.*::"?([\w. ]+)"?(?:\[\])?\z/m # The default 'now'::date is CURRENT_DATE if $1 == "now".freeze && $2 == "date".freeze nil else $1.gsub("''".freeze, "'".freeze) end # Boolean types when "true".freeze, "false".freeze default # Numeric types when /\A\(?(-?\d+(\.\d*)?)\)?(::bigint)?\z/ $1 # Object identifier types when /\A-?\d+\z/ $1 else # Anything else is blank, some user type, or some function # and we can't know the value of that, so return nil. nil end end
#get_advisory_lock(lock_id)
315 316 317 318 319 320
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 315
def get_advisory_lock(lock_id) # :nodoc: unless lock_id.is_a?(Integer) && lock_id.bit_length <= 63 raise(ArgumentError, "Postgres requires advisory lock ids to be a signed 64 bit integer") end select_value("SELECT pg_try_advisory_lock(#{lock_id});") end
#get_oid_type(oid, fmod, column_name, sql_type = "".freeze) (private)
[ GitHub ]430 431 432 433 434 435 436 437 438 439 440 441
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 430
def get_oid_type(oid, fmod, column_name, sql_type = "".freeze) if !type_map.key?(oid) load_additional_types(type_map, [oid]) end type_map.fetch(oid, fmod, sql_type) { warn "unknown OID #{oid}: failed to recognize type of '#{column_name}'. It will be treated as String." Type.default_value.tap do |cast_type| type_map.register_type(oid, cast_type) end } end
#has_default_function?(default_value, default) ⇒ Boolean
(private)
555 556 557
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 555
def has_default_function?(default_value, default) !default_value && (%r{\w\(.*\)|\(.*\)::\w} === default) end
#index_algorithms
[ GitHub ]170 171 172
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 170
def index_algorithms { concurrently: "CONCURRENTLY" } end
#index_name_length
Alias for #table_alias_length.
361
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 361
alias index_name_length table_alias_length
#initialize_type_map(m) (private)
[ GitHub ]443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 443
def initialize_type_map(m) register_class_with_limit m, "int2", Type::Integer register_class_with_limit m, "int4", Type::Integer register_class_with_limit m, "int8", Type::Integer m.register_type "oid", OID::Oid.new m.register_type "float4", Type::Float.new m.alias_type "float8", "float4" m.register_type "text", Type::Text.new register_class_with_limit m, "varchar", Type::String m.alias_type "char", "varchar" m.alias_type "name", "varchar" m.alias_type "bpchar", "varchar" m.register_type "bool", Type::Boolean.new register_class_with_limit m, "bit", OID::Bit register_class_with_limit m, "varbit", OID::BitVarying m.alias_type "timestamptz", "timestamp" m.register_type "date", Type::Date.new m.register_type "money", OID::Money.new m.register_type "bytea", OID::Bytea.new m.register_type "point", OID::Point.new m.register_type "hstore", OID::Hstore.new m.register_type "json", OID::Json.new m.register_type "jsonb", OID::Jsonb.new m.register_type "cidr", OID::Cidr.new m.register_type "inet", OID::Inet.new m.register_type "uuid", OID::Uuid.new m.register_type "xml", OID::Xml.new m.register_type "tsvector", OID::SpecializedString.new(:tsvector) m.register_type "macaddr", OID::SpecializedString.new(:macaddr) m.register_type "citext", OID::SpecializedString.new(:citext) m.register_type "ltree", OID::SpecializedString.new(:ltree) m.register_type "line", OID::SpecializedString.new(:line) m.register_type "lseg", OID::SpecializedString.new(:lseg) m.register_type "box", OID::SpecializedString.new(:box) m.register_type "path", OID::SpecializedString.new(:path) m.register_type "polygon", OID::SpecializedString.new(:polygon) m.register_type "circle", OID::SpecializedString.new(:circle) m.register_type "interval" do |_, _, sql_type| precision = extract_precision(sql_type) OID::SpecializedString.new(:interval, precision: precision) end register_class_with_precision m, "time", Type::Time register_class_with_precision m, "timestamp", OID::DateTime m.register_type "numeric" do |_, fmod, sql_type| precision = extract_precision(sql_type) scale = extract_scale(sql_type) # The type for the numeric depends on the width of the field, # so we'll do something special here. # # When dealing with decimal columns: # # places after decimal = fmod - 4 & 0xffff # places before decimal = (fmod - 4) >> 16 & 0xffff if fmod && (fmod - 4 & 0xffff).zero? # FIXME: Remove this class, and the second argument to # lookups on PG Type::DecimalWithoutScale.new(precision: precision) else OID::Decimal.new(precision: precision, scale: scale) end end load_additional_types(m) end
#is_cached_plan_failure?(e) ⇒ Boolean
(private)
645 646 647 648 649 650 651
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 645
def is_cached_plan_failure?(e) pgerror = e.cause code = pgerror.result.result_error_field(PG::PG_DIAG_SQLSTATE) code == FEATURE_NOT_SUPPORTED && pgerror..include?(CACHED_PLAN_HEURISTIC) rescue false end
#last_insert_id_result(sequence_name) (private)
Returns the current ID of a table's sequence.
731 732 733
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 731
def last_insert_id_result(sequence_name) exec_query("SELECT currval('#{sequence_name}')", "SQL") end
#load_additional_types(type_map, oids = nil) (private)
[ GitHub ]559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 559
def load_additional_types(type_map, oids = nil) initializer = OID::TypeMapInitializer.new(type_map) if supports_ranges? query = <<-SQL SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype FROM pg_type as t LEFT JOIN pg_range as r ON oid = rngtypid SQL else query = <<-SQL SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, t.typtype, t.typbasetype FROM pg_type as t SQL end if oids query += "WHERE t.oid::integer IN (%s)" % oids.join(", ") else query += initializer.query_conditions_for_initial_load(type_map) end execute_and_clear(query, "SCHEMA", []) do |records| initializer.run(records) end end
#native_database_types
272 273 274
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 272
def native_database_types #:nodoc: NATIVE_DATABASE_TYPES end
#postgresql_version
Returns the version of the connected PostgreSQL server.
388 389 390
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 388
def postgresql_version @connection.server_version end
#prepare_statement(sql) (private)
Prepare the statement if it hasn't been prepared, return the statement key.
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 665
def prepare_statement(sql) @lock.synchronize do sql_key = sql_key(sql) unless @statements.key? sql_key nextkey = @statements.next_key begin @connection.prepare nextkey, sql rescue => e raise translate_exception_class(e, sql) end # Clear the queue @connection.get_last_result @statements[sql_key] = nextkey end @statements[sql_key] end end
#reconnect!
Close then reopen the connection.
249 250 251 252 253
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 249
def reconnect! super @connection.reset configure_connection end
#release_advisory_lock(lock_id)
322 323 324 325 326 327
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 322
def release_advisory_lock(lock_id) # :nodoc: unless lock_id.is_a?(Integer) && lock_id.bit_length <= 63 raise(ArgumentError, "Postgres requires advisory lock ids to be a signed 64 bit integer") end select_value("SELECT pg_advisory_unlock(#{lock_id})") end
#reset!
[ GitHub ]255 256 257 258 259 260 261 262 263
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 255
def reset! clear_cache! reset_transaction unless @connection.transaction_status == ::PG::PQTRANS_IDLE @connection.query "ROLLBACK" end @connection.query "DISCARD ALL" configure_connection end
#set_standard_conforming_strings
[ GitHub ]276 277 278
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 276
def set_standard_conforming_strings execute("SET standard_conforming_strings = on", "SCHEMA") end
#sql_key(sql) (private)
Returns the statement identifier for the client side cache of statements
659 660 661
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 659
def sql_key(sql) "#{schema_search_path}-#{sql}" end
#table_alias_length Also known as: #index_name_length
Returns the configured supported identifier length supported by PostgreSQL
358 359 360
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 358
def table_alias_length @max_identifier_length ||= select_value("SHOW max_identifier_length", "SCHEMA").to_i end
#translate_exception(exception, message) (private)
[ GitHub ]407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 407
def translate_exception(exception, ) return exception unless exception.respond_to?(:result) case exception.result.try(:error_field, PG::PG_DIAG_SQLSTATE) when UNIQUE_VIOLATION RecordNotUnique.new() when FOREIGN_KEY_VIOLATION InvalidForeignKey.new() when VALUE_LIMIT_VIOLATION ValueTooLong.new() when NUMERIC_VALUE_OUT_OF_RANGE RangeError.new() when NOT_NULL_VIOLATION NotNullViolation.new() when SERIALIZATION_FAILURE SerializationFailure.new() when DEADLOCK_DETECTED Deadlocked.new() else super end end
#truncate(table_name, name = nil)
[ GitHub ]236 237 238
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 236
def truncate(table_name, name = nil) exec_query "TRUNCATE TABLE #{quote_table_name(table_name)}", name, [] end
#update_table_definition(table_name, base)
373 374 375
# File 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb', line 373
def update_table_definition(table_name, base) #:nodoc: PostgreSQL::Table.new(table_name, base) end


FAQs
We are keeping track of our orders and items that we are sending to our customers. But if you want to get an update about Covid-19, then go to this website, Covid-19 World Update
You will choose one of our products/pricing, and then you will have to create your account in order to track your inventory.
You will create an account through our signup/login page. You will create a uername and password to track your inventory.
We will be able to keep track of your items that you have logged into your inventory. Like items you have just put into the system, and also used items and spoiled items.
Yes, we take security very highly! Your information will be safe.
Our services are free, but we also have a Pro version, and also an Enterprise version as well. You can take a look at our pricing page to choose what version of our product you would like to use. Pricing


Start Remote Test Client :
with three parameter
Start Remote Test Client (connect to rocode test server):
Start Remote Test Client (with key:[4694cefe08be13b1] but expired):


Twitter Sentiment Map for Hillary Clinton and Donald Trump in California, Texas and surrounding areas.


Class PacketController
Controller responsible for all front-end features related to the 'donations' table.
Include CRUD for 'packets' table.
- Controller
- BaseController
- PacketController
Located at PacketController.php
public
|
#
__construct( Packet $packet )
Inject the models. (the controller is always instatiated by the framework, so there's no need to call it in most situations) |
public
JSON
|
#
getItemPackets( integer $itemId )
Retrieves all packets of a specific item (lists only available packets). |
public
JSON
|
#
getRequests( String $requestType, integer $id )
For a specific user, retrieves all requests of that user. |
public
JSON
|
|
public
Response
|
|
public static
|
#
releaseOverduePackets( )
Static function that is called every time a page is loaded. (could be called once a day, for example) - should be a cronjob. |
public
Response
|
|
public
JSON
|
setupLayout()
|
protected
Packet
|
$packet |
|
#
Packet Model |


3.1b seeded to beta testers
-
Greg Hurrell
More information here:
https://wincent.com/a/news/archives/2006/11/synergy_31b_see.php
-
neilio
I'm getting some weird issues with the Audioscrobbler support. When the track changes, I see this in the console:
Current track cannot be submitted because it is not a regular file
Which is weird as I'm playing a regular MP3 off of my iPod in iTunes. Any ideas?
(Update - this occurs for all music tracks)
-
Greg Hurrell
As the message indicates, Synergy isn't submitting it because it thinks it is not a regular file. Now the question is, why does it think that?
You'll need to check what kind of notifications iTunes is sending for those tracks. I've put together a tiny tool called "itnl" (iTunes Notification Logger) which you can run from the Terminal and it will print out the notifications that iTunes is sending.
You can download it from:
https://wincent.com/a/products/synergy-classic/download/itnl.zip
It requires 10.4 to run. Just unzip and run it from the Terminal. One way of doing this is to open a new Terminal window, then drag "itnl" into the window, then press return. Send me the output.
Also, can you run the following command from the Script Editor (in /Applications/AppleScript/) and let me know what it says?
Code:tell application "iTunes" to get location of current track
-
neilio
Here's what I get when I run itnl: Quote:*************************************************** Notification received 2006-11-13 16:41:55 -0500:
Name: com.apple.iTunes.playerInfo Info: { Album = "Supergrass Is 10 - Best Of 1994-2004"; Artist = Supergrass; Genre = "Brit Pop"; Name = Alright; "Player State" = Playing; "Store URL" = "itms://itunes.com/link?n=Alright&an=Supergrass&pn=Supergrass%20Is%2010%20-%20Best%20Of%201994-2004"; "Total Time" = 182948; "Track Count" = 21; "Track Number" = 3; Year = 2004;
}
Running the get location script returns "missing value".
As I mentioned, this is music playing on my iPod through iTunes, which the official Last.fm client picks up with no problems.
-
Greg Hurrell
Well, looks like the problem is that there is no "location" field, so Synergy has no way of knowing that it's a regular file. Compare that with a notification for a file playing from the local hard disk:
Code:Notification received 2006-11-13 23:49:38 +0100:
Name: com.apple.iTunes.playerInfo Info: { Album = "Telling Stories"; Artist = "Tracy Chapman"; Genre = Pop; Location = "file://localhost/Users/Shared/Music/Tracy%20Chapman%20-%20Telling%20Stories/%20-%20Track01.mp3"; Name = "Telling Stories"; "Player State" = Playing; "Store URL" = "itms://itunes.com/link?n=Telling%20Stories&an=Tracy%20Chapman&pn=Telling%20Stories"; "Total Time" = 237714; "Track Count" = 11; "Track Number" = 1; Year = 2000;
}
If I can find a way to reliably differentiate between tracks playing off an iPod like the one that you describe, and Internet radio, then I'll be able to submit those tracks. The trouble is, unless I can be 100% sure they are a regular file, the Audioscrobbler protocol requires me to not submit them.
-
heavyboots
Hi Wincent,
Just found another audioscrobbler "issue" although it's not really a bug so much as a grievance caused by using two machines with one audioscrobbler account. I have a home machine and a work machine, which I use in alternating order. It appears that Synergy cannot successfully report music usage from either machine until I manually re-login from the System Prefs panel by editing the audioscrobbler settings and just clicking Save. Then all of a sudden all my tracks come flooding in.
Most likely the cause is that last.fm is tracking IP addresses as part of their login info, so until Synergy is forced to login again, the reports are ignored as coming from the wrong ip. I'm not sure if last.fm supplies enough feedback for you to do something about this, but at the very least a "force audioscrobbler login" menu item would help speed up the process!
Thanks in advance. This audioscrobbler update is neat!
-
Greg Hurrell
Can you please turn on logging as described in the beta announcement:
http://lists.wincent.com/pipermail/synergy-beta/2006-November/000003.html
And let me know what the output is written to the console when you see the problem? I'll need this information in order to analyse the problem and devise a workaround.
As for having to manually re-edit the settings, I should think that stopping and starting Synergy would be an easy way to force a handshake in the meantime.
-
Greg Hurrell
I've opened a feature request for the "Force login" menu item:
-
heavyboots
Originally Posted By: WincentColaiutaAs for having to manually re-edit the settings, I should think that stopping and starting Synergy would be an easy way to force a handshake in the meantime.
Thanks for the quick response, Wincent. I didn't stop/start Synergy because I was afraid that would flush the queue? I figured better safe than sorry.
I've enabled logging, but it wasn't noticed by Synergy until after I resaved Audioscrobbler settings. Here's the "back" of the transaction after resave. I'll have the front tomorrow morning. Basically, after the resave, it logs in happily, notices queued items and starts flushing them. I've omitted the actual item transactions, but there is lots of verbose success after the process began.
Quote:2006-11-29 11:30:55.750 Synergy[24806] Audioscrobbler: Connection to Audioscrobbler did finish loading (response received) 2006-11-29 11:30:55.750 Synergy[24806] Audioscrobbler: Received an INTERVAL directive 2006-11-29 11:30:55.750 Synergy[24806] Audioscrobbler: Storing interval value: 1 2006-11-29 11:30:55.750 Synergy[24806] Audioscrobbler: Processing handshake reply 2006-11-29 11:30:55.750 Synergy[24806] Audioscrobbler: Received UPTODATE message 2006-11-29 11:33:16.946 Synergy[24806] Audioscrobbler: Received notification from iTunes 2006-11-29 11:33:16.946 Synergy[24806] Audioscrobbler: Received notification of playing status 2006-11-29 11:33:16.946 Synergy[24806] Audioscrobbler: Track information: { 2006-11-29 11:33:16.946 Synergy[24806] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing 2006-11-29 11:33:27.758 Synergy[24806] Audioscrobbler: Received notification from iTunes 2006-11-29 11:33:27.758 Synergy[24806] Audioscrobbler: Received notification of playing status 2006-11-29 11:33:27.759 Synergy[24806] Audioscrobbler: Track information: { 2006-11-29 11:33:27.759 Synergy[24806] Audioscrobbler: This track appears to be a new submission 2006-11-29 11:33:27.759 Synergy[24806] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-11-29 11:33:27.759 Synergy[24806] Audioscrobbler: Setting up new submission timer (125 seconds) 2006-11-29 11:35:32.759 Synergy[24806] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2006-11-29 11:35:32.759 Synergy[24806] Audioscrobbler: Position matches, will submit to Audioscrobbler 2006-11-29 11:35:32.759 Synergy[24806] Audioscrobbler: Adding song to submission queue; song infomation: { 2006-11-29 11:35:32.760 Synergy[24806] Audioscrobbler: Enqueuing object: { 2006-11-29 11:35:32.760 Synergy[24806] Audioscrobbler: Number of items currently on the queue: 3 2006-11-29 11:35:32.760 Synergy[24806] Audioscrobbler: Queue was non-empty, but ready to submit: processing item 2006-11-29 11:35:32.760 Synergy[24806] Audioscrobbler: Will handle next item on the queue after delay (Audioscrobbler specified delay in seconds: 1) 2006-11-29 11:35:33.760 Synergy[24806] Audioscrobbler: Will proceed with submission
-
Greg Hurrell
That's true, if you stop Synergy you will lose whatever was in the submission queue. But I think that pretty much any change you make to the preferences while Synergy is running will cause everything to refresh as soon as you click "Apply"; and that explains why Synergy "noticed" you'd enabled logging and also renogiated the handshake.
If you can capture the console output that occurs when your seeing the submission backlog problem let me know.
-
heavyboots
Busy day! With regards to the queue, it is in fact retained and uploaded after I "re-save" if I use that method to get Synergy to log in again. Unfortunately that isn't captured in this session as I had to log out to fix a font issue almost immediately after I started using iTunes... It sounds like I could basically hit apply anywhere though? That's good to know.
Here's the console output. First I unpause, then I switch tracks so it will try and submit to Last.fm faster. And finally after a couple of tracks I had to do a quick logout so the interesting console output ends for today.
Quote:2006-11-30 13:44:05.557 Synergy[24806] Audioscrobbler: Received notification from iTunes 2006-11-30 13:44:05.557 Synergy[24806] Audioscrobbler: Received notification of playing status 2006-11-30 13:44:05.557 Synergy[24806] Audioscrobbler: Track information: { 2006-11-30 13:44:05.557 Synergy[24806] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing 2006-11-30 13:45:15.758 Synergy[24806] Audioscrobbler: Received notification from iTunes 2006-11-30 13:45:15.759 Synergy[24806] Audioscrobbler: Received notification of playing status 2006-11-30 13:45:15.759 Synergy[24806] Audioscrobbler: Track information: { 2006-11-30 13:45:15.759 Synergy[24806] Audioscrobbler: This track appears to be a new submission 2006-11-30 13:45:15.759 Synergy[24806] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-11-30 13:45:15.759 Synergy[24806] Audioscrobbler: Setting up new submission timer (134 seconds) 2006-11-30 13:47:29.759 Synergy[24806] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2006-11-30 13:47:29.759 Synergy[24806] Audioscrobbler: Position matches, will submit to Audioscrobbler 2006-11-30 13:47:29.760 Synergy[24806] Audioscrobbler: Adding song to submission queue; song infomation: { 2006-11-30 13:47:29.760 Synergy[24806] Audioscrobbler: Enqueuing object: { 2006-11-30 13:47:29.760 Synergy[24806] Audioscrobbler: Number of items currently on the queue: 1 2006-11-30 13:47:29.760 Synergy[24806] Audioscrobbler: Queue was empty: processing item 2006-11-30 13:47:29.760 Synergy[24806] Audioscrobbler: Will handle next item on the queue after delay (Audioscrobbler specified delay in seconds: 1) 2006-11-30 13:47:30.760 Synergy[24806] Audioscrobbler: Will proceed with submission 2006-11-30 13:47:30.760 Synergy[24806] Audioscrobbler: Will perform submission using URL: http://<IP_ADDRESS>:80/protocol_1.1 2006-11-30 13:47:30.760 Synergy[24806] Audioscrobbler: Submission as URL-encoded string is: u=zedzded&s=d87b41037e081ac670da59f6e6ce1d41&a[0]=Lords%20Of%20Acid&t[0]=Mixed%20Emotions&b[0]=Lust&m[0]=&l[0]=268&i[0]=2006-11-30%2020%3A47%3A29 2006-11-30 13:47:30.760 Synergy[24806] Audioscrobbler: Submission as data is: <753d7a65 647a6465 6426733d 64383762 34313033 37653038 31616336 37306461 35396636 65366365 31643431 26615b30 5d3d4c6f 72647325 32304f66 25323041 63696426 745b305d 3d4d6978 65642532 30456d6f 74696f6e 7326625b 305d3d4c 75737426 6d5b305d 3d266c5b 305d3d32 36382669 5b305d3d 32303036 2d31312d 33302532 30323025 33413437 25334132 39> 2006-11-30 13:47:30.760 Synergy[24806] Audioscrobbler: Starting connection attempt 2006-11-30 13:47:30.760 Synergy[24806] Audioscrobbler: Waiting for submission response 2006-11-30 13:47:31.357 Synergy[24806] Audioscrobbler: Connection to Audioscrobbler did finish loading (response received) 2006-11-30 13:47:31.357 Synergy[24806] Audioscrobbler: Received an INTERVAL directive 2006-11-30 13:47:31.357 Synergy[24806] Audioscrobbler: Storing interval value: 1 2006-11-30 13:47:31.357 Synergy[24806] Audioscrobbler: Processing submission response 2006-11-30 13:47:31.357 Synergy[24806] Audioscrobbler: Received BADAUTH response 2006-11-30 13:48:50.670 Synergy[24806] Audioscrobbler: Received notification from iTunes 2006-11-30 13:48:50.670 Synergy[24806] Audioscrobbler: Received notification of playing status 2006-11-30 13:48:50.670 Synergy[24806] Audioscrobbler: Track information: { 2006-11-30 13:48:50.685 Synergy[24806] Audioscrobbler: This track appears to be a new submission 2006-11-30 13:48:50.685 Synergy[24806] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-11-30 13:48:50.686 Synergy[24806] Audioscrobbler: Setting up new submission timer (130 seconds) 2006-11-30 13:51:00.686 Synergy[24806] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2006-11-30 13:51:00.686 Synergy[24806] Audioscrobbler: Position matches, will submit to Audioscrobbler 2006-11-30 13:51:00.686 Synergy[24806] Audioscrobbler: Adding song to submission queue; song infomation: { 2006-11-30 13:51:00.686 Synergy[24806] Audioscrobbler: Enqueuing object: { 2006-11-30 13:51:00.687 Synergy[24806] Audioscrobbler: Number of items currently on the queue: 2 2006-11-30 13:51:00.687 Synergy[24806] Audioscrobbler: Queue was non-empty, but not ready to submit: not processing item 2006-11-30 13:53:12.740 Synergy[24806] Audioscrobbler: Received notification from iTunes 2006-11-30 13:53:12.740 Synergy[24806] Audioscrobbler: Received notification of playing status 2006-11-30 13:53:12.740 Synergy[24806] Audioscrobbler: Track information: { 2006-11-30 13:53:12.740 Synergy[24806] Audioscrobbler: This track appears to be a new submission 2006-11-30 13:53:12.740 Synergy[24806] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-11-30 13:53:12.740 Synergy[24806] Audioscrobbler: Setting up new submission timer (142 seconds) 2006-11-30 13:53:16.745 Synergy[24806] Audioscrobbler: Received notification from iTunes 2006-11-30 13:53:16.745 Synergy[24806] Audioscrobbler: Received notification of non-playing status 2006-11-30 13:53:16.745 Synergy[24806] Audioscrobbler: Track information: { 2006-11-30 13:53:16.745 Synergy[24806] Audioscrobbler: This track was previously submitted for consideration; pausing timer 2006-11-30 15:11:28.623 Synergy[24806] Audioscrobbler: Finalize Audioscrobbler session
Let me know if you need any more and thanks again!
-
Greg Hurrell
Ok, thanks for that. We can see that Audioscrobbler is returning "BADAUTH" which means that it rejects the username and password. So that's confirmation of your suspicion that it is doing some kind of IP-based check or similar.
So looks like the workaround for this issue will be the "Force re-login" thing that's already been added to the database here:
https://wincent.com/a/support/bugs/show_bug.cgi?id=512
The other possibility is to consider automatically re-trying to login in the event of a BADAUTH message, but it would have to be be pretty heavily limited. The problem is we'd need a way to distinguish between the BADAUTH message that you get when you supply incorrect credentials, and the BADAUTH message you get when you've logged in from two different IPs. Can you look at your console log again and tell me if any thing is printed immediately after the BADAUTH notification? (ie. if you are using the string "Synergy" or "Audioscrobbler" in the Console application to filter the log display then you may not be seeing all the information being printed by Synergy; I notice that in some of the lines you've pasted many of them are obviously truncated, like the ones that start with "{" but then nothing else is printed...)
-
heavyboots
Hmmm, unfortunately the lines are pasted exactly as they show in the console for me. Here's another sample, but I don't think it's going to help. EDIT: I searched by time too and these are the only messages from that time that have anything to do with Synergy, so there's nothing hidden by the filter in the Console that I wasn't seeing either.
Quote:006-12-01 18:02:06.643 Synergy[1827] Audioscrobbler: Starting connection attempt 2006-12-01 18:02:06.643 Synergy[1827] Audioscrobbler: Waiting for submission response 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Connection to Audioscrobbler did finish loading (response received) 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Received an INTERVAL directive 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Storing interval value: 1 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Processing submission response 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Received BADAUTH response 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Received notification from iTunes 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Received notification of playing status 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Track information: { 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: This track appears to be a new submission 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Setting up new submission timer (126 seconds) 2006-12-01 18:41:55.730 Synergy[1827] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Position matches, will submit to Audioscrobbler 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Adding song to submission queue; song infomation: { 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Enqueuing object: { 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Number of items currently on the queue: 2 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Queue was non-empty, but not ready to submit: not processing item 2006-12-01 18:44:03.188 Synergy[1827] Audioscrobbler: Received notification from iTunes 2006-12-01 18:44:03.188 Synergy[1827] Audioscrobbler: Received notification of playing status 2006-12-01 18:44:03.188 Synergy[1827] Audioscrobbler: Track information: { 2006-12-01 18:44:03.188 Synergy[1827] Audioscrobbler: This track appears to be a new submission 2006-12-01 18:44:03.188 Synergy[1827] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-12-01 18:44:03.188 Synergy[1827] Audioscrobbler: Setting up new submission timer (135 seconds) 2006-12-01 18:46:18.188 Synergy[1827] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value
It would be nice for Synergy to try a single login attempt if it receives a BADAUTH. Maybe if you tracked successful logins such that if successful login was true then you try an additional login attempt the first time you get a BADAUTH? If the 2nd auth attempt fails, you set login_success to false so it doesn't retry again until the user does something. But if it succeeds, next time there is a failure you can do one additional attempt and so forth.
Also, I just tried to relaunch 3.1b2 and it says it has expired? Is a new beta forthcoming today or should I reinstall 3.0? Never mind! I see you were releasing 3.1 as I was posting!
-
Greg Hurrell
The 3.1 beta expired today. The final (non-beta) release is available for download:
https://wincent.com/download.php?item=Synergy.dmg
Change log:
https://wincent.com/a/products/synergy-classic/history/#3.1
Release announcement:
https://wincent.com/a/news/archives/2006/12/synergy_31_now.php
As for the login failure issue, I still think something is being chopped from what you've posted. Those opening curly braces indicate that something should follow; but there's nothing, and no curly braces. It really looks like only the first line of each message is being shown...
But in any case, for the next version I will see if I can set a reasonable-but-small number of retries in response to a BADAUTH message. Perhaps three? I'll also see if I can log more detail to the console, but it seems like last.fm isn't saying anything more than "BADAUTH", which doesn't help much...
-
heavyboots
Okay, thanks for all the support and the lightening quick responses. Synergy is still one of my all-time favorites OS X apps ever in case I hadn't mentioned that before!
As for the Console, I looked one more time--this time specifically for lines with braces. Here's what it looks like with fully braced info. Sadly, there is not additional info in the BADAUTH area though.
Quote:2006-12-01 17:57:17.128 Synergy[1827] Audioscrobbler: Received notification from iTunes 2006-12-01 17:57:17.128 Synergy[1827] Audioscrobbler: Received notification of playing status 2006-12-01 17:57:17.128 Synergy[1827] Audioscrobbler: Track information: {
WOAudioscrobblerAlbum = "Shaking The Tree"; WOAudioscrobblerArtist = Unknown; WOAudioscrobblerLength = 271; WOAudioscrobblerTrack = "Here Comes The Flood";
} 2006-12-01 17:57:17.128 Synergy[1827] Audioscrobbler: This track was previously submitted for consideration but no paused timer found; doing nothing 2006-12-01 17:59:18.641 Synergy[1827] Audioscrobbler: Received notification from iTunes 2006-12-01 17:59:18.641 Synergy[1827] Audioscrobbler: Received notification of playing status 2006-12-01 17:59:18.641 Synergy[1827] Audioscrobbler: Track information: {
WOAudioscrobblerAlbum = "Shaking The Tree"; WOAudioscrobblerArtist = "Peter Gabriel"; WOAudioscrobblerLength = 335; WOAudioscrobblerTrack = "Red Rain";
} 2006-12-01 17:59:18.641 Synergy[1827] Audioscrobbler: This track appears to be a new submission 2006-12-01 17:59:18.641 Synergy[1827] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-12-01 17:59:18.641 Synergy[1827] Audioscrobbler: Setting up new submission timer (167 seconds) 2006-12-01 18:02:05.641 Synergy[1827] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2006-12-01 18:02:05.642 Synergy[1827] Audioscrobbler: Position matches, will submit to Audioscrobbler 2006-12-01 18:02:05.642 Synergy[1827] Audioscrobbler: Adding song to submission queue; song infomation: {
WOAlbum = "Shaking The Tree"; WOArtist = "Peter Gabriel"; WODate = "2006-12-02 01:02:05"; WOLength = 335; WOMBID = ""; WOTrack = "Red Rain";
} 2006-12-01 18:02:05.642 Synergy[1827] Audioscrobbler: Enqueuing object: {
WOAlbum = "Shaking The Tree"; WOArtist = "Peter Gabriel"; WODate = "2006-12-02 01:02:05"; WOLength = 335; WOMBID = ""; WOTrack = "Red Rain";
} 2006-12-01 18:02:05.642 Synergy[1827] Audioscrobbler: Number of items currently on the queue: 1 2006-12-01 18:02:05.642 Synergy[1827] Audioscrobbler: Queue was empty: processing item 2006-12-01 18:02:05.642 Synergy[1827] Audioscrobbler: Will handle next item on the queue after delay (Audioscrobbler specified delay in seconds: 1) 2006-12-01 18:02:06.642 Synergy[1827] Audioscrobbler: Will proceed with submission 2006-12-01 18:02:06.643 Synergy[1827] Audioscrobbler: Will perform submission using URL: http://<IP_ADDRESS>:80/protocol_1.1 2006-12-01 18:02:06.643 Synergy[1827] Audioscrobbler: Submission as URL-encoded string is: u=zedzded&s=8bc5d125318ce3eab199004f4e808369&a[0]=Peter%20Gabriel&t[0]=Red%20Rain&b[0]=Shaking%20The%20Tree&m[0]=&l[0]=335&i[0]=2006-12-02%2001%3A02%3A05 2006-12-01 18:02:06.643 Synergy[1827] Audioscrobbler: Submission as data is: <753d7a65 647a6465 6426733d 38626335 64313235 33313863 65336561 62313939 30303466 34653830 38333639 26615b30 5d3d5065 74657225 32304761 62726965 6c26745b 305d3d52 65642532 30526169 6e26625b 305d3d53 68616b69 6e672532 30546865 25323054 72656526 6d5b305d 3d266c5b 305d3d33 33352669 5b305d3d 32303036 2d31322d 30322532 30303125 33413032 25334130 35> 2006-12-01 18:02:06.643 Synergy[1827] Audioscrobbler: Starting connection attempt 2006-12-01 18:02:06.643 Synergy[1827] Audioscrobbler: Waiting for submission response 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Connection to Audioscrobbler did finish loading (response received) 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Received an INTERVAL directive 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Storing interval value: 1 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Processing submission response 2006-12-01 18:02:07.386 Synergy[1827] Audioscrobbler: Received BADAUTH response 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Received notification from iTunes 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Received notification of playing status 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Track information: {
WOAudioscrobblerAlbum = Up; WOAudioscrobblerArtist = "R.E.M."; WOAudioscrobblerLength = 253; WOAudioscrobblerTrack = Airportman;
} 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: This track appears to be a new submission 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Cancelling previously existing submission timer, if any 2006-12-01 18:39:49.730 Synergy[1827] Audioscrobbler: Setting up new submission timer (126 seconds) 2006-12-01 18:41:55.730 Synergy[1827] Audioscrobbler: Submission timer fired; will double-check that current track position matches expected value 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Position matches, will submit to Audioscrobbler 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Adding song to submission queue; song infomation: {
WOAlbum = Up; WOArtist = "R.E.M."; WODate = "2006-12-02 01:41:55"; WOLength = 253; WOMBID = ""; WOTrack = Airportman;
} 2006-12-01 18:41:55.731 Synergy[1827] Audioscrobbler: Enqueuing object: {
WOAlbum = Up; WOArtist = "R.E.M."; WODate = "2006-12-02 01:41:55"; WOLength = 253; WOMBID = ""; WOTrack = Airportman;
}
-
Greg Hurrell
Well, looks like we'll just have to implement a "try a few times but not too many" kind of policy with respect to BADAUTH responses...
Reply
This topic is now closed.


ARTIFICAL INTELLIGENCE
SOME NOTES FROM THE SIDELINES
HISTORY
# ALAN TURING - 1928 - 1954
https://en.wikipedia.org/wiki/Alan_Turing
# TURING MACHINE
https://en.wikipedia.org/wiki/Turing_machine
# TURING TEST Can you tell if you're talking to a machine or a human?
https://en.wikipedia.org/wiki/Turing_test
# DARTMOUTH WORKSHOP - 1956
# DARTMOUTH WORKSHOP We propose that a 2-month, 10-man study of artificial intelligence be carried out during the summer of 1956 at Dartmouth College in Hanover, New Hampshire. The study is to proceed on the basis of the conjecture that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it. An attempt will be made to find how to make machines use language, form abstractions and concepts, solve kinds of problems now reserved for humans, and improve themselves. We think that a significant advance can be made in one or more of these problems if a carefully selected group of scientists work on it together for a summer. https://en.m.wikipedia.org/wiki/Dartmouth_workshop
# ELIZA - 1966
https://en.wikipedia.org/wiki/ELIZA
# SHAKEY - 1970's
https://en.wikipedia.org/wiki/Shakey_the_robot
# TECHNOLOGIES Expert Systems Neural Nets Reinforcement Learning Planners Optimizers
# CYC Douglas Lenat 1984
# NEURAL NETWORKS
# NEURAL NETWORKS
# REINFORCEMENT LEARNING
# AI WINTER
https://en.wikipedia.org/wiki/AI_winter
PRESENT
# MACHINE LEARNING The new thing is an old thing. Same algorithms as the 80's, attached to contemporary hardware.
# MACHINE LEARNING Engineers are making > US$500k Startups are taken less seriously if they don't do Machine Learning Companies are building their success on ML (eg. Google, Facebook)
# DEEP LEARNING
# MNIST DEMO
# REINFORCEMENT LEARNING
# OpenAI
https://openai.com/blog/emergent-tool-use/
# WHAT STILL CAN'T BE DONE? Human-like agility / dexterity Common sense Symbolic Thought Full Natural Conversation Driving (controversially!)
FUTURE
# 2001: A SPACE ODYSSEY - 1968
https://en.wikipedia.org/wiki/2001:_A_Space_Odyssey_(film)
# 2001: A SPACE ODYSSEY
# ARTIFICAL GENERAL INTELLIGENCE Artificial general intelligence (AGI) is the intelligence of a machine that can understand or learn any intellectual task that a human being can. https://en.wikipedia.org/wiki/Artificial_general_intelligence
# PEOPLE WERE SKEPTICAL ## The Chinese Room - 1980
(Skeptics - John Searle, Hubert Drefus) https://en.wikipedia.org/wiki/Chinese_room
# NO ONE* IS SKEPTICAL NOW
Podcast - "GIGAOM - Voices In AI" Host - Byron Reese. Hundreds of guests - philosophers, AI engineers, etc. Host:"Do you think AGI is possible?" Guest:"Yes" Host:Grrr
# TECHNOLOGICAL SINGULARITY
https://en.wikipedia.org/wiki/Technological_singularity
# KURZWEIL CURVE
# "A HANDFUL OF NEW INVENTIONS"
Before the Wright Brothers flew their plane, human flight was impossible AGI could be 500 years away, or it could already be here in a lab somewhere
# SUPERINTELLIGENCE
The book that freaked-out Bill Gates and Elon Musk
# SUPERINTELLIGENCE ## PATHWAYS **AI** **Brain emulation** **Biological cognition** **Brain-computer interfaces** **Networks**
# SUPERINTELLIGENCE ## FORMS **Speed** - just like a human only faster **Collective** - like multiple humans working together **Quality** - as fast as humans but qualitatively smarter **Reach** - able to get to other forms
# SUPERINTELLIGENCE ## Digital Hardware Advantages Speed of computational elements Internal communication Speed Number of computational elements Storage Capacity Reliability / Lifespan / Sensors
# SUPERINTELLIGENCE ## Digital Software Advantages Editability Duplicability Goal Coordination Memory Sharing New modules / modalities / algorithms
# SUPERINTELLIGENCE ## Kinetics Fast - minutes hours or days Medium - months or years Slow - decades or centuries
# RIGHTS Do these entities have any? Do we create a new rights-deserving entity every time we run their program? "Soul of Martha, A Beast"
# WARFARE
Some say this is the most proximate risk (eg. Stuart Russell)
# PAPER CLIP MAXIMIZER "Suppose we have an AI whose only goal is to make as many paper clips as possible. The AI will realize quickly that it would be much better if there were no humans because humans might decide to switch it off. Because if humans do so, there would be fewer paper clips. Also, human bodies contain a lot of atoms that could be made into paper clips. The future that the AI would be trying to gear towards would be one in which there were a lot of paper clips but no humans." - Nick Bostrom
# FRIENDLY AI
https://en.wikipedia.org/wiki/Friendly_artificial_intelligence
# THE URN OF INVENTIONS
Our civilization is constantly reaching into the **Urn of Inventions** to solve problems White, Gray, Black Balls - Microwave-nukes?
RESOURCES
# YOU TUBE 3Blue1Brown - https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw Two Minute Papers - https://www.youtube.com/user/keeroyz
# PODCASTS **Making Sense** - Sam Harris **Artificial Intelligence** - with Lex Fridman **After On** - Rob Reid **Philosophy Bites**
# BOOKS **SuperIntelligence** - Nick Bostrom **The Singularity is Near** - Ray Kurzweil **The Philosophical Baby** - Alison Gopnik **The Book of Why** - Judea Pearle
# MOVIES **2001 : A Space Odyssey** **Her** **Ex Machina** **Transcendance** **Blade Runner**
END


Contact us
We want to hear from you. Whether you have an enquiry, feedback or simply want to talk, there are a number of ways you can reach us.
Jumeirah Group Corporate Office
Level 5, Building 5
Dubai Design District
PO Box 73137
Dubai, UAE
Phone: +971 4 3665000
Fax: +971 4 3665001
For General Jumeirah inquiries
Email<EMAIL_ADDRESS>For Rooms reservations
Email<EMAIL_ADDRESS>- or please call one of the toll free numbers below.
For Restaurant reservations
Email<EMAIL_ADDRESS>For Jumeirah One related queries and Member bookings
Email<EMAIL_ADDRESS>For Press enquiries
Email<EMAIL_ADDRESS>Dubai / UAE: Consumer Rights, Complaints & Suggestions
www.consumerrights.ae
Phone: Call 600 54 5555
For Jumeirah Hotels & Resorts App related support
Email<EMAIL_ADDRESS>Jumeirah Development Department
Email<EMAIL_ADDRESS>Middle East, Africa and South Asia
Jumeirah Group
PO Box 73137
Dubai, UAE
Phone: +971 4 366 5000
Jumeirah International LLC, a limited liability company,
incorporated in the United Arab Emirates with registered office at Level 5,
Building 5, Dubai Design District, PO Box 73137, Dubai, United Arab Emirates
Phone: +971 4 366 5000
Fax: +971 4 366 5001.
Dubai / UAE: Consumer Rights, Complaints & Suggestions - www.consumerrights.ae / 600 54 5555


Before Change
lse.run()
self.fail("Test of DataOnDemandProvider should have failed due to the lack of a token.")
except QiskitFinanceError:
self.skipTest("Test of DataOnDemandProvider skipped due to the lack of a token.")
if __name__ == "__main__":
unittest.main()
After Change
covariance = np.array(
[[2.693, -18.65],
[-18.65, 1304.422]])
with self.subTest("test ExchangeDataProvider get_covariance_matrix"):
np.testing.assert_array_almost_equal(lse.get_covariance_matrix(),
covariance, decimal=3)
with self.subTest("test ExchangeDataProvider get_similarity_matrix"):
np.testing.assert_array_almost_equal(lse.get_similarity_matrix(),
similarity, decimal=3)
except NameError as ex:


[§432C-6] For-profit entity; after conversion. After conversion, the for-profit entity shall not be subject to this chapter, but if a stock insurance company, shall be in conformance with title 24. [L 1998, c 260, pt of §2]


'Involved' Abramovich has rejected bargain bids for Chelsea: Chairman
LONDON: Chelsea owner Roman Abramovich is fully involved in running the Premier League side and will not entertain "bargain bids" for the club, chairman Bruce Buck said.
Abramovich ran into problems renewing his British visa last year and has not been seen at Chelsea's home games this season. He has also cancelled plans to redevelop Stamford Bridge.
British media reported Abramovich had grown weary and was looking to sell the club but Buck said that the Russian billionaire, who took Israeli citizenship in May last year, had no such plans.
"I have never heard a word from Abramovich: 'Let's get this ready for a sale,' or something," Buck told The Guardian.
"Because of the political situation, there are people who think they might want to buy Chelsea at a bargain. We do get inquiries and we really have nothing to say to these people.
"In terms of being involved, in looking at new players, talking about whether to extend players' contracts ... (he) was always intimately involved in that from day one and is just as intimately involved now."
Chelsea are currently unable to add any new players to their squad after being hit with a transfer ban by soccer's governing body FIFA. Manager Frank Lampard has guided an inexperienced team to fourth in the league after 13 games.
"The transfer ban has led to more opportunities for young players," Buck said.
"It makes Mr Abramovich very happy, because he is interested in the academy. I would guess he's one of the few owners that have been to lots of academy matches."