summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/sqlite
Commit message (Collapse)AuthorAgeFilesLines
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-5/+5
| | | | Found using: https://github.com/intgr/topy
* fix typorel_0_9_3Mike Bayer2014-02-191-1/+1
|
* - rewrite SQLite reflection tests into one consistent fixture, which testsMike Bayer2014-02-161-25/+31
| | | | both _resolve_type_affinity() directly as well as round trip tests fully.
* - The SQLite dialect will now skip unsupported arguments when reflectingMike Bayer2014-02-161-1/+8
| | | | | | types; such as if it encounters a string like ``INTEGER(5)``, the :class:`.INTEGER` type will be instantiated without the "5" being included, based on detecting a ``TypeError`` on the first attempt.
* - changelog + documentation for pullreq github:65Mike Bayer2014-02-161-6/+57
|
* Merge branch 'master' of https://github.com/eblume/sqlalchemy into tMike Bayer2014-02-162-154/+165
|\
| * SQLite dialect - support relection from affinitypr/65Erich Blume2014-02-031-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLite allows column types that aren't technically understood in sqlite by using 'data affinity', which is an algorithm for converting column types in to some sort of useful type that can be stored and retrieved from the db. Unfortunatly, this breaks reflection since we (previously) expected a sqlite db to reflect column types that we permit in the `ischema_names` for that dialect. This patch changes the logic for 'unknown' column types during reflection to instead run through SQLite's data affinity algorithm, and assigns appropriate types from that. It also expands the matching for column type to include column types with spaces (strongly discouraged but allowed by sqlite) and also completely empty column types (in which case the NullType is assigned, which sqlite will treat as a Blob - or rather, Blob is treated as NullType). These changes mean that SQLite will never raise an error for an unknown type during reflection - there will always be some 'useful' type returned, which follows the spirit of SQLite (accomodation before sanity!).
| * PEP-8 compliance for dialects/sqlite/base.pyErich Blume2014-01-302-143/+129
| |
* | - Fixed bug whereby SQLite compiler failed to propagate compiler argumentsMike Bayer2014-01-311-2/+2
|/ | | | | | | | | | such as "literal binds" into a CAST expression. - Fixed bug whereby binary type would fail in some cases if used with a "test" dialect, such as a DefaultDialect or other dialect with no DBAPI. - Fixed bug where "literal binds" wouldn't work with a bound parameter that's a binary type. A similar, but different, issue is fixed in 0.8.
* - Added new test coverage for so-called "down adaptions" of SQL types,Mike Bayer2014-01-221-5/+6
| | | | | | | | | | | where a more specific type is adapted to a more generic one - this use case is needed by some third party tools such as ``sqlacodegen``. The specific cases that needed repair within this test suite were that of :class:`.mysql.ENUM` being downcast into a :class:`.types.Enum`, and that of SQLite date types being cast into generic date types. The ``adapt()`` method needed to become more specific here to counteract the removal of a "catch all" ``**kwargs`` collection on the base :class:`.TypeEngine` class that was removed in 0.9. [ticket:2917]
* - implement kwarg validation and type system for dialect-specificMike Bayer2014-01-181-10/+16
| | | | | arguments; [ticket:2866] - add dialect specific kwarg functionality to ForeignKeyConstraint, ForeignKey
* - happy new yearMike Bayer2014-01-053-3/+3
|
* Fix cross referencespr/46Vraj Mohan2013-11-171-2/+2
|
* - The typing system now handles the task of rendering "literal bind" values,Mike Bayer2013-10-201-0/+8
| | | | | | | | | | | | | | | e.g. values that are normally bound parameters but due to context must be rendered as strings, typically within DDL constructs such as CHECK constraints and indexes (note that "literal bind" values become used by DDL as of :ticket:`2742`). A new method :meth:`.TypeEngine.literal_processor` serves as the base, and :meth:`.TypeDecorator.process_literal_param` is added to allow wrapping of a native literal rendering method. [ticket:2838] - enhance _get_colparams so that we can send flags like literal_binds into INSERT statements - add support in PG for inspecting standard_conforming_strings - add a new series of roundtrip tests based on INSERT of literal plus SELECT for basic literal rendering in dialect suite
* move FAQ to the docs, [ticket:2133]Mike Bayer2013-08-211-0/+2
|
* doc fixMike Bayer2013-07-121-1/+1
|
* The newly added SQLite DATETIME arguments storage_format andMike Bayer2013-07-121-0/+6
| | | | | | | regexp apparently were not fully implemented correctly; while the arguments were accepted, in practice they would have no effect; this has been fixed. Also in 0.8.3. [ticket:2781]
* Added :class:`.BIGINT` to the list of type names that can beMike Bayer2013-07-021-2/+4
| | | | | reflected by the SQLite dialect; courtesy Russell Stuart. [ticket:2764]
* Fix unique constraints reflection in SQLiteRoman Podolyaka2013-06-231-1/+2
| | | | | | | If SQLite keywords are used as column names, they are quoted. The code parsing the information about table unique constraints should be modified so that it properly removes double-quotes from column names.
* Add basic support of unique constraints reflectionpr/4Roman Podolyaka2013-06-091-0/+20
| | | | | | | | | | | | Inspection API already supports reflection of table indexes information and those also include unique constraints (at least for PostgreSQL and MySQL). But it could be actually useful to distinguish between indexes and plain unique constraints (though both are implemented in the same way internally in RDBMS). This change adds a new method to Inspection API - get_unique_constraints() and implements it for SQLite, PostgreSQL and MySQL dialects.
* working through tests....Mike Bayer2013-06-021-0/+1
|
* - add a test specific to sqlite testing cursor.description encoding (shouldMike Bayer2013-05-261-1/+2
| | | | | probably be one in test_query or test_unicode...) - fix up test_unitofwork
* sqlite testsMike Bayer2013-05-261-2/+0
|
* - unicode literals need to just be handled differently if they have utf-8Mike Bayer2013-05-041-1/+1
| | | | | encoded in them vs. unicode escaping. not worth figuring out how to combine these right now
* - the raw 2to3 runMike Bayer2013-04-272-5/+6
| | | | - went through examples/ and cleaned out excess list() calls
* Removes an errant space character that caused a newline break in the sphinx ↵Taavi Burns2013-01-171-1/+1
| | | | output.
* :class:`.Index` now supports arbitrary SQL expressions and/orMike Bayer2013-01-161-12/+2
| | | | | | | | functions, in addition to straight columns. Common modifiers include using ``somecolumn.desc()`` for a descending index and ``func.lower(somecolumn)`` for a case-insensitive index, depending on the capabilities of the target backend. [ticket:695]
* happy new year (see #2645)Diana Clarke2013-01-013-3/+3
|
* this comment is entirely from some ancient version of the codeMike Bayer2012-12-141-2/+0
|
* More adjustment to this SQLite related issue which was released inMike Bayer2012-12-141-28/+39
| | | | | | | 0.7.9, to intercept legacy SQLite quoting characters when reflecting foreign keys. In addition to intercepting double quotes, other quoting characters such as brackets, backticks, and single quotes are now also intercepted. [ticket:2568]
* - version check for sqlite on multivalues is 3.7.11Mike Bayer2012-12-081-0/+3
|
* internally at least refer to multirow as "multivalues", to distinguish betweenMike Bayer2012-12-081-1/+1
| | | | | an INSERT that's used in executemany() as opposed to one which has a VALUES clause with multiple entries.
* compiler: add support for multirow insertsIdan Kamara2012-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | Some databases support this syntax for inserts: INSERT INTO table (id, name) VALUES ('v1', 'v2'), ('v3', 'v4'); which greatly increases INSERT speed. It is now possible to pass a list of lists/tuples/dictionaries as the values param to the Insert construct. We convert it to a flat dictionary so we can continue using bind params. The above query will be converted to: INSERT INTO table (id, name) VALUES (:id, :name), (:id0, :name0); Currently only supported on postgresql, mysql and sqlite.
* just a pep8 pass of lib/sqlalchemy/dialects/sqliteDiana Clarke2012-11-193-128/+161
|
* Merged in agilevic/sqlalchemy (pull request #23)Mike Bayer2012-10-211-0/+2
|\
| * it is sensible to add NCHAR and NVARCHAR as recognized data types for sqlite ↵Victor Olex2012-10-051-0/+2
| | | | | | | | dialect because they are widely used and because of the type affinity mechanism of sqlite
* | - rework the sphinx customizations into distinct modulesMike Bayer2012-10-192-7/+13
| | | | | | | | | | | | | | - build a new Sphinx extension that allows dialect info to be entered as directives which is then rendered consistently throughout all dialect/dbapi sections - break out the "empty_strings" requirement for oracle test
* | - move out maxdbMike Bayer2012-10-181-3/+0
|/ | | | | | - begin consolidating docs for dialects to be more self contained - add a separate section for "external" dialects - not sure how we're going to go with this yet.
* Add support for LOCALTIMESTAMP in SQLite.Richard Mitchell2012-09-261-0/+3
|
* - improve docs for MySQL/SQLite foreign key/ON UPDATE|DELETE instructions,Mike Bayer2012-09-231-0/+36
| | | | [ticket:2514]
* - [bug] Adjusted column default reflection code toMike Bayer2012-09-231-33/+42
| | | | | | | | convert non-string values to string, to accommodate old SQLite versions that don't deliver default info as a string. [ticket:2265] - factor sqlite column reflection to be like we did for postgresql, in a separate method.
* - [bug] Adjusted a very old bugfix which attemptedMike Bayer2012-09-191-4/+6
| | | | | | | | | | | | | | to work around a SQLite issue that itself was "fixed" as of sqlite 3.6.14, regarding quotes surrounding a table name when using the "foreign_key_list" pragma. The fix has been adjusted to not interfere with quotes that are *actually in the name* of a column or table, to as much a degree as possible; sqlite still doesn't return the correct result for foreign_key_list() if the target table actually has quotes surrounding its name, as *part* of its name (i.e. """mytable"""). [ticket:2568]
* some pysqlite doc tweaksMike Bayer2012-08-301-5/+10
|
* -whitespace bonanza, contdMike Bayer2012-07-282-77/+77
|
* Add some `Sphinx` paragraph level versions informations markups,Mike Bayer2012-06-081-6/+4
| | | | such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
* add a note about sqlites lack of concurrency by design, [ticket:2447]Mike Bayer2012-05-171-0/+32
|
* - [feature] Added SQLite execution optionMike Bayer2012-05-041-10/+17
| | | | | | | "sqlite_raw_colnames=True", will bypass attempts to remove "." from column names returned by SQLite cursor.description. [ticket:2475]
* - [feature] Inspector.get_primary_keys() isMike Bayer2012-04-241-2/+2
|\ | | | | | | | | | | | | | | deprecated; use Inspector.get_pk_constraint(). Courtesy Diana Clarke. [ticket:2422] - restored default get_primary_keys()/get_pk_constraint() wrapper to help maintain compatibility with third party dialects created against 0.6 or 0.7
| * deprecate inspector.get_primary_keys() in favor of inspector.get_pk_constraint()Diana Clarke2012-04-021-2/+2
| | | | | | | | - see #2422
* | - [feature] the SQLite date and time typesMike Bayer2012-04-241-43/+85
|\ \ | |/ |/| | | | | | | | | | | | | | | | | have been overhauled to support a more open ended format for input and output, using name based format strings and regexps. A new argument "microseconds" also provides the option to omit the "microseconds" portion of timestamps. Thanks to Nathan Wright for the work and tests on this. [ticket:2363]