aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove Relation#bind_paramsSean Griffin2015-01-271-5/+3
| | | | | | | | `bound_attributes` is now used universally across the board, removing the need for the conversion layer. These changes are mostly mechanical, with the exception of the log subscriber. Additional, we had to implement `hash` on the attribute objects, so they could be used as a key for query caching.
* Ensures that primary_key method will return nil when multi-pkArthur Neves2014-12-301-0/+6
| | | | | | | When table has a composite primary key, the `primary_key` method for sqlite3 and postgresql was only returning the first field of the key. Ensures that it will return nil instead, as AR dont support composite pks.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-4/+4
|
* Remove the unused second argument to `substitute_at`Sean Griffin2014-11-171-1/+1
| | | | Oh hey, we got to remove some code because of that!
* rm `reorder_bind_params`Sean Griffin2014-11-171-1/+1
| | | | | | Arel handles this for us automatically. Updated tests, as BindParam is no longer a subclass of SqlLiteral. We should remove the second argument to substitute_at entirely, as it's no longer used
* Merge pull request #14056 from girishso/14041Yves Senn2014-09-091-2/+2
|\ | | | | | | | | | | | | SQLite3Adapter now checks for views in table_exists? fixes: 14041 Conflicts: activerecord/CHANGELOG.md
| * SQLite3Adapter now checks for views in table_exists? fixes: 14041Girish S2014-02-141-0/+10
| |
* | Change back occurrences of SQLite(3) to sqlite3 when referring to theZachary Scott2014-07-061-5/+6
| | | | | | | | adapter, fixed from #16057 [ci skip]
* | [ci skip] /sqlite/i --> SQLiteAkshay Vishnoi2014-07-061-2/+2
| |
* | Don't type cast the default on the columnSean Griffin2014-06-171-1/+1
| | | | | | | | | | | | | | If we want to have type decorators mess with the attribute, but not the column, we need to stop type casting on the column. Where possible, we changed the tests to test the value of `column_defaults`, which is public API. `Column#default` is not.
* | Merge pull request #13640 from maginatics/fix_sqlite3_ensure_masterRafael Mendonça França2014-05-011-0/+15
|\ \ | | | | | | | | | | | | | | | | | | SQLite3: Always close statements. Conflicts: activerecord/CHANGELOG.md
| * | SQLite3: Always close statements.Timur Alperovich2014-01-151-0/+15
| |/ | | | | | | | | | | SQLite3 adapter must make sure to close statements after queries. Fixes: #13631
* | Merge branch 'master' into adequaterecordAaron Patterson2014-04-071-168/+199
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (122 commits) Rails.application should be set inside before_configuration hook remove check for present? from delete_all Remove useless begin..end Build the reverse_order on its proper method. Use connection-specific bytea escaping Ignore order when doing count. make enums distinct per class Remove unused `subclass_controller_with_flash_type_bar` var from flash test. fix CollectionProxy delete_all documentation Added OS X specific commands to installation guide [ci skip] Recommended using homebrew for installing MySQL and PostgreSQL Fix setup of adding _flash_types test. Use SVG version of travis build status badge [skip ci] W3C CSP document moved to gihub.io URL [ci skip] sprockets-rails was released Fix the test defining the models in the right place Add CHANGELOG entry for #11650 [ci skip] Declare the assets dependency Use sass-rails 4.0.3 Make possible to use sprockets-rails 2.1 add missing parentheses to validates_with documentation [skip ci] ...
| * | Revise 'sqlite3:' URL handling for smoother upgradesMatthew Draper2014-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll change to the absolute-path interpretation in 4.2. The current "correct" spellings for in-memory, relative, and absolute URLs, respectively, are: sqlite3::memory: sqlite3:relative/path sqlite3:/full/path Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce. Uncovered by @guilleiguaran while investigating #14495, though that sounds like a different issue.
| * | Refactor test to use DdlHelper.Guo Xiang Tan2014-03-291-166/+197
| | | | | | | | | | | | | | | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14400 This ensures that all tables are removed after each test and thereby allowing us to run the tests in a random order.
| * | 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
* | | Merge branch 'master' into adequaterecordAaron Patterson2014-02-171-7/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Revert "Merge pull request #13344 from ccutrer/fix-from-default-select" No need to use symbols Don't skip tests if they are not broken. Just don't define they Fix typo [ci skip] Resolve encoding issues with arrays of hstore (bug 11135). Fix coffeescript sample [ci skip]
| * | Don't skip tests if they are not broken. Just don't define theyRafael Mendonça França2014-02-161-7/+3
| |/
| * "string" isn't a valid column type for ActiveRecordAaron Patterson2014-01-141-1/+1
| | | | | | | | | | Conflicts: activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
* | drop the dual encodings tableAaron Patterson2014-01-141-2/+2
| |
* | Merge branch 'master' into set_bindsAaron Patterson2014-01-141-15/+21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * master: don't establish a new connection when testing with `sqlite3_mem`. sqlite >= 3.8.0 supports partial indexes Don't try to get the subclass if the inheritance column doesn't exist Enum mappings are now exposed via class methods instead of constants. Fix fields_for documentation with index option [ci skip] quick pass through Active Record CHANGELOG. [ci skip] [ci skip] Grammar correction single quotes for controller generated routes [ci skip] Added alias to CSRF Set NameError#name
| * 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.
* | Merge branch 'master' into set_bindsAaron Patterson2014-01-111-11/+52
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (2794 commits) doc, API example on how to use `Model#exists?` with multiple IDs. [ci skip] Restore DATABASE_URL even if it's nil in connection_handler test [ci skip] - error_messages_for has been deprecated since 2.3.8 - lets reduce any confusion for users Ensure Active Record connection consistency Revert "ask the fixture set for the sql statements" Check `respond_to` before delegation due to: https://github.com/ruby/ruby/commit/d781caaf313b8649948c107bba277e5ad7307314 Adding Hash#compact and Hash#compact! methods MySQL version 4.1 was EOL on December 31, 2009 We should at least recommend modern versions of MySQL to users. clear cache on body close so that cache remains during rendering add a more restricted codepath for templates fixes #13390 refactor generator tests to use block form of Tempfile Fix typo [ci skip] Move finish_template as the last public method in the generator Minor typos fix [ci skip] make `change_column_null` reversible. Closes #13576. create/drop test and development databases only if RAILS_ENV is nil Revert "Speedup String#to" typo fix in test name. [ci skip]. `core_ext/string/access.rb` test what we are documenting. Fix typo in image_tag documentation ... Conflicts: activerecord/lib/active_record/associations/join_dependency/join_association.rb activerecord/lib/active_record/relation/query_methods.rb
| * 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
| |
| * stop adding singleton methods to the SQLite3 connectionAaron Patterson2013-10-041-11/+11
| |
| * 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.
* | Merge branch 'master' into experimentAaron Patterson2013-05-211-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (49 commits) avoid creating a set if no where values are removed remove bind values for where clauses that were removed push partitioning up so bind elimination can get the removed wheres push partion logic down and initialization logic up the rake task `db:test:prepare` needs to load the configuration In batches test @total was assigned but not used. Use it in tests instead of Post.count partition the where values so we can access the removed ones eliminate some conditionals change method name to reflect what it actually does. save the where values in variables so we don't need to look them up all the time pass where values to the helper function rather than rely on internal state Spelling correction in Upgrading Guide Add has_named_route? to the mapper API No need CHANGELOG entry for a test fix Fix wrong `case_sensitive` in uniqueness validity test Fix typo in test name and documentation Missing ending ``` at 14.2 Merging of scopes copy edits[ci skip] Revert "Corrected documentation and added some more for the classify method in inflectors" Revert "Changed the CHANGELOG for active_support and improved the doc for inflector method classify" ...
| * Fix typo in test name and documentationVipul A M2013-05-201-1/+1
| |
* | experimentAaron Patterson2013-05-171-3/+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.
* 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'
* checking in the abstractions for valid type checking:Ranjay Krishna2013-02-121-0/+9
|
* 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
|
* 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
|
* remove checks for encodings availabilitySergey Nartimov2011-12-251-5/+1
|
* deprecate String#encoding_aware? and remove its usageSergey Nartimov2011-12-241-2/+0
|
* fixing tests on ruby 1.8Aaron Patterson2011-11-201-1/+3
|
* pushing caching and visitors down to the connectionAaron Patterson2011-11-191-0/+1
|
* 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.
* 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.
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | 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.
* use index based substitution for bind parametersAaron Patterson2011-04-131-1/+1
|