| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
meaning, if you say someexpr.label('foo') == 5, it produces
the correct "someexpr == 5".
|
|
|
|
| |
- ClauseVisitor has handy chain() method.
|
|
|
|
|
|
| |
by BufferedColumnResultProxy)
- the docstrings, they do not end
|
|
|
|
|
|
|
| |
"column()") to force any column expression to be added as a property
on a mapper, particularly those that aren't present in the mapped
selectable. this allows "scalar expressions" of any kind to be
added as relations (though they have issues with eager loads).
|
|
|
|
|
| |
TypeEngine of the base element out to the label, including a label()
created from a scalar=True select() statement.
|
|
|
|
| |
corresponding_column() to return a result
|
| |
|
|
|
|
| |
- docstring work
|
|
|
|
| |
- docstrings for all sql package functions including cross linking.
|
| |
|
|
|
|
|
| |
WHEN condition as the return type of the case statement
- various unit test tweaks to get oracle working
|
|
|
|
| |
- some more test scenarios for raw bind params
|
|
|
|
| |
new set of tests
|
| |
|
|
|
|
|
|
|
| |
embedded select() statements against the table being updated or
deleted. this works the same as nested select() statement
correlation, and can be disabled via the correlate=False flag on
the embedded select().
|
|
|
|
|
| |
- unicode schema with mysql slightly improved, still cant do has_table
- got reflection of unicode schemas working with sqlite, pg, mysql
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
are to work around glitchy SQLite behavior that doesnt understand
"foo.id" as equivalent to "id", are now only generated in the case
that those named columns are selected from (part of [ticket:513])
- MS-SQL better detects when a query is a subquery and knows not to
generate ORDER BY phrases for those [ticket:513]
|
|
|
|
|
|
| |
- removed silly behavior where sqlite would reflect UNIQUE indexes
as part of the primary key (?!)
- added __contains__ support to ColumnCollection; contains_column() method should be removed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- much more functionality moved into ExecutionContext, which impacted
the API used by dialects to some degree
- ResultProxy and subclasses now designed sanely
- merged patch for #522, Unicode subclasses String directly,
MSNVarchar implements for MS-SQL, removed MSUnicode.
- String moves its "VARCHAR"/"TEXT" switchy thing into
"get_search_list()" function, which VARCHAR and CHAR can override
to not return TEXT in any case (didnt do the latter yet)
- implements server side cursors for postgres, unit tests, #514
- includes overhaul of dbapi import strategy #480, all dbapi
importing happens in dialect method "dbapi()", is only called
inside of create_engine() for default and threadlocal strategies.
Dialect subclasses have a datamember "dbapi" referencing the loaded
module which may be None.
- added "mock" engine strategy, doesnt require DBAPI module and
gives you a "Connecition" which just sends all executes to a callable.
can be used to create string output of create_all()/drop_all().
|
| |
|
| |
|
|
|
|
| |
an argument of NULL
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
related commit.
added more tests plus test for column targeting with text() clause.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
- added 'encodedname' prop to a few ClauseElements to aid logging
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
means their lengths are dialect-dependent. So on oracle a label
that gets truncated to 30 chars will go out to 63 characters
on postgres. Also, the true labelname is always attached as the
accessor on the parent Selectable so theres no need to be aware
of the genrerated label names [ticket:512].
- ResultProxy column targeting is greatly simplified, and relies
upon the ANSICompiler's column_labels map to translate the built-in
label on a _ColumnClause (which is now considered to be a unique
identifier of that column) to the label which was generated at compile
time.
- still need to put a baseline of ColumnClause targeting for
ResultProxy objects that originated from a textual query.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
via bindparam() or via literal(), i.e. select([literal('foo')])
- removed "table" argument from column(). this does not add the column
to the table anyway so was misleading.
- Select _exportable_columns() only exports Selectable instances
- Select uses _exportable_columns() when searching for engines
instead of _raw_columns for similar reasons (non selectables have no engine)
- _BindParamClause no longer has a _make_proxy(). its not a ColumnElement.
- _Label detects underlying column element and will generate its own
column()._make_proxy() if the element is not a ColumnElement. this
allows a Label to be declared for nearly anything and it can export
itself as a column on a containing Selectable.
|
|
|
|
| |
restructuredtext fixes throughout docstrings
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
requires that the target column be present in a sub-element of the
target selectable.
- embedded logic above more appropriate for ClauseAdapter functionality
since its trying to "pull up" clauses that represent columns within
a larger union up to the level of the union itself.
- the "direction" test against the "foreign_keys" collection apparently
works for an exact "column 'x' is present in the collection", no proxy
relationships needed. fixes the case of relating a selectable/alias
to one of its underlying tables, probably fixes other scenarios
|
|
|
|
|
|
|
|
|
| |
distinct bindparam()s with the same name in a single statement,
and the key will be shared. proper positional/named args translate
at compile time. for the old behavior of "aliasing" bind parameters
with conflicting names, specify "unique=True" - this option is
still used internally for all the auto-genererated (value-based)
bind parameters.
|
|
|
|
|
|
|
|
|
|
|
|
| |
'duplicate' columns from the resulting column clause that are known to be
equivalent based on the join condition. this is of great usage when
constructing subqueries of joins which Postgres complains about if
duplicate column names are present.
- added support to polymorphic stuff for more than one "equivalent column",
when trying to target columns in the polymorphic union; this applies
to multi-leveled inheritance
- put above-two concepts together to get the abc_inheritance tests to work
with postgres
|
|
|
|
|
|
|
|
| |
column elements, since we can make no assumptions about the text. to
create labels for literal columns, you can say "somecol AS somelabel",
or use literal_column("somecol").label("somelabel")
- quoting wont occur for literal columns when they are "proxied" into the
column collection for their selectable (is_literal flag is propigated)
|
|
|
|
|
|
| |
straight <pre> + trim() func
for now. applies most of [ticket:214], compliemnts of Lele Gaifax
|
| |
|
|
|
|
| |
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.
|