summaryrefslogtreecommitdiff
path: root/test/sql
Commit message (Collapse)AuthorAgeFilesLines
...
* | - reinstate insert returning back into test_insert.py; defaultdialectMike Bayer2013-04-012-4/+10
| | | | | | | | needs to be explicit here since tablestest sticks testing.db onto metadata.bind
* | moving insert returning test back into CRUD test class until I figure out ↵Diana Clarke2013-03-302-7/+5
| | | | | | | | why moving it broke the oracle/postgres builds
* | whitespaceDiana Clarke2013-03-301-3/+3
| |
* | move the update tests from CRUDTest into sql/test_update.py (see #2630)Diana Clarke2013-03-302-105/+173
| |
* | fixing tests for --db=mysql: VARCHAR requires a length on dialect mysqlDiana Clarke2013-03-302-6/+6
| |
* | starting on the update tests next, pep8 pass first (see #2630)Diana Clarke2013-03-302-301/+272
| |
* | move the insert tests from CRUDTest into sql/test_insert.py (see #2630)Diana Clarke2013-03-292-219/+310
| |
* | move the delete tests from CRUDTest into sql/test_delete.py (see #2630)Diana Clarke2013-03-292-46/+87
| |
* | fix syntax errorMike Bayer2013-03-241-1/+1
| |
* | Fixed bug whereby a DBAPI that can return "0"Mike Bayer2013-03-231-1/+18
|/ | | | | for cursor.lastrowid would not function correctly in conjunction with :attr:`.ResultProxy.inserted_primary_key`.
* merge plus fix the test spelling tooMike Bayer2013-03-181-2/+2
|
* - auto-append for CheckConstraint should skip table if the expression is againstMike Bayer2013-03-091-0/+13
| | | | a lower-case-t table
* - remove all compat items that are pre-2.5 (hooray)Mike Bayer2013-03-092-2/+1
| | | | | | - other cleanup - don't need compat.decimal, that approach never panned out. hopefully outside libs aren't pulling it in, they shouldn't be
* - this test is ridiculous, executemany() + returning not supportedMike Bayer2013-03-091-20/+0
|
* - the base correlate tests in test_compiler cover the ones that were hereMike Bayer2013-03-091-127/+79
| | | | | for now - fix up adaptation tests to still try to exercise the correlation argument
* - since correlation is now always at least semi-automatic, remove theMike Bayer2013-03-091-33/+241
| | | | | | ability for correlation to have any effect for a SELECT that's stated in the FROM. - add a new exhaustive test suite for correlation to test_compiler
* go back to the original form, then break out this test into individualsMike Bayer2013-03-081-53/+115
| | | | so it can be managed more easily
* Changed behavior of Select.correlate() to ignore correlations to froms that ↵Luke Cyca2013-03-072-42/+53
| | | | don't exist in the superquery.
* Merged in nakagami/sqlalchemy/cymysql (pull request #42)Mike Bayer2013-03-071-0/+10
|\ | | | | | | cymysql support
| * mysql+cymysql test_types.pyHajime Nakagami2013-03-061-0/+10
| |
| * not return unicode string in cymysql dialectHajime Nakagami2013-03-021-1/+0
| |
| * test for cymysqlHajime Nakagami2013-02-171-0/+1
| |
* | - :meth:`.MetaData.create_all` and :meth:`.MetaData.drop_all` willMike Bayer2013-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | now accommodate an empty list as an instruction to not create/drop any items, rather than ignoring the collection. [ticket:2664]. This is a behavioral change and extra notes to the changelog and migration document have been added. - create a new test suite for exercising codepaths in engine/ddl.py
* | - some linter cleanup, though have disabled the newer linter rules which are ↵Mike Bayer2013-03-021-40/+45
|/ | | | | | just too much for now
* port numeric tests to dialect suiteMike Bayer2013-02-061-162/+0
|
* - add support for pulling in an external requirements fileMike Bayer2013-02-061-9/+14
| | | | - start filling in default versions of remaining requirements that are still only in test/
* - add an "empty_inserts" requirement target plus a suite testMike Bayer2013-02-061-3/+3
| | | | - add suite tests for basic explicit Sequence support, result-row column access (tests that name_normalize is set correctly among many other things)
* Fixed a bug regarding column annotations which in particularMike Bayer2013-02-021-0/+31
| | | | | | | | could impact some usages of the new :func:`.orm.remote` and :func:`.orm.local` annotation functions, where annotations could be lost when the column were used in a subsequent expression. [ticket:2660]
* cleanup and pep8Mike Bayer2013-02-021-56/+52
|
* The :meth:`.ColumnOperators.in_` operator will now coerceMike Bayer2013-02-021-0/+6
| | | | | values of ``None`` to :func:`.null`. [ticket:2496]
* Added a new argument to :class:`.Enum` and its baseMike Bayer2013-02-011-1/+98
| | | | | | | | | | | | :class:`.SchemaType` ``inherit_schema``. When set to ``True``, the type will set its ``schema`` attribute of that of the :class:`.Table` to which it is associated. This also occurs during a :meth:`.Table.tometadata` operation; the :class:`.SchemaType` is now copied in all cases when :meth:`.Table.tometadata` happens, and if ``inherit_schema=True``, the type will take on the new schema name passed to the method. The ``schema`` is important when used with the Postgresql backend, as the type results in a ``CREATE TYPE`` statement. [ticket:2657]
* Fixed bug where :meth:`.Table.tometadata` would fail if aMike Bayer2013-01-271-0/+12
| | | | | | :class:`.Column` had both a foreign key as well as an alternate ".key" name for the column. Also in 0.7.10. [ticket:2643]
* #2629Mike Bayer2013-01-251-0/+8
| | | | | insert().returning() raises an informative CompileError if attempted to compile on a dialect that doesn't support RETURNING.
* :class:`.Index` now supports arbitrary SQL expressions and/orMike Bayer2013-01-161-1/+65
| | | | | | | | 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]
* - preparing for #695, modernize constraint/index testsMike Bayer2013-01-161-192/+371
|
* Fixed a regression caused by :ticket:`2410` whereby aMike Bayer2012-12-111-0/+39
| | | | | | | | | :class:`.CheckConstraint` would apply itself back to the original table during a :meth:`.Table.tometadata` operation, as it would parse the SQL expression for a parent table. The operation now copies the given expression to correspond to the new table. [ticket:2633]
* Fixed bug where using server_onupdate=<FetchedValue|DefaultClause>Mike Bayer2012-12-081-0/+31
| | | | | | | | | | without passing the "for_update=True" flag would apply the default object to the server_default, blowing away whatever was there. The explicit for_update=True argument shouldn't be needed with this usage (especially since the documentation shows an example without it being used) so it is now arranged internally using a copy of the given default object, if the flag isn't set to what corresponds to that argument. Also in 0.7.10. [ticket:2631]
* Fixed bug whereby using a label_length on dialect that was smallerMike Bayer2012-12-081-0/+43
| | | | | | than the size of actual column identifiers would fail to render the columns correctly in a SELECT statement. [ticket:2610]
* - refactor test_labels into all compiler/defaultdialect testsMike Bayer2012-12-081-264/+297
|
* attempt to hide these from 2to3Mike Bayer2012-12-081-3/+3
|
* internally at least refer to multirow as "multivalues", to distinguish betweenMike Bayer2012-12-083-8/+8
| | | | | an INSERT that's used in executemany() as opposed to one which has a VALUES clause with multiple entries.
* - multivalued inserts, [ticket:2623]Mike Bayer2012-12-084-34/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - update "not supported" messages for empty inserts, mutlivalue inserts - rework the ValuesBase approach for multiple value sets so that stmt.parameters does store a list for multiple values; the _has_multiple_parameters flag now indicates which of the two modes the statement is within. it now raises exceptions if a subsequent call to values() attempts to call a ValuesBase with one mode in the style of the other mode; that is, you can't switch a single- or multi- valued ValuesBase to the other mode, and also if a multiple value is passed simultaneously with a kwargs set. Added tests for these error conditions - Calling values() multiple times in multivalue mode now extends the parameter list to include the new parameter sets. - add error/test if multiple *args were passed to ValuesBase.values() - rework the compiler approach for multivalue inserts, back to where _get_colparams() returns the same list of (column, value) as before, thereby maintaining the identical number of append() and other calls when multivalue is not enabled. In the case of multivalue, it makes a last-minute switch to return a list of lists instead of the single list. As it constructs the additional lists, the inline defaults and other calculated default parameters of the first parameter set are copied into the newly generated lists so that these features continue to function for a multivalue insert. Multivalue inserts now add no additional function calls to the compilation for regular insert constructs. - parameter lists for multivalue inserts now includes an integer index for all parameter sets. - add detailed documentation for ValuesBase.values(), including careful wording to describe the difference between multiple values and an executemany() call. - add a test for multivalue insert + returning - it works ! - remove the very old/never used "postgresql_returning"/"firebird_returning" flags.
* merge latest defaultMike Bayer2012-12-083-1/+72
|\
| * visit_DECIMAL should include precision and scale (when provided) just like ↵Diana Clarke2012-12-031-0/+17
| | | | | | | | visit_NUMERIC see #2618
| * - BinaryExpression now keeps track of "left" and "right" as passed in,Mike Bayer2012-12-022-1/+55
| | | | | | | | | | so that they can be compared in ``__nonzero__`` prior to their self_group() step. [ticket:2621]
* | compiler: add support for multirow insertsIdan Kamara2012-12-062-0/+26
|/ | | | | | | | | | | | | | | | | | | | | 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.
* - adjust this test for the ugly reality of the "name normalize" backends, ↵Mike Bayer2012-11-231-2/+16
| | | | | | | | where because we've decided that "lowercase" is the case insensitive casing, we can't distinguish between case insensitive/not on a database that returns case-insensitive names as UPPERCASE, for names that are UPPERCASE. [ticket:2615]
* just a pep8 pass before I play with these testsDiana Clarke2012-11-232-143/+207
|
* second pass: increasing coverage, and commenting the "why" certain things ↵Diana Clarke2012-11-221-140/+357
| | | | are being tested (when I know) b/c it wasn't initially clear to me why case was being toggled everywhere, etc.
* first pass cleaning up test_labels #2610Diana Clarke2012-11-211-81/+212
|