aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
Commit message (Collapse)AuthorAgeFilesLines
* Only run binary type cast test with encode! on Ruby 1.9Carlos Antonio da Silva2012-03-041-6/+8
|
* only log an error if there is a logger. fixes #5226Aaron Patterson2012-03-021-0/+9
| | | | | | Conflicts: activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
* Merge pull request #5096 from lawso017/masterAaron Patterson2012-02-211-3/+7
| | | | Restoring ability to derive id/sequence from tables with nonstandard sequences for primary keys
* Add missing requireJon Leighton2011-12-031-0/+2
|
* Avoid postgres 9.X syntaxJon Leighton2011-12-031-1/+5
|
* Deprecate set_table_name in favour of self.table_name= or defining your own ↵Jon Leighton2011-11-294-8/+8
| | | | method.
* add the query to AR::Relation#explain outputXavier Noria2011-11-253-0/+9
| | | | | | | Rationale: this is more readable if serveral queries are involved in one call. Also, it will be possible to let AR log EXPLAINs automatically in production mode, where queries are not even around.
* fixing tests on ruby 1.8Aaron Patterson2011-11-201-1/+3
|
* pushing caching and visitors down to the connectionAaron Patterson2011-11-191-0/+1
|
* Verify that #3690 has been closed by previous changes to the mysqlJon Leighton2011-11-192-2/+10
| | | | | | | | adapters. These tests fail on the v3.1.2 tag. Closes #3690.
* fixing tests on PGAaron Patterson2011-11-161-1/+1
|
* revises EXPLAIN tests for SQLite3Xavier Noria2011-11-061-3/+3
| | | | | | | | | | The output in Travis is a bit different. The SQLite documentation (http://www.sqlite.org/eqp.html) warns output may change dramatically between releases. I do not want to mock the result set because I want a real EXPLAIN to happen. I prefer a test that may fail in future releases than a test that may give false positives in future releases.
* Merge pull request #3521 from ↵Aaron Patterson2011-11-061-0/+4
| | | | | | nulogy/fix_postgres_adapter_to_handle_spaces_between_schemas Fix postgres adapter to handle spaces between schemas
* implements AR::Relation#explainXavier Noria2011-11-053-0/+71
| | | | | | | | | | | | | | | | | | | 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.
* AR changes to support creating ordered (asc, desc) indexesVlad Jebelev2011-11-041-4/+12
|
* Merge pull request #3258 from ileitch/3-1-stableAaron Patterson2011-10-201-0/+16
| | | | 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-0/+8
| | | | fixes #3335
* fix to remove warning in test casesVishnu Atrai2011-10-161-2/+2
|
* ambiguous first argument; put parentheses or even spaces Warning removed!Arun Agrawal2011-10-101-2/+2
|
* Remove stray whitespaceJeremy Kemper2011-10-091-4/+1
|
* Only use LOWER for mysql case insensitive uniqueness check when column has a ↵Joseph Palermo2011-10-092-0/+73
| | | | case sensitive collation.
* Merge pull request #3232 from Juanmcuello/pg_prepared_statementsAaron Patterson2011-10-061-0/+19
|\ | | | | Use the schema_search_path in prepared statements.
| * refs #3232. Prepared statements and postgreSQL schemas.Juan M. Cuello2011-10-051-0/+19
| | | | | | | | | | Add tests for prepared statements with multiple schemas in postgreSQL.
* | Transactional fixtures enlist all active database connections.Jeremy Kemper2011-10-051-0/+4
|/ | | | You can use multiple databases in your tests without disabling transactional fixtures.
* LRU cache in mysql and sqlite are now per-process caches.Aaron Patterson2011-09-072-0/+47
|
* fixing file nameAaron Patterson2011-09-071-0/+0
|
* LRU should cache per process in postgresql. fixes #1339Aaron Patterson2011-09-071-0/+23
|
* Merge commit 'refs/pull/2909/head' of https://github.com/rails/rails into rawrAaron Patterson2011-09-071-0/+6
| | | | | | * 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 #2021 from dasch/more_postgres_utilsAaron Patterson2011-08-292-15/+18
|\ | | | | Make #extract_schema_and_table an instance method in Utils
| * Make #extract_schema_and_table an instance method in UtilsDaniel Schierbeck2011-07-092-15/+18
| | | | | | | | Also, move the utils test into its own test case.
* | Create an AbstractMysqlAdapter to abstract the common code between ↵Jon Leighton2011-08-291-4/+4
| | | | | | | | MysqlAdapter and Mysql2Adapter.
* | Force binary data inserted for a string data type to utf-8 and log anAaron Patterson2011-08-251-0/+16
| | | | | | | | | | | | | | | | 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.
* | forgot to add this test caseAaron Patterson2011-07-221-0/+14
| |
* | move around testsAaron Patterson2011-07-211-0/+10
| |
* | bigdecimal should be typecast to a float on sqlite3. fixes #2162Aaron Patterson2011-07-201-1/+1
|/
* Refactor PostgreSQLAdapter a bitDaniel Schierbeck2011-07-081-2/+2
| | | | | Move the private method #extract_schema_and_table into a separate Utils module so that it can be tested without resorting to #send.
* Make PostgreSQL adapter view-compatiblePaul Gallagher2011-06-192-1/+49
| | | * amongst other things, allows meta_search to run against view-backed models
* make extract_schema_and_table a private methodPaul Gallagher2011-06-111-7/+7
|
* remove table quoting in primary_key methodPaul Gallagher2011-06-112-5/+47
| | | * add/cleanup tests
* apply private method indentation conventionPaul Gallagher2011-06-102-3/+3
| | | * tidy test code and fix my typo
* Improve PostgreSQL adapter schema-awarenessPaul Gallagher2011-06-102-2/+122
| | | | | | | * table_exists? scoped by schema search path unless schema is explicitly named. Added tests and doc to clarify the behaviour * extract_schema_and_table tests and implementation extended to cover all cases * primary_key does not ignore schema information * add current_schema and schema_exists? methods * more robust table referencing in insert_sql and sql_for_insert methods
* Remove unused 'y' variable.Sebastian Martinez2011-06-081-2/+2
|
* Fix a couple of helper requires that were missed. This was causing the tests ↵Jon Leighton2011-06-071-1/+1
| | | | to fail to run on 1.8.7.
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-0625-25/+25
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-0426-27/+26
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Merge pull request #1385 from smartinez87/dropAaron Patterson2011-06-011-1/+1
|\ | | | | #drop_table accepts no options now.
| * #drop_table accepts no options now.Sebastian Martinez2011-05-281-1/+1
| |
* | Add missing require to fix the CIJon Leighton2011-06-011-0/+1
| |
* | Isolated PostgreSQL test into PostgreSQL folderPrem Sichanugrist2011-05-311-0/+29
|/
* use a null byte as a bind parameter substitute as it is not allowed in ↵Aaron Patterson2011-05-091-0/+50
| | | | normal SQL. fixes #411, #417