summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/schema.py
Commit message (Collapse)AuthorAgeFilesLines
* Add some `Sphinx` paragraph level versions informations markups,Mike Bayer2012-06-081-1/+2
| | | | such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
* copyrightMike Bayer2012-05-051-1/+1
|
* - Added an informative error message whenMike Bayer2011-07-211-1/+7
| | | | | | | | | ForeignKeyConstraint refers to a column name in the parent that is not found. - add tests for [ticket:2226], as if we hit each @declared_attr directly with obj.__get__(obj, name) instead of using getattr(cls, name). Basic inheritance mechanics are improperly used in this case, so 2226 is invalid.
* - Fixed bug whereby if FetchedValue was passedMike Bayer2011-04-231-1/+1
| | | | | | | to column server_onupdate, it would not have its parent "column" assigned, added test coverage for all column default assignment patterns. [ticket:2147]
* merge doc fixes from 0.7Mike Bayer2011-04-161-3/+40
|
* - Column.copy(), as used in table.tometadata(), copies theMike Bayer2011-01-301-0/+1
| | | | 'doc' attribute. [ticket:2028]
* - CheckConstraint will copy its 'initially', 'deferrable',Mike Bayer2011-01-081-1/+5
| | | | | and '_create_rule' attributes within a copy()/tometadata() [ticket:2000]
* -whitespace removal bonanzaMike Bayer2011-01-021-164/+164
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-3/+2
| | | | | a consistent tag - AUTHORS file
* - The 'info' attribute of Column is copied duringMike Bayer2010-11-141-0/+1
| | | | | Column.copy(), i.e. as occurs when using columns in declarative mixins. [ticket:1967]
* - move inline "import" statements to use new "util.importlater()" construct. ↵Mike Bayer2010-11-131-13/+6
| | | | | | | | | cuts down on clutter, timeit says there's a teeny performance gain, at least where the access is compared against attr.subattr. these aren't super-critical calls anyway - slight inlining in _class_to_mapper
* - added "views=True" option to metadata.reflect(),Mike Bayer2010-10-021-2/+10
| | | | | will add the list of available views to those being reflected. [ticket:1936]
* - An informative error message is raised if a ColumnMike Bayer2010-09-181-0/+4
| | | | | | | | | which has not yet been assigned a name, i.e. as in declarative, is used in a context where it is exported to the columns collection of an enclosing select() construct, or if any construct involving that column is compiled before its name is assigned. [ticket:1862]
* - use "key in dict" rather than KeyError if the usual caseMike Bayer2010-09-181-37/+28
| | | | | | | | is that the key is not present. - don't need to uniquify Index schemes, just don't copy Indexes that were known to be generated from the index=True flag - user facing changes go in CHANGES - Table.c allows string lookup
* add warning about dodgy use of tometadataChris Withers2010-09-161-1/+5
|
* tometadata now copies indexes as wellChris Withers2010-09-161-1/+22
|
* make sure kwargs are copied by tometadataChris Withers2010-09-161-1/+1
|
* roughly the finished product.Mike Bayer2010-09-041-2/+2
|
* almost through.Mike Bayer2010-09-041-5/+67
|
* get slightly better about deprecations in docstrings, tho this is kind of an ↵Mike Bayer2010-08-091-2/+9
| | | | uphill climb
* - Fixed bug whereby replacing composite foreign keyMike Bayer2010-08-041-1/+5
| | | | | | | | columns in a reflected table would cause an attempt to remove the reflected constraint from the table a second time, raising a KeyError. [ticket:1865] - fixed test of error message now that we've improved it (didn't know that msg had an assertion)
* - Added full description of parent table/column,Mike Bayer2010-08-031-2/+3
| | | | | target table/column in error message raised when ForeignKey can't resolve target.
* - add an example of declarative with hybrid, including why thisMike Bayer2010-08-021-5/+37
| | | | | is a different use case (i.e. formalized apps vs. quickstart). - solidified docstrings for ForeignKey
* - Changed the scheme used to generate truncatedMike Bayer2010-07-211-1/+1
| | | | | | | | | | | | "auto" index names when using the "index=True" flag on Column. The truncation only takes place with the auto-generated name, not one that is user-defined (an error would be raised instead), and the truncation scheme itself is now based on a fragment of an md5 hash of the identifier name, so that multiple indexes on columns with similar names still have unique names. [ticket:1855]
* - more 78 charsMike Bayer2010-07-101-174/+223
| | | | | - BIGINT doc - clean up docs in schema.py
* - Column.copy() takes along the "unique" attributeMike Bayer2010-06-151-0/+1
| | | | | among others, fixes [ticket:1829] regarding declarative mixins
* disclaimer for the "type=None" semi-featureMike Bayer2010-05-151-3/+5
|
* - Added table.add_is_dependent_on(othertable), allows manualMike Bayer2010-05-131-0/+15
| | | | | | placement of dependency rules between two Table objects for use within create_all(), drop_all(), sorted_tables. [ticket:1801]
* - the _make_proxy() method of ColumnClause and Column now useMike Bayer2010-05-101-1/+1
| | | | | | | self.__class__ to determine the class of object to be returned instead of hardcoding to ColumnClause/Column, making it slightly easier to produce specific subclasses of these which work in alias/subquery situations.
* - Fixed "table" argument on constructor of ForeginKeyConstraintMike Bayer2010-04-261-1/+1
| | | | [ticket:1571]
* - Table.create() and Table.drop() no longer apply metadata-Mike Bayer2010-04-161-2/+10
| | | | level create/drop events. [ticket:1771]
* - The ORM will set the docstring of all generated descriptorsMike Bayer2010-04-021-0/+5
| | | | | | | | | to None by default. This can be overridden using 'doc' (or if using Sphinx, attribute docstrings work too). - Added kw argument 'doc' to all mapper property callables as well as Column(). Will assemble the string 'doc' as the '__doc__' attribute on the descriptor.
* - the copy() method of Column now copies over uninitializedMike Bayer2010-03-111-2/+5
| | | | | "on table attach" events. Helps with the new declarative "mixin" capability.
* -remove proof of concept "cascade constraints"Mike Bayer2010-02-281-4/+0
|
* Added the ability to strip the schema when using tometadata by passing ↵Michael Trier2010-02-251-2/+4
| | | | schema=None as an argument. Fixes #1673.
* - "out" parameters require a type that is supported byMike Bayer2010-02-231-1/+6
| | | | | | | | cx_oracle. An error will be raised if no cx_oracle type can be found. - Column() requires a type if it has no foreign keys (this is not new). An error is now raised if a Column() has no type and no foreign keys. [ticket:1705]
* - added util.portable_instancemethod to provide a quick way to make an ↵Mike Bayer2010-02-221-3/+14
| | | | | | | | | | instancemethod "serializable" - SchemaType and subclasses Boolean, Enum are now serializable, including their ddl listener and other event callables. [ticket:1694] [ticket:1698] - AddConstraint/DropConstraint use the wrapper for _create_rule - added test coverage for AddConstraint override of _create_rule
* - Made sqlalchemy.sql.expressions.Executable part of publicMike Bayer2010-02-121-2/+2
| | | | | | | | | | | API, used for any expression construct that can be sent to execute(). FunctionElement now inherits Executable so that it gains execution_options(), which are also propagated to the select() that's generated within execute(). Executable in turn subclasses _Generative which marks any ClauseElement that supports the @_generative decorator - these may also become "public" for the benefit of the compiler extension at some point.
* - the "connection" argument from engine.transaction() andMike Bayer2010-01-291-3/+1
| | | | | | | engine.run_callable() is removed - Connection itself now has those methods. All four methods accept *args and **kwargs which are passed to the given callable, as well as the operating connection.
* - the "autocommit" flag on select() and text() as wellMike Bayer2010-01-281-1/+2
| | | | | | as select().autocommit() are deprecated - now call .execution_options(autocommit=True) on either of those constructs, also available directly on Connection and orm.Query.
* - reorganized and re-documented Oracle schema tests to assumeMike Bayer2010-01-171-7/+13
| | | | | | | | | test user has DBA privs, and all objects can be created /dropped. - added ORDER BY to oracle column listing - Oracle all_tables always limits to current user if schema not given. - views reflect - added documentation + a unit test for this. - Table(autoload) with no bind produces an error message specific to the fact that autoload_with should be the first option to try.
* - added "statement_options()" to Query, to so options can beMike Bayer2010-01-161-2/+1
| | | | | | | | | | | | | | | | | | | | | passed to the resulting statement. Currently only Select-statements have these options, and the only option used is "stream_results", and the only dialect which knows "stream_results" is psycopg2. - Query.yield_per() will set the "stream_results" statement option automatically. - Added "statement_options()" to Selects, which set statement specific options. These enable e.g. dialect specific options such as whether to enable using server side cursors, etc. - The psycopg2 now respects the statement option "stream_results". This option overrides the connection setting "server_side_cursors". If true, server side cursors will be used for the statement. If false, they will not be used, even if "server_side_cursors" is true on the connection. [ticket:1619] - added a "frozendict" from http://code.activestate.com/recipes/414283/, adding more default collections as immutable class vars on Query, Insert, Select
* happy new yearMike Bayer2010-01-071-1/+1
|
* merge r6616 of 0.5 branch, allow DefaultGenerators as "default" and "onupdate"Mike Bayer2010-01-071-1/+4
|
* - clarify ForeignKey docs, copy operationMike Bayer2010-01-021-8/+46
| | | | - link all classes/functions in expressions
* - The copy() method on Column now supports uninitialized,Mike Bayer2010-01-021-7/+9
| | | | | | unnamed Column objects. This allows easy creation of declarative helpers which place common columns on multiple subclasses (merged from 0.5 with changes).
* - Column() supports a keyword argument "sqlite_autoincrement", whichMike Bayer2009-12-181-1/+2
| | | | | | | | applies the SQLite keyword "AUTOINCREMENT" to columns within DDL - will prevent generation of a separate PRIMARY KEY constraint. [ticket:1016] - added docs - fixed underlines in mysql.rst
* - The Boolean type, when used on a backend that doesn'tMike Bayer2009-12-061-72/+84
| | | | | | | | | | have native boolean support, will generate a CHECK constraint "col IN (0, 1)" along with the int/smallint- based column type. This can be switched off if desired with create_constraint=False. Note that MySQL has no native boolean *or* CHECK constraint support so this feature isn't available on that platform. [ticket:1589]
* - reworked the DDL generation of ENUM and similar to be more platform agnostic.Mike Bayer2009-12-061-20/+31
| | | | | | | Uses a straight CheckConstraint with a generic expression. Preparing for boolean constraint in [ticket:1589] - CheckConstraint now accepts SQL expressions, though support for quoting of values will be very limited. we don't want to get into formatting dates and such.
* - subclassed Function off of new FunctionElement generic baseMike Bayer2009-11-101-38/+39
| | | | | | - removed "key" accessor of Function, Grouping - this doesn't seem to be used for anything - various formatting - documented the four "Element" classes in the compiler extension as per [ticket:1590]