| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
WHERE clause
|
| |
|
|
|
|
|
| |
- PropertyLoader figures out accurate remote_side collection based
on foreign_keys, legacy foreignkey, primary/secondaryjoin/polymorphic
- reworked lazyloader, sync to work straight off foreign_keys/
remote_side collections
|
| |
|
|
|
|
|
| |
any quoting
- straight text sent to select() added as literal_column
- fix for issue in [ticket:450]
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
kinds of clauses can express if they are appropriate for executing...such as,
you can execute a "select", but not a "Table" or a "Join".
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
key, since
the name is meaningful with regards to SQL relationships, the key is not
- adjustments to the recent polymorphic relationship refactorings, specifically
for many-to-one relationships to polymorphic unions that did not contain the
base table [ticket:439]. the lazy/eager clause adaption to the selectable
will match up on straight column names (i.e. its a more liberal policy)
- lazy loader will not attempt to adapt the clause to the selectable if
loads_polymorphic is not enabled, since the more liberal policy of adapting
columns fails for more elaborate join conditions
- will have to see if ppl want to do complex joins with polymorphic relations...
may have to add "polymorphic_primaryjoin" in that case as a last resort (would make
working around these issues a snap, tho...)
|
| |
|
|
|
|
|
|
| |
the "foreignkey" of the relationship with the "primaryjoin". the column match now
must be exact, not just "corresponding". this enables self-referential relationships on a
polymorphic mapper.
- a little bit of improvement to the concept of a "concrete" inheritance mapping, though that concept
is not well fleshed out yet (added test case to support concrete mappers on top of a polymorphic base).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
boolean
expressions can also follow column-clause behaviors (i.e. label(), etc).
- query.select() had to become more picky about what it considers to be a full "selectable"
and what it considers to be a fragment that represents a WHERE criterion - looks for the presence
of a FromClause now (which is still pretty liberal, since i originally intended the check to be
for select() only). the previous exception-catch method also added a little stack tracing
overhead anyway.
|
| |
|
|
|
| |
element will *not* correlate that single element, since at least one FROM element is
required in a query.
|
| |
|
|
|
|
|
| |
- mapper sets its "primary_key" attribute to be the ultimately decided primary_key column collection post-compilation
- added compare() method to MapperProperty, defines a comparison operation of the columns represented by the property to some value
- all the above combines into today's controversial feature: saying query.select_by(somerelationname=someinstance) will create the join of the primary key columns represented by "somerelationname"'s mapper to the actual primary key in "someinstance".
- docs for the above
|
| |
|
|
|
|
|
| |
"comparison".
the difference is, an operation produces a BinaryExpression from which further operations
can occur whereas comparison produces the more restrictive BooleanExpression
|
| | |
|
| |
|
|
|
|
| |
is constructed with individual calls to append_column(); this fixes an ORM
bug whereby nested select statements were not getting correlated with the
main select generated by the Query object.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
selects; only one selectable to an IN is allowed now (make a union yourself
if union is needed; explicit better than implicit, dont guess, etc.)
|
| |
|
|
| |
that has scalar=True
|
| |
|
|
|
|
|
|
|
|
|
| |
"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
|
| | |
|
| |
|
|
|
|
|
| |
__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]
|
| |
|
|
| |
just a continue
|
| | |
|
| |
|
|
| |
added more ordering to schema collections for better predictability
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
getting the generated docs to look a little nicer.
fixes to extensions, sqlsoup etc. to be compatible with recent API tweaks
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
behavior should be the same, except now you can also do things like
select(['*'], from_obj=[func.my_function()]) to get multiple
columns from the result, or even use sql.column() constructs to name the
return columns [ticket:172]. generally only postgres understands the
syntax (and possibly oracle).
|
| |
|
|
|
|
|
|
| |
Query/eagerloading/SelectResults
- EagerLoader looks more carefully for the correct Table/Join/FromClause to bind its outer join onto
- sqlite boolean datatype converts bind params from python booleans to integer
- took out assertion raise from 'name' property of CompoundSelect
|
| | |
|
| |
|
|
|
|
|
|
| |
instead
- consolidated scalar() calls into ResultProxy scalar(), fixed ResultProxy scalar() to
apply typing rules
- general de-cruftification of ClauseElement/Compiled (yes i know theres crufty things everywhere)
|
| |
|
|
|
|
| |
the appropriate negation operator if one is available.
- calling a negation on an "IN" or "IS" clause will result in
"NOT IN", "IS NOT" (as opposed to NOT (x IN y)).
|
| | |
|
| | |
|
| |
|
|
|
|
| |
for alias and label names
fixes [ticket:294]
|
| | |
|
| |
|
|
|
| |
object more than once in an expression; simplified handling of positional
parameters. nice job by Bill Noon figuring out the basic idea.
|
| |
|
|
|
|
|
| |
turned on for individual table, schema, and column identifiers when
used in all queries/creates/drops. Enabled via "quote=True" in
Table or Column, as well as "quote_schema=True" in Table. Thanks to
Aaron Spike for his excellent efforts. [ticket:155]
|
| | |
|
| | |
|
| |
|
|
| |
restored error check in Join
|
| |
|
|
|
|
|
| |
better error message in PropertyLoader (i.e. relation()/backref()) for when
the join condition can't be reasonably determined.
- sqlite creates ForeignKeyConstraint objects properly upon table
reflection.
|