aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | remove dead codeAaron Patterson2014-01-171-7/+0
| |
* | comment out the sqlite3 debug code (for now)Aaron Patterson2014-01-141-0/+7
| |
* | Merge branch 'master' into set_bindsAaron Patterson2014-01-141-1/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * sqlite >= 3.8.0 supports partial indexesCody Cutrer2014-01-141-1/+17
| |
* | explains for prepared statements should never have binds in SQLite3Aaron Patterson2014-01-131-1/+1
|/
* Raise NoDatabaseError when db does not existschneems2013-12-241-0/+6
| | | Building on the work of #13427 this PR adds a helpful error message to the adapters: mysql, mysql2, and sqlite3
* Merge pull request #13291 from strzibny/new_unique_constraintYves Senn2013-12-121-1/+5
|\ | | | | Translate new unique constraint error message for sqlite >= 3.8.2
| * Translate new unique constraint for sqlite >= 3.8.2Josef Stribny2013-12-121-1/+5
| |
* | Remove the unused, undocumented SQLite3Adapter#supports_count_distinct?Ben Woosley2013-11-121-5/+0
| | | | | | | | This has returned true since 3cc9b5f1, and is not used internally.
* | Drop a sqlite_version check because we only support SQLite 3.6.16 or newer.Ben Woosley2013-11-121-6/+1
| | | | | | Drop some comments that document the implementation rather than the interface.
* | Don't use Active Support where we don't need toRafael Mendonça França2013-11-091-1/+1
| |
* | log bind variables after they were type casted.Yves Senn2013-11-091-4/+5
|/ | | | | | | | | | | | | | | The log output used to be confusing in situation where type casting has "unexpected" effects. For example when finding records with a `String`. BEFORE: irb(main):002:0> Event.find("im-no-integer") D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", "im-no-integer"]] AFTER: irb(main):002:0> Event.find("im-no-integer") D, [2013-11-09T11:10:28.998857 #1706] DEBUG -- : Event Load (4.5ms) SELECT "events".* FROM "events" WHERE "events"."id" = $1 LIMIT 1 [["id", 0]]
* Remove `default_primary_key_type` and extract contains of ↵Vipul A M2013-10-141-18/+16
| | | | `native_database_types` to a constant since they aren't conditional now in SQLite3Adapter. Makes it more like other adapters.
* Merge pull request #11833 from vipulnsward/remove_autoincrementRafael Mendonça França2013-10-141-10/+1
|\ | | | | Remove sqlite specific`supports_autoincrement?` which defaults to true
| * Remove sqlite specific`supports_autoincrement?` which always defaults to trueVipul A M2013-08-101-10/+1
| |
* | extract adapter savepoint implementations into `abstract/savepoints.rb`.Yves Senn2013-09-301-12/+2
| |
* | change the savepoint interface to allow passing the name.Yves Senn2013-09-301-6/+6
| |
* | Check if the SQL is not a prepared statementRafael Mendonça França2013-09-111-2/+3
|/ | | | | | | | | When the adapter is with prepared statement disabled and the binds array is not empty the connection adapter will try to set the binds values and will fail. Now we are checking if the adapter has the prepared statement disabled. Fixes #12023
* Remove redundant `string_to_binary` from type-castingVipul A M2013-08-091-2/+2
|
* config[:database] should be a stringRafael Mendonça França2013-08-051-3/+3
| | | | | This change was breaking the Railties tests. See https://travis-ci.org/rails/rails/jobs/9865969
* Create sqlite3 directory if not presentschneems2013-08-051-3/+5
| | | | | | | | | | | 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
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-03-301-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb activerecord/test/cases/adapter_test.rb guides/source/testing.md [ci skip]
| * nodoc AR::ConnectionHandling for adapters [ci skip]Francesco Rodriguez2013-03-151-2/+2
| |
* | added comments to test_invalid_type in sqlite3 adapter test and added ↵Ranjay Krishna2013-03-281-4/+0
| | | | | | | | 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/+4
| | | | | | | | Now, connection handles the check for valid types so that each database can handle the changes individually.
* | keep ivars private, do not manipulate them outside their owner objectAaron Patterson2013-03-221-1/+1
| |
* | Pass column to quote when copying a sqlite table.Matthew M. Boedicker2013-03-111-1/+9
|/ | | | To make quote escape binary data correctly it needs the column passed in.
* Unprepared Visitor + unprepared_statementCédric FABIANSKI2013-03-081-1/+1
|
* Do not type cast all the database url values.Rafael Mendonça França2013-02-241-3/+3
| | | | | | We should only type cast when we need to use. Related to 4b005fb371c2e7af80df7da63be94509b1db038c
* also rename indexes when a table or column is renamedYves Senn2013-02-201-2/+4
| | | | When a table or a column is renamed related indexes kept their name. This will lead to confusing names. This patch renames related indexes when a column or a table is renamed. Only indexes with names generated by rails will be renamed. Indexes with custom names will not be renamed.
* reserve less chars for internal sqlite3 operationsYves Senn2013-02-201-7/+7
|
* reserve index name chars for internal rails operationsYves Senn2013-02-201-1/+8
| | | | | | | | | | | Some adapter (SQLite3) need to perform renaming operations to support the rails DDL. These rename prefixes operate with prefixes. When an index name already uses up the full space provieded by `index_name_length` these internal operations will fail. This patch introduces `allowed_index_name_length` which respects the amount of characters used for internal operations. It will always be <= `index_name_length` and every adapter can define how many characters need to be reserved.
* Remove valid_type? methodJon Leighton2013-02-151-5/+0
| | | | | It was supposed to be removed by the preceding two reversions but I did them in the wrong order.
* Revert "Make valid_type? public"Jon Leighton2013-02-151-0/+5
| | | | | | This reverts commit 5d528f835e871f5f9d4b68e8a81cfbe900b7e718. Relates to f8c8ad5 which is also getting reverted due to failing test.
* Make valid_type? publicSam Ruby2013-02-141-5/+0
|
* Merge pull request #9204 from ranjaykrishna/col-probAaron Patterson2013-02-121-0/+4
|\ | | | | schema dumper tests now conducted by ActiveRecord::Base.Connection
| * checking in the abstractions for valid type checking:Ranjay Krishna2013-02-121-0/+4
| |
* | Fix cases where delete_records on a has_many association caused errorsDerek Kraan2013-01-271-0/+4
|/ | | | | | | | | | | | | because of an ambiguous column name. This happened if the association model had a default scope that referenced a third table, and the third table also referenced the original table (with an identical foreign_key). Mysql requires that ambiguous columns are deambiguated by using the full table.column syntax. Postgresql and Sqlite use a different syntax for updates altogether (and don't tolerate table.name syntax), so the fix requires always including the full table.column and discarding it later for Sqlite and Postgresql.
* Differentiate between remove_column and remove_columns. Make remove_column ↵Marc-Andre Lafortune2012-12-211-7/+3
| | | | | | reversible. [#8267]
* Keep index names when using with sqlite3Yves Senn2012-12-191-2/+1
|
* SQLite3Adapter#type_cast should not mutate argumentsStefan Rusterholz2012-10-281-1/+1
|
* refactor `SQLite3Adapter#copy_table` to prevent primary key redefinitions. #6378Yves Senn2012-10-281-5/+3
|
* Support for partial inserts.Jon Leighton2012-09-281-4/+0
| | | | | | | | | | | When inserting new records, only the fields which have been changed from the defaults will actually be included in the INSERT statement. The other fields will be populated by the database. This is more efficient, and also means that it will be safe to remove database columns without getting subsequent errors in running app processes (so long as the code in those processes doesn't contain any references to the removed column).
* Query for loading index info should be marked as SCHEMA.kennyj2012-09-151-1/+1
|
* Ensure disconnecting or reconnecting resets the transaction stateJon Leighton2012-09-151-1/+7
|
* column default extraction should handle newlines.Aaron Patterson2012-08-171-2/+2
| | | | Fixes #7374
* Revert "Merge pull request #6344"Piotr Sarnacki2012-06-251-1/+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-8/+6
|
* Merge pull request #6344 from erichmenge/patch_sqlite_time_typePiotr Sarnacki2012-05-151-1/+1
|\ | | | | SQLite3 doesn't actually support the 'time' type.
| * SQLite3 doesn't actually support the 'time' type.Erich Menge2012-05-151-1/+1
| |