summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/schema.py
Commit message (Collapse)AuthorAgeFilesLines
...
* #553 propigate index on copied columnsMike Bayer2007-04-251-3/+3
|
* slight cleanup for #498Mike Bayer2007-04-171-1/+4
|
* - column label and bind param "truncation" also generateMike Bayer2007-03-281-0/+1
| | | | | | | | | | | deterministic names now, based on their ordering within the full statement being compiled. this means the same statement will produce the same string across application restarts and allowing DB query plan caching to work better. - cleanup to sql.ClauseParameters since it was just falling apart, API made more explicit - many unit test tweaks to adjust for bind params not being "pre" truncated, changes to ClauseParameters
* - fixes [ticket:185], join object determines primary key and removesMike Bayer2007-03-271-1/+1
| | | | | | | | columns that are FK's to other columns in the primary key collection. - removed workaround code from query.py get() - removed obsolete inheritance test from mapper - added new get() test to inheritance.py for this particular issue - ColumnCollection has nicer string method
* - preliminary support for unicode table and column names added.Mike Bayer2007-03-271-13/+9
|
* documenting generative methods on queryMike Bayer2007-03-221-3/+3
|
* - MetaData can bind to an engine either via "url" or "engine" kwargsMike Bayer2007-03-221-13/+52
| | | | | | | to constructor, or by using connect() method. BoundMetaData is identical to MetaData except engine_or_url param is required. DynamicMetaData is the same and provides thread-local connections be default.
* integrated docutils formatting into generated documentation;Mike Bayer2007-03-171-12/+12
| | | | restructuredtext fixes throughout docstrings
* some docsMike Bayer2007-03-131-7/+18
|
* - for hackers, refactored the "visitor" system of ClauseElement andMike Bayer2007-03-111-30/+31
| | | | | | | | | | | | | | | SchemaItem so that the traversal of items is controlled by the ClauseVisitor itself, using the method visitor.traverse(item). accept_visitor() methods can still be called directly but will not do any traversal of child items. ClauseElement/SchemaItem now have a configurable get_children() method to return the collection of child elements for each parent object. This allows the full traversal of items to be clear and unambiguous (as well as loggable), with an easy method of limiting a traversal (just pass flags which are picked up by appropriate get_children() methods). [ticket:501] - accept_schema_visitor() methods removed, replaced with get_children(schema_visitor=True) - various docstring/changelog cleanup/reformatting
* - fixed use_alter flag on ForeignKeyConstraint [ticket:503]Mike Bayer2007-03-071-2/+2
|
* migrated (most) docstrings to pep-257 format, docstring generator using ↵Mike Bayer2007-02-251-283/+524
| | | | | | straight <pre> + trim() func for now. applies most of [ticket:214], compliemnts of Lele Gaifax
* - fixes to tometadata() operation to propigate Constraints at column and ↵Mike Bayer2007-02-171-3/+7
| | | | table level
* - fixed generation of CHECK constraints on columns [ticket:464]Mike Bayer2007-02-171-1/+6
|
* - small fix to BoundMetaData to accept unicode or string URLsMike Bayer2007-02-171-1/+1
|
* - added "schema" argument to all has_table() calls, only supported so far by PGMike Bayer2007-02-041-1/+1
| | | | - added basic unit test for PG reflection of tables in an alternate schema
* - added literal_column() to specify a column clause that should not undergo ↵Mike Bayer2007-02-041-3/+3
| | | | | | | any quoting - straight text sent to select() added as literal_column - fix for issue in [ticket:450]
* - more quoting fixes for [ticket:450]...quoting more aggressive (but still ↵Mike Bayer2007-02-041-1/+1
| | | | | | | | skips already-quoted literals) - got mysql to have "format" as default paramstyle even if mysql module not available, allows unit tests to pass in non-mysql system for [ticket:457]. all the dialects should be changed to pass in their usual paramstyle.
* merged the polymorphic relationship refactoring branch in. i want to go ↵Mike Bayer2007-01-281-9/+5
| | | | | | | | | | | | | further on that branch and introduce the foreign_keys argument, and further centralize the "intelligence" about the joins and selectables into PropertyLoader so that lazyloader/sync can be simplified, but the current branch goes pretty far. - relations keep track of "polymorphic_primaryjoin", "polymorphic_secondaryjoin" which it derives from the plain primaryjoin/secondaryjoin. - lazy/eagerloaders work from those polymorphic join objects. - the join exported by PropertyLoader to Query/SelectResults is the polymorphic join, so that join_to/etc work properly. - Query builds itself against the base Mapper again, not the "polymorphic" mapper. uses the "polymorphic" version only as appropriate. this helps join_by/join_to/etc to work with polymorphic mappers. - Query will also adapt incoming WHERE criterion to the polymorphic mapper, i.e. the "people" table becomes the "person_join" automatically. - quoting has been modified since labels made out of non-case-sensitive columns could themselves require quoting..so case_sensitive defaults to True if not otherwise specified (used to be based on the identifier itself). - the test harness gets an ORMTest base class and a bunch of the ORM unit tests are using it now, decreases a lot of redundancy.
* - trying to redefine a reflected primary key column as non-primary key ↵Mike Bayer2007-01-151-0/+7
| | | | raises an error
* copyright updateMike Bayer2007-01-051-1/+1
|
* reversing last commitRick Morrison2006-12-181-4/+2
|
* added missing ref to between in sql.py __all__Rick Morrison2006-12-171-2/+4
|
* docstring fix for [ticket:381]Mike Bayer2006-12-091-0/+5
|
* - added onupdate and ondelete keyword arguments to ForeignKey; propigateMike Bayer2006-12-091-2/+4
| | | | | | to underlying ForeignKeyConstraint if present. (dont propigate in the other direction, however) - patched attribute speed enhancement [ticket:389] courtesy Sébastien Lelong
* - made kwargs parsing to Table strict; removed various obsoluete ↵Mike Bayer2006-11-261-7/+11
| | | | | | | | | | | "redefine=True" kw's from the unit tests - documented instance variables in ANSICompiler - fixed [ticket:120], adds "inline_params" set to ANSICompiler which DefaultDialect picks up on when determining defaults. added unittests to query.py - additionally fixed up the behavior of the "values" parameter on _Insert/_Update - more cleanup to sql/Select - more succinct organization of FROM clauses, removed silly _process_from_dict methods and JoinMarker object
* - cleanup on some instance vars in Select (is_scalar, is_subquery, _froms is ↵Mike Bayer2006-11-251-3/+15
| | | | | | | __froms, removed unused 'nowait', '_text', etc) - cleaned up __repr__ on Column, AbstractTypeEngine - added standalone intersect(_all), except(_all) functions, unit tests illustrating nesting patterns [ticket:247]
* [ticket:374] [ticket:377] [ticket:375], small fix to mutable types unit testMike Bayer2006-11-211-1/+0
|
* removed 'redefine' from docstringMike Bayer2006-11-051-3/+0
|
* updates to oracleMike Bayer2006-10-221-2/+2
| | | | added more ordering to schema collections for better predictability
* renamed Column/ColumnClause "hidden" to "_is_oid"Mike Bayer2006-10-221-9/+7
|
* some docstring stuffMike Bayer2006-10-201-1/+1
|
* if type is None it will be propigated from a ForeignKeyMike Bayer2006-10-171-6/+8
|
* ok, TableClause should be publicMike Bayer2006-10-171-1/+1
|
* reorganizing classnames a bit, flagging "private" classes in the sql package,Mike Bayer2006-10-171-5/+5
| | | | | getting the generated docs to look a little nicer. fixes to extensions, sqlsoup etc. to be compatible with recent API tweaks
* - ForeignKey(Constraint) supports "use_alter=True", to create/drop a foreign keyMike Bayer2006-10-151-2/+5
| | | | via ALTER. this allows circular foreign key relationships to be set up.
* - a fair amount of cleanup to the schema package, removal of ambiguousMike Bayer2006-10-141-239/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods, methods that are no longer needed. slightly more constrained useage, greater emphasis on explicitness. - table_iterator signature fixup, includes fix for [ticket:288] - the "primary_key" attribute of Table and other selectables becomes a setlike ColumnCollection object; is no longer ordered or numerically indexed. a comparison clause between two pks that are derived from the same underlying tables (i.e. such as two Alias objects) can be generated via table1.primary_key==table2.primary_key - append_item() methods removed from Table and Column; preferably construct Table/Column/related objects inline, but if needed use append_column(), append_foreign_key(), append_constraint(), etc. - table.create() no longer returns the Table object, instead has no return value. the usual case is that tables are created via metadata, which is preferable since it will handle table dependencies. - added UniqueConstraint (goes at Table level), CheckConstraint (goes at Table or Column level) fixes [ticket:217] - index=False/unique=True on Column now creates a UniqueConstraint, index=True/unique=False creates a plain Index, index=True/unique=True on Column creates a unique Index. 'index' and 'unique' keyword arguments to column are now boolean only; for explcit names and groupings of indexes or unique constraints, use the UniqueConstraint/Index constructs explicitly. - relationship of Metadata/Table/SchemaGenerator/Dropper has been improved so that the schemavisitor receives the metadata object for greater control over groupings of creates/drops. - added "use_alter" argument to ForeignKey, ForeignKeyConstraint, but it doesnt do anything yet. will utilize new generator/dropper behavior to implement.
* _sort_tables uses local tables [ticket:322]Mike Bayer2006-10-121-1/+1
|
* - the "foreign_key" attribute on Column and ColumnElement in generalMike Bayer2006-10-081-17/+13
| | | | | | | | | is deprecated, in favor of the "foreign_keys" list/set-based attribute, which takes into account multiple foreign keys on one column. "foreign_key" will return the first element in the "foreign_keys" list/set or None if the list is empty. - added a user test to the relationships test, testing various new things this change allows
* fix "no engine found" to raise explicit error, [ticket:326]Mike Bayer2006-10-061-15/+22
|
* rollback last change until we figure out how to check for engine without ↵Mike Bayer2006-10-061-1/+2
| | | | exception
* better error message for unconnected DynamicMetaData [ticket:326]Mike Bayer2006-10-061-1/+6
|
* - fixed condition that occurred during reflection when a primary keyMike Bayer2006-09-301-0/+6
| | | | | column was explciitly overridden, where the PrimaryKeyConstraint would get both the reflected and the programmatic column doubled up
* decruftifyMike Bayer2006-09-281-4/+2
|
* - added autoincrement=True to Column; will disable schema generationMike Bayer2006-09-231-3/+14
| | | | | of SERIAL/AUTO_INCREMENT/identity seq for postgres/mysql/mssql if explicitly set to False. #303
* - ForeignKey reports better error message for column not foundMike Bayer2006-09-221-5/+8
| | | | - change in verbiage when join conditions are figured out (and fail)
* further fixes to case sensitive logicMike Bayer2006-09-041-12/+37
|
* defaults and constraints have optional parentMike Bayer2006-08-311-2/+2
|
* - added case_sensitive argument to MetaData, Table, Column, determinesMike Bayer2006-08-311-27/+67
| | | | | | | | | | | | itself automatically based on if a parent schemaitem has a non-None setting for the flag, or if not, then whether the identifier name is all lower case or not. when set to True, quoting is applied to identifiers with mixed or uppercase identifiers. quoting is also applied automatically in all cases to identifiers that are known to be reserved words or contain other non-standard characters. various database dialects can override all of this behavior, but currently they are all using the default behavior. tested with postgres, mysql, sqlite. needs more testing with firebird, oracle, ms-sql. part of the ongoing work with [ticket:155]
* - deregister Table from MetaData when autoload fails; [ticket:289]Mike Bayer2006-08-281-4/+8
|