aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3521 from ↵Aaron Patterson2011-11-061-2/+1
| | | | | | nulogy/fix_postgres_adapter_to_handle_spaces_between_schemas Fix postgres adapter to handle spaces between schemas
* implements AR::Relation#explainXavier Noria2011-11-053-1/+137
| | | | | | | | | | | | | | | | | | | This is a first implementation, EXPLAIN is highly dependent on the database and I have made some compromises. On one hand, the method allows you to run the most common EXPLAIN and that's it. If you want EXPLAIN ANALYZE in PostgreSQL you need to do it by hand. On the other hand, I've tried to construct a string as close as possible to the ones built by the respective shells. The rationale is that IMO the user should feel at home with the output and recognize it at first sight. Per database. I don't know whether this implementation is going to work well. Let's see whether people like it.
* Merge pull request #3525 from kennyj/fix_3440-1Jon Leighton2011-11-051-2/+11
|\ | | | | Fixed an issue id false option is ignored on mysql/mysql2 (fix #3440)
| * Fixed an issue id false option is ignored on mysql/mysql2 (fix #3440)kennyj2011-11-061-2/+11
| |
* | AR changes to support creating ordered (asc, desc) indexesVlad Jebelev2011-11-046-14/+79
|/
* Merge pull request #1163 from amatsuda/sexier_migration_31Aaron Patterson2011-11-042-10/+12
|\ | | | | Sexier migrations
| * No "t." for the migration DSL!Akira Matsuda2011-05-202-10/+12
| | | | | | | | | | Now you can omit |t| block parameter and all the t. from your migration code, that means, the syntax looks more Rails-3-ish, like the routes DSL and ActionMailer DSL. Also, this change won't break any of your existing migration files, since the traditional syntax is still available.
* | dump_schema_information: explicitly order inserts into schema_migrations tableLaust Rud Jacobsen2011-10-311-1/+1
| | | | | | | | | | | | | | This change reduces churn in the db/development_structure.sql file when using :sql as active_record.schema_format, and makes comparing diffs much easier. Test ensures the output SQL-statements are lexically ordered by version.
* | clear statement cache when tables are alteredAaron Patterson2011-10-271-0/+6
| |
* | preserve decimal column attributes after migrationGreg Reinacker2011-10-211-0/+3
| |
* | Merge pull request #3258 from ileitch/3-1-stableAaron Patterson2011-10-201-1/+7
| | | | | | | | Postgres: Do not attempt to deallocate a statement if the connection is no longer active.
* | reset prepared statement when schema changes imapact statement results. ↵Aaron Patterson2011-10-181-11/+43
| | | | | | | | fixes #3335
* | Default timestamps to non-nullMike Perham2011-10-142-3/+3
| |
* | Only use LOWER for mysql case insensitive uniqueness check when column has a ↵Joseph Palermo2011-10-094-8/+31
| | | | | | | | case sensitive collation.
* | use thread locals and an instance variable within QueryCache#BodyProxy to ↵Mark J. Titorenko2011-10-072-1/+9
| | | | | | | | maintain appropriate linkage with AR database connection across threads
* | Use the schema_search_path in prepared statements.Juan M. Cuello2011-10-051-3/+4
| | | | | | | | | | To allow the use of prepared statements when changing schemas in postgres, the schema search path is added to the sql key.
* | LRU cache in mysql and sqlite are now per-process caches.Aaron Patterson2011-09-072-21/+30
| |
* | LRU should cache per process in postgresql. fixes #1339Aaron Patterson2011-09-071-10/+14
| |
* | fixing view queriesAaron Patterson2011-09-071-3/+5
| |
* | use the supplied bind valuesAaron Patterson2011-09-071-1/+1
| |
* | Merge commit 'refs/pull/2909/head' of https://github.com/rails/rails into rawrAaron Patterson2011-09-071-6/+4
| | | | | | | | | | | | * https://github.com/rails/rails: Postgresql adapter: added current_schema check for table_exists? Postgresql adapter: added current_schema check for table_exists?
* | Merge pull request #2897 from rsutphin/ar31-remove_connectionAaron Patterson2011-09-062-2/+2
| | | | | | | | Patch for issue #2820
* | Database adapters use a statement pool.Aaron Patterson2011-09-063-8/+46
| | | | | | | | | | | | Database adapters use a statement pool for limiting the number of open prepared statments on the database. The limit defaults to 1000, but can be adjusted in your database config by changing 'statement_limit'.
* | adding a statement pool for mysql and sqlite3Aaron Patterson2011-09-063-9/+102
| |
* | Make the logic easier to readJon Leighton2011-09-061-4/+7
| |
* | * Psych errors with poor yaml formatting are proxied. Fixes #2645, #2731Aaron Patterson2011-09-011-1/+0
| |
* | make sure encoding_aware? is availableAaron Patterson2011-09-011-0/+2
| |
* | Merge pull request #2021 from dasch/more_postgres_utilsAaron Patterson2011-08-291-1/+3
|\ \ | | | | | | Make #extract_schema_and_table an instance method in Utils
| * | Make #extract_schema_and_table an instance method in UtilsDaniel Schierbeck2011-07-091-1/+3
| | | | | | | | | | | | Also, move the utils test into its own test case.
* | | Move the bulk alter table code into the abstract mysql adapter, hence it is ↵Jon Leighton2011-08-292-47/+42
| | | | | | | | | | | | supported for mysql2 as well now.
* | | Extract simplified_type into the abstract classJon Leighton2011-08-293-23/+24
| | |
* | | Create an AbstractMysqlAdapter to abstract the common code between ↵Jon Leighton2011-08-293-1097/+706
| | | | | | | | | | | | MysqlAdapter and Mysql2Adapter.
* | | Force binary data inserted for a string data type to utf-8 and log anAaron Patterson2011-08-251-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | error. Strings tagged as binary will be stored in sqlite3 as blobs. It is an error to insert binary data to a string column, so an error is emitted in the log file. People are highly encouraged to track down the source of the binary strings and make sure that the encoding is set correctly before inserting to the database.
* | | Adding missing autoloadClaudio Poli2011-08-241-0/+1
| | |
* | | prevent sql injection attacks by escaping quotes in column namesAaron Patterson2011-08-163-3/+3
| | |
* | | In 1efd88283ef68d912df215125951a87526768a51, ConnectionAdapters was put ↵Jon Leighton2011-08-161-12/+22
| | | | | | | | | | | | under eager_autoload. Due to the requires in that file, this caused ConnectionSpecification to be loaded, which references ActiveRecord::Base, which means the database connection is established. We do not want to connect to the database when Active Record is loaded, only when ActiveRecord::Base is first referenced by the user.
* | | Use new SelectManager#source methodJon Leighton2011-08-152-2/+2
| | |
* | | Use new SelectManager#projections= methodJon Leighton2011-08-153-4/+4
| | |
* | | use update.key instead of update.ast.key. make better use of select manager.Jon Leighton2011-08-153-26/+18
| | |
* | | Use a SelectCore rather than a full SelectManagerJon Leighton2011-08-152-4/+6
| | |
* | | Refactor building the update managerJon Leighton2011-08-153-11/+7
| | |
* | | Support for multi-table updates with limits, offsets and ordersJon Leighton2011-08-153-2/+47
| | |
* | | Support updates with joins. Fixes #522.Jon Leighton2011-08-153-0/+17
| | |
* | | add the gem requirement for sqlite3Aaron Patterson2011-08-101-0/+2
| | |
* | | Remove TODO comment I didn't mean to commitJon Leighton2011-08-091-2/+0
| | |
* | | Make it the responsibility of the connection to hold onto an ARel visitor ↵Jon Leighton2011-08-088-20/+81
| | | | | | | | | | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
* | | sqlite transactions now loggedGustavo Delfino2011-08-061-3/+3
| | | | | | | | | motivation: http://stackoverflow.com/questions/6892630/sqlite-transactions-not-showing-in-test-log
* | | accept option for recreate db for postgres (same as mysql now)artemk2011-08-041-2/+4
| | |
* | | initializing @open_transactions in the initialize methodAaron Patterson2011-08-031-4/+2
| | |
* | | remove deprication warning for ruby 1.9.3-head for unused variablesVishnu Atrai2011-07-261-1/+1
| | |