Flowdock

135 results found for "{query"

size

(ActiveRecord::Associations::CollectionAssociation, >= v3.1.0 <= v6.1.3.1)
Importance_1_sm

query if the collection hasn’t been loaded, and calling collection. size if it has. If the collection has been already loaded size and length are equivalent. If not and you are going to need the records anyway length will take one less query. Otherwise size is more efficient. This

sql_query_length

(ActiveRecord::ConnectionAdapters::DatabaseLimits, >= v2.3.8 <= v6.0.0)
Importance_1_sm

Returns the maximum length of an SQL query.

ActiveRecord::Store

Importance_3_sm

query that store outside the context of a single record. You can then declare accessors to this store that are then accessible just like any other attribute of the model. This is very helpful for easily exposing store keys to a form or elsewhere that’s already built around just

joins_per_query

(ActiveRecord::ConnectionAdapters::DatabaseLimits, >= v2.3.8 <= v6.0.0)
Importance_1_sm

Returns maximum number of joins in a single query.

exec_query

(ActiveRecord::ConnectionAdapters::DatabaseStatements, >= v3.1.0 <= v6.1.3.1)
Importance_1_sm

Executes sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

columns_for_distinct

(ActiveRecord::ConnectionAdapters, >= v5.0.0.1 <= v5.2.3)
Importance_1_sm

In MySQL 5.7.5 and up, ONLY_FULL_GROUP_BY affects handling of queries that use DISTINCT and ORDER BY. It requires the ORDER BY columns in the select list for distinct queries, and requires that the ORDER BY include the distinct column. See dev.mysql.com/doc/refman/5.7/en/group-by-handling.html

inversed_from_queries

(ActiveRecord::Associations::Association, >= v5.2.3 <= v6.1.3.1)
Importance_1_sm

Alias for ActiveRecord::Associations::Association#inversed_from

text_field_tag

(ActionView::Helpers::FormTagHelper, >= v1.0.0 <= v6.1.3.1)
Importance_3_sm

query. Options :disabled - If set to true, the user will not be able to use this input. :size - The number of visible characters that will fit in the input. :maxlength - The maximum number of characters that the browser will allow the user to enter. :placeholder - The text contained in the field

ActionView::FileSystemResolver

Importance_2_sm

query glob: users/new{.{en},}{.{html,js},}{.{erb,haml},} Pattern format and variables Pattern has to be a valid glob string, and it allows you to use the following variables: :prefix - usually the controller path :action - name of the action :locale - possible locale versions :formats - possible request formats (for example html

assert_routing

(ActionDispatch::Assertions::RoutingAssertions, >= v3.0.0 <= v6.1.3.1)
Importance_2_sm

that options generates path . This essentially combines assert_recognizes and assert_generates into one step. The extras hash allows you to specify options that would normally be provided as a query string to the action. The message parameter allows you to specify a custom error message to display upon failure.

column_definitions

(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter, >= v1.0.0 <= v6.1.3.1)
Importance_2_sm

Returns the list of a table’s column names, data types, and default values. The underlying query is roughly:

assert_generates

(ActionDispatch::Assertions::RoutingAssertions, >= v3.0.0 <= v6.1.3.1)
Importance_2_sm

This is the inverse of assert_recognizes . The extras parameter is used to tell the request the names and values of additional request parameters that would be in a query string. The message parameter allows you to specify a custom error message for assertion failures. The defaults parameter is unused.

ActionDispatch::Http::FilterParameters

Importance_2_sm

query string of the request and all sub-hashes of the params hash to filter. Filtering only certain sub-keys from a hash is possible by using the dot notation: ‘credit_card.number’. If a block is given, each key and value of the params hash and all sub-hashes is passed

collect_join_chain

(ActiveRecord::Reflection::ThroughReflection, >= v5.0.0.1 <= v6.1.3.1)
Importance_2_sm

item in the array corresponds to a table which will be part of the query for this association. The chain is built by recursively calling #chain on the source reflection and the through reflection. The base case for the recursion is a normal association, which just returns self as its #chain .

length

(ActiveRecord::Associations::CollectionProxy, >= v4.0.2 <= v6.1.3.1)
Importance_2_sm

Returns the size of the collection calling size on the target . If the collection has been already loaded, length and size are equivalent. If not and you are going to need the records anyway this method will take one less query. Otherwise size is more efficient.

ActiveSupport::LogSubscriber

Importance_2_sm

queries: Since we need to know all instance methods before attaching the log subscriber, the line above should be called after your ActiveRecord::LogSubscriber definition. After configured, whenever a “sql.active_record” notification is published, it will properly dispatch the event ( ActiveSupport::Notifications::Event ) to the sql method. Log subscriber also

increment_counter

(ActiveRecord::CounterCache::ClassMethods, >= v4.0.2 <= v6.1.3.1)
Importance_2_sm

query to calculate the number of posts and comments there are, each time it is displayed. Parameters counter_name - The name of the field that should be incremented. id - The id of the object that should be incremented or an array of ids. :touch - Touch timestamp columns when updating. Pass

except

(ActiveRecord::SpawnMethods, >= v3.0.0 <= v6.1.3.1)
Importance_1_sm

Removes from the query the condition(s) specified in skips .

reset_counters

(ActiveRecord::CounterCache::ClassMethods, >= v4.0.2 <= v6.1.3.1)
Importance_2_sm

query. This is useful when adding new counter caches, or if the counter has been corrupted or modified directly by SQL. Parameters id - The id of the object you wish to reset a counter on. counters - One or more association counters to reset. Association name or counter name can be given

query_parameters

(ActionDispatch::Request, >= v3.0.0 <= v6.1.3.1)
Importance_1_sm

Alias for ActionDispatch::Request#GET

ActiveSupport::Subscriber

Importance_2_sm

Notifications . The subscriber dispatches notifications to a registered object based on its given namespace. An example would be an Active Record subscriber responsible for collecting statistics about queries: After configured, whenever a “sql.active_record” notification is published, it will properly dispatch the event ( ActiveSupport::Notifications::Event ) to the sql method.

only

(ActiveRecord::SpawnMethods, >= v3.0.0 <= v6.1.3.1)
Importance_1_sm

Removes any condition from the query other than the one(s) specified in onlies .

check_if_method_has_arguments!

(ActiveRecord::QueryMethods, >= v4.0.2 <= v6.1.3.1)
Importance_1_sm

Checks to make sure that the arguments are not blank. Note that if some blank-like object were initially passed into the query method, then this method will not raise an error. Example: end

reorder

(ActiveRecord::QueryMethods, >= v3.0.0 <= v6.1.3.1)
Importance_1_sm

Replaces any existing order defined on the relation with the specified order . generates a query with ‘ORDER BY id ASC, name ASC’.

record_key_for_dom_id

(ActionView::RecordIdentifier, >= v4.0.2 <= v6.1.3.1)
Importance_2_sm

query for the underlying database record, you should write a helper like ‘person_record_from_dom_id’ that will extract the key either based on the default implementation (which just joins all key attributes with ‘_’) or on your own overwritten version of the method. By default, this implementation passes the key string

destroy_all

(ActiveRecord::Relation, >= v3.0.0 <= v6.1.3.1)
Importance_2_sm

record can be time consuming when you’re removing many records at once. It generates at least one SQL DELETE query per record (or possibly more, to enforce your callbacks). If you want to delete many rows quickly, without concern for their associations or callbacks, use #delete_all instead. Examples

references

(ActiveRecord::QueryMethods, >= v4.0.2 <= v6.1.3.1)
Importance_1_sm

Use to indicate that the given table_names are referenced by an SQL string, and should therefore be JOINed in any query rather than loaded separately. This method only works in conjunction with #includes . See #includes for more details.

scoping

(ActiveRecord::Relation, >= v3.0.0 <= v6.1.3.1)
Importance_1_sm

Scope all queries to the current scope. Please check unscoped if you want to remove all previous scopes (including the default_scope) during the execution of a block.

insert

(ActiveRecord::ConnectionAdapters::DatabaseStatements, >= v1.0.0 <= v6.1.3.1)
Importance_1_sm

query and returns the new record’s ID id_value will be returned unless the value is nil, in which case the database will attempt to calculate the last inserted id and return that value. If the next id was calculated in advance (as in Oracle), it should be passed

pp

(ActiveRecord::ConnectionAdapters::SQLite3::ExplainPrettyPrinter, >= v5.0.0.1 <= v6.1.3.1)
Importance_1_sm

Pretty prints the result of an EXPLAIN QUERY PLAN in a way that resembles the output of the SQLite shell: