summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/schema.py
Commit message (Collapse)AuthorAgeFilesLines
...
* - Gave DDL() statements the same .bind treatment as the DML ones in r4220Jason Kirtland2008-03-041-5/+33
|
* - whitespace/docstring/linewrap freakoutJason Kirtland2008-03-041-258/+288
|
* fixing recent schema.py changes to work with oracle 'owner' attributerel_0_4_3Mike Bayer2008-02-141-3/+9
|
* - Table columns and constraints can be overridden on aMike Bayer2008-02-101-21/+49
| | | | | | | | an existing table (such as a table that was already reflected) using the 'useexisting=True' flag, which now takes into account the arguments passed along with it. - fixed one element of [ticket:910] - refactored reflection test
* - Added deferrability support to constraintsJason Kirtland2008-02-081-9/+29
|
* - Added free-form `DDL` statements, can be executed standalone or tied to ↵Jason Kirtland2008-02-051-55/+329
| | | | | | the DDL create/drop lifecycle of Tables and MetaData. [ticket:903] - Added DDL event hooks, triggers callables before and after create / drop.
* - ColumnDefault callables can now be any kind of compliant callable, ↵Jason Kirtland2008-02-041-16/+34
| | | | previously only actual functions were allowed.
* - Friendlier exception messages for unbound, implicit executionJason Kirtland2008-01-311-2/+18
| | | | - Implicit binding failures now raise UnboundExecutionError
* happy new yearMike Bayer2008-01-011-1/+1
|
* introductory docstring bonanzaMike Bayer2007-12-181-9/+17
|
* a little pre-lunch decrufting and cleanupMike Bayer2007-12-181-6/+9
|
* - cleanup; lambdas removed from properties; properties mirror same-named ↵Mike Bayer2007-12-181-107/+61
| | | | | | functions (more like eventual decorator syntax); remove some old methods, factor out some "raiseerr" ugliness to outer lying functions. - corresponding_column() integrates "require_embedded" flag with other set arithmetic
* - more query testsMike Bayer2007-12-101-9/+12
| | | | | | | | | - trying to refine some of the adaptation stuff - query.from_statement() wont allow further generative criterion - added a warning to columncollection when selectable is formed with conflicting columns (only in the col export phase) - some method rearrangement on schema/columncollection.... - property conflicting relation warning doesnt raise for concrete
* - named_with_column becomes an attributeMike Bayer2007-11-251-1/+1
| | | | | | | | | - cleanup within compiler visit_select(), column labeling - is_select() removed from dialects, replaced with returns_rows_text(), returns_rows_compiled() - should_autocommit() removed from dialects, replaced with should_autocommit_text() and should_autocommit_compiled() - typemap and column_labels collections removed from Compiler, replaced with single "result_map" collection. - ResultProxy uses more succinct logic in combination with result_map to target columns
* - decruftify old visitors used by orm, convert to functions thatMike Bayer2007-11-241-2/+1
| | | | | | use a common traversal function. - TranslatingDict is finally gone, thanks to column.proxy_set simpleness...hooray ! - shoved "slice" use case on RowProxy into an exception case. knocks noticeable time off of large result set operations.
* cut down a good deal of Join construction overheadMike Bayer2007-11-181-5/+9
|
* logging fixesMike Bayer2007-11-181-4/+4
|
* Create a storage field for arbitrary info on tables/columns; ticket #573Paul Johnston2007-11-061-2/+21
|
* - base_columns on ColumnElement becomes a list; as usual, because columns in ↵Mike Bayer2007-11-051-55/+38
| | | | | | | | | | | | | | | | CompoundSelects may extend from more than one root column. - keys_ok argument from corresponding_column() removed. no more name-based matching of columns anywhere. - DictDecorator is gone. all row translators provided by orm.util.create_row_adapter(). Mapper and contains_alias() cache the adapters on target mapper to avoid re-computation of adapters. - create_row_adapter() accepts an "equivalent_columns" map as produced by Mapper, so that row adapters can take join conditions into account (as usual again, to help with the CompoundSelects produced by polymorphic_union). - simplified TableSingleton to just provide lookup; moved all initialization into Table. - the "properties" accessor on Mapper is removed; it now throws an informative exception explaining the usage of mapper.get_property() and mapper.iterate_properties
* - rewrote and simplified the system used to "target" columns acrossMike Bayer2007-11-051-8/+3
| | | | | | | | | | | | | | | | | | selectable expressions. On the SQL side this is represented by the "corresponding_column()" method. This method is used heavily by the ORM to "adapt" elements of an expression to similar, aliased expressions, as well as to target result set columns originally bound to a table or selectable to an aliased, "corresponding" expression. The new rewrite features completely consistent and accurate behavior. - the "orig_set" and "distance" elements as well as all associated fanfare are gone (hooray !) - columns now have an optional "proxies" list which is a list of all columns they are a "proxy" for; only CompoundSelect cols proxy more than one column (just like before). set operations are used to determine lineage. - CompoundSelects (i.e. unions) only create one public-facing proxy column per column name. primary key collections come out with just one column per embedded PK column. - made the alias used by eager load limited subquery anonymous.
* - Sequences gain a basic dialect-specific kwargs bucket, like Tables.Jason Kirtland2007-10-041-3/+10
|
* Make the postgres_where attribute to Index private to postgres module by ↵Ants Aasma2007-10-011-1/+3
| | | | using a kwargs attribute on the Index.
* - added partial index support for postgresAnts Aasma2007-09-291-1/+4
| | | | - fixed create and drop methods on MockConnection
* - added "schema" argument to Sequence; use this with Postgres /Oracle when ↵Mike Bayer2007-09-221-1/+2
| | | | | | the sequence is located in an alternate schema. Implements part of [ticket:584], should fix [ticket:761].
* - added 'passive_deletes="all"' flag to relation(), disables allMike Bayer2007-09-091-0/+3
| | | | | | | nulling-out of foreign key attributes during a flush where the parent object is deleted. - fix to FK compile fix from yesterday
* [ticket:728] foreign key checks for existing reflected FK and replaces itselfMike Bayer2007-09-081-1/+9
|
* Adjusted ColumnDefault default function fitness check to only insure that a ↵Jason Kirtland2007-08-221-3/+7
| | | | given function had no more than one non-defaulted positional arg.
* - method call removalMike Bayer2007-08-201-31/+10
|
* 1. Module layout. sql.py and related move into a package called "sql".Mike Bayer2007-08-181-14/+17
| | | | | | | | | | | | 2. compiler names changed to be less verbose, unused classes removed. 3. Methods on Dialect which return compilers, schema generators, identifier preparers have changed to direct class references, typically on the Dialect class itself or optionally as attributes on an individual Dialect instance if conditional behavior is needed. This takes away the need for Dialect subclasses to know how to instantiate these objects, and also reduces method overhead by one call for each one. 4. as a result of 3., some internal signatures have changed for things like compiler() (now statement_compiler()), preparer(), etc., mostly in that the dialect needs to be passed explicitly as the first argument (since they are just class references now). The compiler() method on Engine and Connection is now also named statement_compiler(), but as before does not take the dialect as an argument. 5. changed _process_row function on RowProxy to be a class reference, cuts out 50K method calls from insertspeed.py
* fix hasattr typo [ticket:744]Jason Kirtland2007-08-151-1/+1
|
* mass has_key->__contains__ migration, [ticket:738]Mike Bayer2007-08-151-1/+1
|
* - case_sensitive=(True|False) setting removed from schema items, sinceMike Bayer2007-08-111-86/+3
| | | | | | | checking this state added a lot of method call overhead and there was no decent reason to ever set it to False. Table and column names which are all lower case will be treated as case-insenstive (yes we adjust for Oracle's UPPERCASE style too).
* Correct docstring.Jason Kirtland2007-08-101-1/+1
|
* switch (simple) occurences of 'if len(x)' to 'if x': find . -name '*.py' ↵Jonathan Ellis2007-08-031-2/+2
| | | | |xargs perl -pi.bak -e 's/if len\((\S+)\):/if $1:/' && find . -name '*.bak' |xargs rm
* ThreadLocalMetaData ought not .dispose() a ConnectionJason Kirtland2007-08-011-51/+63
| | | | More docstring changes
* MetaData can now reflect() all tables in the database en-masse thanks to ↵Jason Kirtland2007-07-311-98/+259
| | | | | | | | | | | table_names(). table_names changed to accept an explicit connection ThreadLocalMetaData constructor now takes no arguments. If case_sensitive is needed in a multi-bind context, move it to Table or subclass TLMD to force it. Banished **kwargs from MetaData Lots of class doc and docstring improvements around MetaData and TLMD. Some engine->bind internal naming updates + reorg in schema. MySQL table_names now return Unicode. (Also, a unicode reflect() unit test is needed.)
* add warnings for deprecated methods and optionsJonathan Ellis2007-07-301-7/+10
|
* - added Session constructor which turns autoflush/transactional onMike Bayer2007-07-291-1/+1
| | | | | | | - Session is used by unitofwork unit test now as well as session.py tests - fixes to table/schema reflection broken last night - doc updates - other unittest fixes
* clearer error for ForeignKey cant locate parent table, [ticket:565]Mike Bayer2007-07-291-1/+6
|
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-256/+119
| | | | maintenance branch in branches/rel_0_3.
* - foreign key specs can have any chararcter in their identifiersMike Bayer2007-07-181-1/+1
| | | | [ticket:667]
* bind/connectable compat, allow .bind = NoneJason Kirtland2007-07-171-2/+0
| | | | fix import for DBAPIError raise
* - improved ability to get the "correct" and most minimal set of primary keyMike Bayer2007-07-141-10/+32
| | | | | | | columns from a join, equating foreign keys and otherwise equated columns. this is also mostly to help inheritance scenarios formulate the best choice of primary key columns. [ticket:185] - added 'bind' argument to Sequence.create()/drop(), ColumnDefault.execute()
* - the various "engine" arguments, such as "engine", "connectable",Mike Bayer2007-07-121-58/+102
| | | | | | | | | "engine_or_url", "bind_to", etc. are all present, but deprecated. they all get replaced by the single term "bind". you also set the "bind" of MetaData using metadata.bind = <engine or connection>. this is part of 0.4 forwards compatibility where "bind" is the only keyword. [ticket:631]
* changed "_source_column" to simpler "_distance"Mike Bayer2007-07-101-1/+1
|
* more "column targeting" enhancements..columns have a "depth" from their ↵Mike Bayer2007-07-101-1/+1
| | | | ultimate source column so that corresponding_column() can find the column that is "closest" (i.e. fewest levels of proxying) to the requested column
* - ForeignKey to a table in a schema thats not the default schemaMike Bayer2007-07-081-1/+1
| | | | | | requires the schema to be explicit; i.e. ForeignKey('alt_schema.users.id') - the fix in "schema" above fixes postgres reflection of foreign keys from an alt-schema table to a public schema table
* Tweak docs, very minor DMD compatability tweakJason Kirtland2007-07-061-1/+1
|
* - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData insteadJason Kirtland2007-07-061-38/+66
| | | | | - Deprecated BoundMetaData- use MetaData instead - Removed DMD and BMD from documentation
* - MetaData and all SchemaItems are safe to use with pickle. slowMike Bayer2007-06-301-0/+9
| | | | | table reflections can be dumped into a pickled file to be reused later. Just reconnect the engine to the metadata after unpickling. [ticket:619]