aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/sqlite3
Commit message (Collapse)AuthorAgeFilesLines
* Fix tests not unsubscribing from Notifications.Guo Xiang Tan2014-03-281-2/+2
| | | | See https://github.com/rails/rails/blob/master/activesupport/lib/active_support/notifications.rb#L131
* Don't skip tests if they are not broken. Just don't define theyRafael Mendonça França2014-02-161-7/+3
|
* remove unused fixtures from sqlite3 test casesRajarshi Das2014-02-141-1/+1
|
* "string" isn't a valid column type for ActiveRecordAaron Patterson2014-01-141-1/+1
| | | | | Conflicts: activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
* don't establish a new connection when testing with `sqlite3_mem`.Yves Senn2014-01-141-15/+21
| | | | | | | This fixes broken `rake test_sqlite3_mem` suite for Active Record. The problem is that that the old database with the schema is lost when establishing a new connection. Upon reconnting we are left with a blank database and tests down the line start failing.
* Raise NoDatabaseError when db does not existschneems2013-12-241-0/+7
| | | Building on the work of #13427 this PR adds a helpful error message to the adapters: mysql, mysql2, and sqlite3
* fix url connections for sqlite3Aaron Patterson2013-12-201-0/+22
|
* quoting: Check if id is a valid method before using itArthur Neves2013-12-191-0/+7
| | | | | Need to check if valud also respond_to :id before calling it, otherwise things could explode.
* Don't skip tests if we don't need to.Rafael Mendonça França2013-11-081-11/+12
| | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed.
* Warning removed for ruby-headRashmi Yadav2013-11-071-1/+1
|
* stop adding singleton methods to the SQLite3 connectionAaron Patterson2013-10-041-11/+11
|
* Create sqlite3 directory if not presentschneems2013-08-051-0/+21
| | | | | | | | | | | If the `db/` directory is not present on a remote machine it will blow up in unexpected ways with error messages that do not indicate there is a missing directory: ``` SQLite3::CantOpenException: unable to open database file ``` This PR checks to see if a directory exists for the sqlite3 file and if not creates it for you. This PR is an alternative to #11692 as suggested by @josevalim
* Define enable_extension method to prevent undefined method errorAntonio Santos2013-08-021-0/+12
| | | | | | | When mixing postgresql and another adapter like sqlite3 (for dev and test respectively), the task `db:test:prepare` will fail due to the `enable_extension` method not being defined in the abstract adapter. This patch simply adds an empty definition to prevent it.
* Fix typo in test name and documentationVipul A M2013-05-201-1/+1
|
* each to each_value; remove unused varsVipul A M2013-04-071-2/+2
|
* added comments to test_invalid_type in sqlite3 adapter test and added ↵Ranjay Krishna2013-03-281-0/+4
| | | | valid_type? method to abstract_adapter.rb and removed unnecessary method from sqlite3 adapter
* Created a layer of abstraction for the valid type checking in schema dumper. ↵Ranjay Krishna2013-03-251-0/+9
| | | | Now, connection handles the check for valid types so that each database can handle the changes individually.
* Fix copy table index test; Change == to ! on false in travis.rbVipul A M2013-03-211-1/+1
|
* Pass column to quote when copying a sqlite table.Matthew M. Boedicker2013-03-111-1/+5
| | | | To make quote escape binary data correctly it needs the column passed in.
* Revert "checking in the abstractions for valid type checking:"Jon Leighton2013-02-151-9/+0
| | | | | | | | | | | | | | | | This reverts commit c321b309a9a90bbfa0912832c11b3fef52e71840. Conflicts: activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb Reason: failing test 1) Error: test_valid_column(ActiveRecord::ConnectionAdapters::SQLite3AdapterTest): NoMethodError: undefined method `column' for test/cases/adapters/sqlite3/sqlite3_adapter_test.rb:29:in `test_valid_column'
* Merge pull request #9204 from ranjaykrishna/col-probAaron Patterson2013-02-121-0/+9
|\ | | | | schema dumper tests now conducted by ActiveRecord::Base.Connection
| * checking in the abstractions for valid type checking:Ranjay Krishna2013-02-121-0/+9
| |
* | Use Encoding::UTF_8 constant :do_not_litter:Akira Matsuda2013-01-281-1/+1
|/
* Remove not assigned variable warning from sqlite3 adapter testCarlos Antonio da Silva2012-10-291-1/+1
|
* SQLite3Adapter#type_cast should not mutate argumentsStefan Rusterholz2012-10-281-0/+6
|
* refactor `SQLite3Adapter#copy_table` to prevent primary key redefinitions. #6378Yves Senn2012-10-281-1/+8
|
* Cleanup trailing whitespacesdfens2012-10-121-1/+1
|
* Revert "Merge pull request #6344"Piotr Sarnacki2012-06-251-6/+1
| | | | | | | | | | | | | | This commit needs to be reverted because it introduces difficulties when using sqlite3 in development and other databases in production. This happens because when you create time column in sqlite3, it's dumped as datetime in schema.rb file. This reverts commit 57d534ee9e441d078fcc161c0c78ebaa5aacd736, reversing changes made to 20f049fb50daee0c5e5a69b55b529af5737e8e3f. Conflicts: activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
* Fix logs name consistency.kennyj2012-05-191-15/+21
|
* Fix warning: ambiguous first argument.kennyj2012-05-181-1/+1
|
* Remove unneeded testsPiotr Sarnacki2012-05-161-12/+0
|
* SQLite3 doesn't actually support the 'time' type.Erich Menge2012-05-151-0/+5
|
* Set the primary key during #copy_table if necessary. Fixes [#2312]Sean Scally2012-05-141-0/+8
|
* fix tests for SQLite3AdapterAndrey Deryabin2012-04-271-1/+1
|
* fix tests for sqlite3Andrey Deryabin2012-04-271-1/+1
|
* only log an error if there is a logger. fixes #5226Aaron Patterson2012-03-021-0/+9
|
* Don't type-cast unknown types to YAML.Stephen Celis2012-01-201-2/+2
|
* remove checks for encodings availabilitySergey Nartimov2011-12-251-5/+1
|
* deprecate String#encoding_aware? and remove its usageSergey Nartimov2011-12-241-2/+0
|
* add the query to AR::Relation#explain outputXavier Noria2011-11-251-0/+3
| | | | | | | 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
|
* 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.
* implements AR::Relation#explainXavier Noria2011-11-051-0/+23
| | | | | | | | | | | | | | | | | | | 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.
* 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-071-0/+24
|
* 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.
* bigdecimal should be typecast to a float on sqlite3. fixes #2162Aaron Patterson2011-07-201-1/+1
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-063-3/+3
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-043-3/+3
| | | | 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.