Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | improve NullRelation docs [ci skip] | Vijay Dev | 2012-07-21 | 2 | -5/+4 |
| | |||||
* | minor copy edits [ci skip] | Vijay Dev | 2012-07-21 | 2 | -4/+2 |
| | |||||
* | Fix typos | Oscar Del Ben | 2012-07-19 | 1 | -3/+3 |
| | |||||
* | Add nodocs to delegation module and docs for merge! | Oscar Del Ben | 2012-07-17 | 2 | -1/+2 |
| | |||||
* | Update batches docs | Oscar Del Ben | 2012-07-17 | 1 | -6/+6 |
| | |||||
* | Add nodoc to HashMerger and Merger | Oscar Del Ben | 2012-07-17 | 1 | -2/+2 |
| | |||||
* | Fix typos and add nodocs to NullRelation | Oscar Del Ben | 2012-07-17 | 2 | -4/+4 |
| | |||||
* | Improve docs for AR Relation | Oscar Del Ben | 2012-07-17 | 1 | -7/+19 |
| | |||||
* | Add docs for Relation initialize, create and create! | Oscar Del Ben | 2012-07-16 | 1 | -1/+34 |
| | |||||
* | Don't link to edgeguides in docs | Oscar Del Ben | 2012-07-16 | 1 | -1/+1 |
| | |||||
* | Typo | Oscar Del Ben | 2012-07-16 | 1 | -1/+0 |
| | |||||
* | Add documentation for query_methods bang methods | Oscar Del Ben | 2012-07-16 | 1 | -1/+20 |
| | |||||
* | Add nodoc to create_with_value | Oscar Del Ben | 2012-07-16 | 1 | -1/+1 |
| | | | | | Reason: all *_value methods are defined dynamically and so don't appear in the documentation. | ||||
* | Add documentation for arel and build_arel | Oscar Del Ben | 2012-07-16 | 1 | -0/+2 |
| | |||||
* | Add documentation for create_with | Oscar Del Ben | 2012-07-16 | 1 | -1/+19 |
| | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-07-15 | 2 | -3/+40 |
|\ | |||||
| * | session_id column is string in default | kennyj | 2012-07-15 | 1 | -1/+1 |
| | | |||||
| * | Add docs for having, lock and readonly | Oscar Del Ben | 2012-07-07 | 1 | -0/+12 |
| | | |||||
| * | Add doc for joins and improve includes doc | Oscar Del Ben | 2012-07-07 | 1 | -2/+17 |
| | | |||||
| * | Add docs for eager_laod and preload | Oscar Del Ben | 2012-07-07 | 1 | -0/+10 |
| | | |||||
* | | Fix SqlBypass.data_column= problem. SqlBypass.find_by_session_id method ↵ | kennyj | 2012-07-15 | 1 | -1/+1 |
| | | | | | | | | didn't use this assignment. | ||||
* | | Avoid to call send(store_attribute) twice. | kennyj | 2012-07-15 | 1 | -6/+8 |
| | | |||||
* | | teaching the mysql adapter how to typecast strings returned from the database | Aaron Patterson | 2012-07-13 | 1 | -2/+132 |
| | | |||||
* | | Fixing texts; down to three failing tests. | Jeremy Cole | 2012-07-13 | 2 | -15/+24 |
| | | | | | | | | | | Conflicts: activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | ||||
* | | Only use prepared statements when bind variables are present | Jeremy Cole | 2012-07-13 | 1 | -34/+40 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepared statements (prepare/execute/close) were being used unnecessarily when no bind variables were present, and disabling prepared statement using prepared_statements:false was principally broken. While bind variables were correctly substituted with prepared_statements:false, the prepared statement interface was still used, costing an extra two round trips per query. In addition to making this behavioral change, I also cleaned up the internals of exec_stmt and exec_without_stmt so that they behave the same (calling log and constructing the ActiveRecord::Result in the same way). Moving the check for binds.empty? to exec_query also will mean that several code paths explicitly calling exec_without_stmt could be cleaned up to once again call exec_query instead. I have also left the check for binds.empty? in exec_stmt, since it is not a private method and could be called directly with an empty binds array. For the sake of clarity in this patch, I have not made those changes. = The previous behavior = When issuing a Foo.find(1) with prepared_statements:true, the bind variable is present in the prepared query, and execute shows a value passed: Connect root@localhost on rails_test Query SET SQL_AUTO_IS_NULL=0 Statistics Query SHOW FULL FIELDS FROM `foos` Query SHOW TABLES LIKE 'foos' Query SHOW CREATE TABLE `foos` Prepare SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = ? LIMIT 1 Execute SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1 Close stmt Quit When issuing a Foo.find(1) with prepared_statements:false, the bind variable has already been removed and substituted with the value, but the prepared statement interface is used anyway: Connect root@localhost on rails_test Query SET SQL_AUTO_IS_NULL=0 Statistics Query SHOW FULL FIELDS FROM `foos` Query SHOW TABLES LIKE 'foos' Query SHOW CREATE TABLE `foos` Prepare SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1 Execute SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1 Close stmt Quit = With this patch applied = When issuing a Foo.find(1) with prepared_statements:true, the bind variable is present in the prepared query, and execute shows a value passed: Connect root@localhost on rails_test Query SET SQL_AUTO_IS_NULL=0 Statistics Query SHOW FULL FIELDS FROM `foos` Query SHOW TABLES LIKE 'foos' Query SHOW CREATE TABLE `foos` Prepare SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = ? LIMIT 1 Execute SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1 Close stmt Quit When issuing a Foo.find(1) with prepared_statements:false, the bind variable has been removed and substituted with the value, and the query interface is used instead of the prepared statement interface: Connect root@localhost on rails_test Query SET SQL_AUTO_IS_NULL=0 Statistics Query SHOW FULL FIELDS FROM `foos` Query SHOW TABLES LIKE 'foos' Query SHOW CREATE TABLE `foos` Query SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = 1 LIMIT 1 Quit | ||||
* | | fix association :extend option | Jon Leighton | 2012-07-13 | 4 | -13/+20 |
| | | |||||
* | | Remove duplicated unique index name. | kennyj | 2012-07-14 | 1 | -4/+7 |
| | | |||||
* | | Remove instance level quote_value method. This method is private and also ↵ | kennyj | 2012-07-14 | 2 | -10/+3 |
| | | | | | | | | exists in class method. | ||||
* | | Merge pull request #7045 from kennyj/remove_duplicated_code_20120714 | Rafael Mendonça França | 2012-07-13 | 1 | -11/+3 |
|\ \ | | | | | | | Remove duplicated code in the AR::Store. | ||||
| * | | Remove duplicated code in the AR::Store. | kennyj | 2012-07-14 | 1 | -11/+3 |
| | | | |||||
* | | | move the deprecated options into active_record_deprecated_finders | Jon Leighton | 2012-07-13 | 2 | -5/+2 |
| | | | |||||
* | | | stop using class_attribute where methods/inheritance will suffice. | Jon Leighton | 2012-07-13 | 8 | -39/+57 |
|/ / | |||||
* | | Add documentation for ActiveRecord::Observer. | Katrina Owen | 2012-07-13 | 1 | -0/+6 |
| | | | | | | | | The instructions about configuration covered only rails-specific usage. | ||||
* | | extract deprecated association options to active_record_deprecated_finders | Jon Leighton | 2012-07-13 | 1 | -43/+0 |
| | | |||||
* | | Represent association scope options as AR::Relations insternally. | Jon Leighton | 2012-07-13 | 13 | -146/+153 |
| | | |||||
* | | Allow associations to take a lambda which builds the scope | Jon Leighton | 2012-07-13 | 5 | -25/+37 |
| | | |||||
* | | support relations created with a table alias | Jon Leighton | 2012-07-13 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #6874 from robbkidd/rename_sequences_too | Aaron Patterson | 2012-07-10 | 1 | -0/+7 |
|\ \ | |/ |/| | Rename default sequence when table is renamed? [AR:postgres] | ||||
| * | Update psql adapter to rename a default pkey sequence when renaming a table. | Robb Kidd | 2012-06-27 | 1 | -0/+7 |
| | | |||||
* | | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-07-07 | 3 | -6/+41 |
|\ \ | |||||
| * | | minor text change [ci skip] | Vijay Dev | 2012-07-07 | 1 | -1/+1 |
| | | | |||||
| * | | Revert "Add nodoc to relation methods" | Vijay Dev | 2012-07-07 | 1 | -22/+24 |
| | | | | | | | | | | | | | | | | | | This reverts commit c47a698d5d497340d4e349257522212173865838. Reason: Let's revert pending further discussions | ||||
| * | | Add nodoc to relation methods | Oscar Del Ben | 2012-07-06 | 1 | -24/+22 |
| | | | |||||
| * | | Add order docs | Oscar Del Ben | 2012-07-05 | 1 | -0/+10 |
| | | | |||||
| * | | Add group documentation | Oscar Del Ben | 2012-07-05 | 1 | -0/+12 |
| | | | |||||
| * | | Add documentation for includes | Oscar Del Ben | 2012-07-05 | 1 | -0/+11 |
| | | | |||||
| * | | remove :nodoc: of AR::Scoping#unscoped [ci skip] | Francesco Rodriguez | 2012-07-01 | 1 | -4/+4 |
| | | | |||||
| * | | fix AR::SchemaStatements#column_exists? example [ci skip] | Francesco Rodriguez | 2012-06-30 | 1 | -1/+1 |
| | | | |||||
| * | | update AR::SchemaStatements#column_exists? documentation [ci skip] | Francesco Rodriguez | 2012-06-30 | 1 | -2/+4 |
| | | | |||||
* | | | Refactor locked? method in query cache | Carlos Antonio da Silva | 2012-07-07 | 1 | -5/+2 |
| | | | | | | | | | | | | Introduced in 75b340d1a4bcf2f1233fb65a15ff6b8059e2230e |