]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
14 years agomerge from tip
Mike Bayer [Fri, 3 Sep 2010 21:57:20 +0000 (17:57 -0400)] 
merge from tip

14 years agopython 2.4
Mike Bayer [Fri, 3 Sep 2010 19:55:09 +0000 (15:55 -0400)] 
python 2.4

14 years agoreduce callcounts
Mike Bayer [Fri, 3 Sep 2010 19:29:32 +0000 (15:29 -0400)] 
reduce callcounts

14 years agoApply more memoization to Mapper attributes & subject to group expiry.
Jason Kirtland [Fri, 3 Sep 2010 19:05:24 +0000 (12:05 -0700)] 
Apply more memoization to Mapper attributes & subject to group expiry.

14 years ago- AbstractType.__str__() produces the string version of the type with default dialect
Mike Bayer [Fri, 3 Sep 2010 18:35:22 +0000 (14:35 -0400)] 
- AbstractType.__str__() produces the string version of the type with default dialect
- 79 chars

14 years ago- get active_history to work, move attribute events into module-level classes
Mike Bayer [Fri, 3 Sep 2010 16:31:16 +0000 (12:31 -0400)] 
- get active_history to work, move attribute events into module-level classes

14 years ago- refinements to DDL events, including new execute_if(), got pickling to work
Mike Bayer [Fri, 3 Sep 2010 15:53:54 +0000 (11:53 -0400)] 
- refinements to DDL events, including new execute_if(), got pickling to work

14 years agodoh, forgot about ddl events. need some work with the pickling.
Mike Bayer [Wed, 1 Sep 2010 01:46:14 +0000 (21:46 -0400)] 
doh, forgot about ddl events.   need some work with the pickling.

14 years ago- a large hill to climb. Added declarative examples to all the
Mike Bayer [Tue, 31 Aug 2010 00:10:03 +0000 (20:10 -0400)] 
- a large hill to climb.  Added declarative examples to all the
"basic relationship" examples, cleaned up the examples and added
some more explicitness.  Also renamed "treenodes" to "nodes" and
added self-referential declarative example.
- Added info/examples on how to join tables directly when querying with
joined table inheritance.
-  Starting to talk about hybrids in the main mapper docs some more.
introducoed the idea that synonyms are on their way out.
- SQL expressions as mapped attributes also gets better verbiage,
alternative approaches to them, including hybrids.
- modernized the hybrid example.
- object_session() as a standalone function wasn't documented ?!

14 years ago- The include_properties and exclude_properties arguments
Mike Bayer [Mon, 30 Aug 2010 21:41:47 +0000 (17:41 -0400)] 
- The include_properties and exclude_properties arguments
to mapper() now accept Column objects as members in
addition to strings.  This so that same-named Column
objects, such as those within a join(), can be
disambiguated.

- A warning is now emitted if a mapper is created against a
join or other single selectable that includes multiple
columns with the same name in its .c. collection,
and those columns aren't explictly named as part of
the same or separate attributes (or excluded).
In 0.7 this warning will be an exception.   Note that
this warning is not emitted when the combination occurs
as a result of inheritance, so that attributes
still allow being overridden naturally.
[ticket:1896].  In 0.7 this will be improved further.

- The primary_key argument to mapper() can now specify
a series of columns that are only a subset of
the calculated "primary key" columns of the mapped
selectable, without an error being raised.  This
helps for situations where a selectable's effective
primary key is simpler than the number of columns
in the selectable that are actually marked as
"primary_key", such as a join against two
tables on their primary key columns [ticket:1896].

14 years agodoc tweak
Mike Bayer [Sun, 29 Aug 2010 22:13:44 +0000 (18:13 -0400)] 
doc tweak

14 years ago- The Session class is now present in sqlalchemy.orm.*.
Mike Bayer [Sun, 29 Aug 2010 22:13:18 +0000 (18:13 -0400)] 
- The Session class is now present in sqlalchemy.orm.*.
We're moving away from the usage of create_session(),
which has non-standard defaults, for those situations
where a one-step Session constructor is desired. Most
users should stick with sessionmaker() for general use,
however.

14 years ago- Oracle reflection of indexes has been tuned so
Mike Bayer [Sun, 29 Aug 2010 21:06:05 +0000 (17:06 -0400)] 
- Oracle reflection of indexes has been tuned so
that indexes which include some or all primary
key columns, but not the same set of columns
as that of the primary key, are reflected.
Indexes which contain the identical columns
as that of the primary key are skipped within
reflection, as the index in that case is assumed
to be the auto-generated primary key index.
Previously, any index with PK columns present
would be skipped.  Thanks to Kent Bower
for the patch.  [ticket:1867]

- Oracle now reflects the names of primary key
constraints - also thanks to Kent Bower.
[ticket:1868]

14 years agodocstring for query.correlate, [ticket:1889]
Mike Bayer [Sun, 29 Aug 2010 19:30:43 +0000 (15:30 -0400)] 
docstring for query.correlate, [ticket:1889]

14 years ago- Added ROWID type to the Oracle dialect, for those
Mike Bayer [Sun, 29 Aug 2010 19:16:02 +0000 (15:16 -0400)] 
- Added ROWID type to the Oracle dialect, for those
cases where an explicit CAST might be needed.
[ticket:1879]

14 years ago- moved out to on_before_execute, on_after_execute. not much option here,
Mike Bayer [Sun, 29 Aug 2010 15:22:46 +0000 (11:22 -0400)] 
- moved out to on_before_execute, on_after_execute.   not much option here,
need both forms, the wrapping thing is just silly
- fixed the listen() to not re-wrap continuously.

14 years agogoing back to the simple way, plus trying to make the engine thing simpler, and....
Mike Bayer [Sat, 28 Aug 2010 15:29:07 +0000 (11:29 -0400)] 
going back to the simple way, plus trying to make the engine thing simpler, and....doesn't work.
on_before_execute and on_after_execute really not appealing here.   might have to just go back to
what it was the other day.

14 years ago- its probably worthwhile to make the primary listen() interface humane, i.e.:
Mike Bayer [Sat, 28 Aug 2010 00:17:37 +0000 (20:17 -0400)] 
- its probably worthwhile to make the primary listen() interface humane, i.e.:
 def listen(target, args)

so here we provide a "wrapper" approach that allows this, and it is
basically pass-by-value.  a pass-by-value event *may* support rewriting
some of the args in the dictionary.

 the current
listen will become "listen_raw" since it saves about 100% overhead versus
the coercion to dict, and will be used internally, and will remain
pass-by-reference.

proxyconnection probably will rely upon the newer style of pass-by-value
for "rewrite the args" types of calls.

14 years ago- put a link to the wiki table config example
Mike Bayer [Fri, 27 Aug 2010 16:57:18 +0000 (12:57 -0400)] 
- put a link to the wiki table config example

14 years ago- An object that's been deleted now gets a flag
Mike Bayer [Thu, 26 Aug 2010 15:32:50 +0000 (11:32 -0400)] 
- An object that's been deleted now gets a flag
'deleted', which prohibits the object from
being re-add()ed to the session, as previously
the object would live in the identity map
silently until its attributes were accessed.
The make_transient() function now resets this
flag along with the "key" flag.

- make_transient() can be safely called on an
already transient instance.

14 years ago- remove repr() from exception assertion, so that py3k's different repr(type(str...
Mike Bayer [Thu, 26 Aug 2010 05:40:20 +0000 (01:40 -0400)] 
- remove repr() from exception assertion, so that py3k's different repr(type(str)) format passes

14 years ago- replaced all self.__connection.is_valid with
Mike Bayer [Thu, 26 Aug 2010 05:33:51 +0000 (01:33 -0400)] 
- replaced all self.__connection.is_valid with
"safe" self._connection_is_valid.
- Fixed bug in Connection whereby if a "disconnect"
event occurred in the "initialize" phase of the
first connection pool connect, an AttributeError
would be raised when the Connection would attempt
to invalidate the DBAPI connection.  [ticket:1894]
- Connection.invalidate() can be called more than
once and subsequent calls do nothing.

14 years agomerge changes from alternate branch
Mike Bayer [Wed, 25 Aug 2010 15:01:46 +0000 (11:01 -0400)] 
merge changes from alternate branch

14 years agoadd a note
Mike Bayer [Wed, 25 Aug 2010 15:00:35 +0000 (11:00 -0400)] 
add a note

14 years agomerge tip
Mike Bayer [Tue, 24 Aug 2010 05:01:34 +0000 (01:01 -0400)] 
merge tip

14 years agosome doc updates
Mike Bayer [Tue, 24 Aug 2010 05:01:04 +0000 (01:01 -0400)] 
some doc updates

14 years ago- the history_meta versioning recipe sets "unique=False"
Mike Bayer [Mon, 23 Aug 2010 22:17:31 +0000 (18:17 -0400)] 
- the history_meta versioning recipe sets "unique=False"
when copying columns, so that the versioning
table handles multiple rows with repeating values.
[ticket:1887]

14 years ago- Similarly, for relationship(), foreign_keys,
Mike Bayer [Sat, 21 Aug 2010 23:38:28 +0000 (19:38 -0400)] 
- Similarly, for relationship(), foreign_keys,
remote_side, order_by - all column-based
expressions are enforced - lists of strings
are explicitly disallowed since this is a
very common error

14 years ago- object_session() raises the proper
Mike Bayer [Wed, 18 Aug 2010 14:54:40 +0000 (10:54 -0400)] 
- object_session() raises the proper
UnmappedInstanceError when presented with an
unmapped instance.  [ticket:1881]

14 years agomerge tip
Mike Bayer [Sun, 15 Aug 2010 00:52:57 +0000 (20:52 -0400)] 
merge tip

14 years ago- 79 chars for expression
Mike Bayer [Sun, 15 Aug 2010 00:51:37 +0000 (20:51 -0400)] 
- 79 chars for expression
- fix typo in test

14 years ago- Another pass through the series of error messages
Mike Bayer [Sat, 14 Aug 2010 18:52:18 +0000 (14:52 -0400)] 
- Another pass through the series of error messages
emitted when relationship() is configured with
ambiguous arguments.   The "foreign_keys"
setting is no longer mentioned, as it is almost
never needed and it is preferable users set up
correct ForeignKey metadata, which is now the
recommendation.  If 'foreign_keys'
is used and is incorrect, the message suggests
the attribute is probably unnecessary.  Docs
for the attribute are beefed up.  This
because all confused relationship() users on the
ML appear to be attempting to use foreign_keys
due to the message, which only confuses them
further since Table metadata is much clearer.

- If the "secondary" table has no ForeignKey metadata
and no foreign_keys is set, even though the
user is passing screwed up information, it is assumed
that primary/secondaryjoin expressions should
consider only and all cols in "secondary" to be
foreign.  It's not possible with "secondary" for
the foreign keys to be elsewhere in any case.
A warning is now emitted instead of an error,
and the mapping succeeds. [ticket:1877]

- fixed incorrect "Alternate Collection Mappings" reference
in the docs, not sure if someone wants to reference
"Rows that Point to Themselves" function
- "Collection Mapping" is "Advanced Collection Mapping", this
section is troublesome since nobody really needs it but it
is public API

14 years ago- Added basic math expression coercion for
Mike Bayer [Fri, 13 Aug 2010 18:25:58 +0000 (14:25 -0400)] 
- Added basic math expression coercion for
Numeric->Integer,
so that resulting type is Numeric regardless
of the direction of the expression.

14 years ago- added much more verbiage about transactions and expire_all
Mike Bayer [Thu, 12 Aug 2010 14:47:07 +0000 (10:47 -0400)] 
- added much more verbiage about transactions and expire_all

14 years agospelling arg
Mike Bayer [Wed, 11 Aug 2010 16:01:52 +0000 (12:01 -0400)] 
spelling arg

14 years ago- a warning is emitted in mapper() if the polymorphic_on
Mike Bayer [Wed, 11 Aug 2010 15:57:56 +0000 (11:57 -0400)] 
- a warning is emitted in mapper() if the polymorphic_on
column is not present either in direct or derived
form in the mapped selectable or in the
with_polymorphic selectable, instead of silently
ignoring it.  Look for this to become an
exception in 0.7.

14 years ago- Fixed the psycopg2 dialect to use its
Mike Bayer [Tue, 10 Aug 2010 14:24:02 +0000 (10:24 -0400)] 
- Fixed the psycopg2 dialect to use its
set_isolation_level() method instead of relying
upon the base "SET SESSION ISOLATION" command,
as psycopg2 resets the isolation level on each new
transaction otherwise.

14 years agothis is not actually true
Mike Bayer [Tue, 10 Aug 2010 04:21:47 +0000 (00:21 -0400)] 
this is not actually true

14 years ago- reorganize events into cls->dispatch, which is an instance of _Dispatch.
Mike Bayer [Tue, 10 Aug 2010 04:19:50 +0000 (00:19 -0400)] 
- reorganize events into cls->dispatch, which is an instance of _Dispatch.
cut down on extraneous stuff, cleanup
The Event class never gets instantiated and its methods stay the same
so that sphinx can get to it.

14 years agothis reorganizes things so the EventDescriptor and all is on a "Dispatch" object.
Mike Bayer [Tue, 10 Aug 2010 03:34:23 +0000 (23:34 -0400)] 
this reorganizes things so the EventDescriptor and all is on a "Dispatch" object.
this leaves the original Event class alone so sphinx documents it.

this is all a mess right now but the pool/engine tests are working fully
at the moment so wanted to mark a working version.

14 years agoworking with how this will be documented and having some probs with sphinx
Mike Bayer [Tue, 10 Aug 2010 00:49:08 +0000 (20:49 -0400)] 
working with how this will be documented and having some probs with sphinx

14 years agoget slightly better about deprecations in docstrings, tho this is kind of an uphill...
Mike Bayer [Tue, 10 Aug 2010 00:32:37 +0000 (20:32 -0400)] 
get slightly better about deprecations in docstrings, tho this is kind of an uphill climb

14 years ago- modernizing examples
Mike Bayer [Mon, 9 Aug 2010 00:58:05 +0000 (20:58 -0400)] 
- modernizing examples

14 years agomodernized the directed graph example
Mike Bayer [Mon, 9 Aug 2010 00:33:32 +0000 (20:33 -0400)] 
modernized the directed graph example

14 years agoconfirmed we can get this to trigger if we apply heisenbug compensation
Mike Bayer [Mon, 9 Aug 2010 00:14:35 +0000 (20:14 -0400)] 
confirmed we can get this to trigger if we apply heisenbug compensation

14 years agofixes, but still unsure of things
Mike Bayer [Sun, 8 Aug 2010 23:56:45 +0000 (19:56 -0400)] 
fixes, but still unsure of things

14 years agogetting attributes to work
Mike Bayer [Sun, 8 Aug 2010 23:36:07 +0000 (19:36 -0400)] 
getting attributes to work

14 years ago- add a check that prevents redundant AttributeImpls from being generated and discarded.
Mike Bayer [Sun, 8 Aug 2010 22:57:33 +0000 (18:57 -0400)] 
- add a check that prevents redundant AttributeImpls from being generated and discarded.

14 years agomerge tip
Mike Bayer [Sun, 8 Aug 2010 21:50:44 +0000 (17:50 -0400)] 
merge tip

14 years ago- some of the refinements from the sa_synonyms branch which will
Mike Bayer [Sun, 8 Aug 2010 19:14:27 +0000 (15:14 -0400)] 
- some of the refinements from the sa_synonyms branch which will
allow the hybrid extension to work, but doesn't re-implement synonym,
comparable_property,concreteinheritedproperty
- mapper.get_property() and _entity_descriptor use plain getattr()
to get at descriptors in all cases, thereby placing more
trust in the ultimate class-bound attribute to provide mapped
properties

14 years agointroductions
Mike Bayer [Sun, 8 Aug 2010 17:57:18 +0000 (13:57 -0400)] 
introductions

14 years agomark this as intermittent crashes on the buildbot - reason for failures not clear
Mike Bayer [Sun, 8 Aug 2010 15:41:26 +0000 (11:41 -0400)] 
mark this as intermittent crashes on the buildbot - reason for failures not clear

14 years ago- the _Label construct, i.e. the one that is produced
Mike Bayer [Sun, 8 Aug 2010 00:58:23 +0000 (20:58 -0400)] 
- the _Label construct, i.e. the one that is produced
whenever you say somecol.label(), now counts itself
in its "proxy_set" unioned with that of it's
contained column's proxy set, instead of
directly returning that of the contained column.
This allows column correspondence
operations which depend on the identity of the
_Labels themselves to return the correct result
- fixes ORM bug [ticket:1852].

14 years agoformatting
Mike Bayer [Fri, 6 Aug 2010 15:03:05 +0000 (11:03 -0400)] 
formatting

14 years ago- Dynamic attributes don't support collection
Mike Bayer [Thu, 5 Aug 2010 16:28:01 +0000 (12:28 -0400)] 
- Dynamic attributes don't support collection
population - added an assertion for when
set_committed_value() is called, as well as
when joinedload() or subqueryload() options
are applied to a dynamic attribute, instead
of failure / silent failure.  [ticket:1864]

14 years ago- Fixed bug whereby replacing composite foreign key
Mike Bayer [Thu, 5 Aug 2010 01:30:53 +0000 (21:30 -0400)] 
- Fixed bug whereby replacing composite foreign key
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)

14 years ago- Added full description of parent table/column,
Mike Bayer [Tue, 3 Aug 2010 19:22:24 +0000 (15:22 -0400)] 
- Added full description of parent table/column,
target table/column in error message raised when
ForeignKey can't resolve target.

14 years ago- the text() construct, if placed in a column
Mike Bayer [Tue, 3 Aug 2010 18:06:41 +0000 (14:06 -0400)] 
- the text() construct, if placed in a column
oriented situation, will at least return NULLTYPE
for its type instead of None, allowing it to
be used a little more freely for ad-hoc column
expressions than before.   literal_column()
is still the better choice, however.

14 years ago- dont like this note
Mike Bayer [Tue, 3 Aug 2010 16:56:02 +0000 (12:56 -0400)] 
- dont like this note
- rewrite this section, also don't talk about extensions anymore
since they will be replaced

14 years agofixes, clarifications, removal of misleading statements
Mike Bayer [Tue, 3 Aug 2010 16:26:56 +0000 (12:26 -0400)] 
fixes, clarifications, removal of misleading statements

14 years ago- Calling fetchone() or similar on a result that
Mike Bayer [Tue, 3 Aug 2010 15:55:12 +0000 (11:55 -0400)] 
- Calling fetchone() or similar on a result that
has already been exhausted, has been closed,
or is not a result-returning result now
raises ResourceClosedError, a subclass of
InvalidRequestError, in all cases, regardless
of backend.  Previously, some DBAPIs would
raise ProgrammingError (i.e. pysqlite), others
would return None leading to downstream breakages
(i.e. MySQL-python).

- Connection, ResultProxy, as well as Session use
ResourceClosedError for all "this
connection/transaction/result is closed" types of
errors.

14 years ago- dont like that example, its too much for a section that otherwise isn't so
Mike Bayer [Tue, 3 Aug 2010 12:51:43 +0000 (08:51 -0400)] 
- dont like that example, its too much for a section that otherwise isn't so
in depth

14 years ago- add an example of declarative with hybrid, including why this
Mike Bayer [Tue, 3 Aug 2010 00:41:47 +0000 (20:41 -0400)] 
- add an example of declarative with hybrid, including why this
is a different use case (i.e. formalized apps vs. quickstart).
- solidified docstrings for ForeignKey

14 years ago - Fixed bug where "Can't add additional column" message
Mike Bayer [Mon, 2 Aug 2010 23:18:24 +0000 (19:18 -0400)] 
  - Fixed bug where "Can't add additional column" message
    would display the wrong name.

14 years ago- Specifying a non-column based argument
Mike Bayer [Mon, 2 Aug 2010 20:59:06 +0000 (16:59 -0400)] 
- Specifying a non-column based argument
for column_mapped_collection, including string,
text() etc., will raise an error message that
specifically asks for a column element, no longer
misleads with incorrect information about
text() or literal().  [ticket:1863]

14 years ago- if @classproperty is used with a regular class-bound
Mike Bayer [Mon, 2 Aug 2010 19:29:31 +0000 (15:29 -0400)] 
- if @classproperty is used with a regular class-bound
mapper property attribute, it will be called to get the
actual attribute value during initialization. Currently,
there's no advantage to using @classproperty on a column
or relationship attribute of a declarative class that
isn't a mixin - evaluation is at the same time as if
@classproperty weren't used. But here we at least allow
it to function as expected.
- docs for column_property() with declarative
- mixin docs in declarative made more clear - mixins
are optional - each subsection starts with, "in *declarative mixins*",
to reduce confusion

15 years agomerge from tip
Mike Bayer [Mon, 2 Aug 2010 15:32:04 +0000 (11:32 -0400)] 
merge from tip

15 years ago- The generated index name also is based on
Mike Bayer [Mon, 2 Aug 2010 05:12:03 +0000 (01:12 -0400)] 
- The generated index name also is based on
a "max index name length" attribute which is
separate from the "max identifier length" -
this to appease MySQL who has a max length
of 64 for index names, separate from their
overall max length of 255.  [ticket:1412]

15 years ago- worked through about 25% of mappers.rst to implement
Mike Bayer [Mon, 2 Aug 2010 00:55:44 +0000 (20:55 -0400)] 
- worked through about 25% of mappers.rst to implement
up to date and clear explanations of things, including
as much context and description as possible

15 years agomysql needs ACID
Mike Bayer [Sun, 1 Aug 2010 22:53:29 +0000 (18:53 -0400)] 
mysql needs ACID

15 years agoGC is screwing this one up sometimes
Mike Bayer [Sun, 1 Aug 2010 22:27:57 +0000 (18:27 -0400)] 
GC is screwing this one up sometimes

15 years ago- The name ConcurrentModificationError has been
Mike Bayer [Sun, 1 Aug 2010 22:24:35 +0000 (18:24 -0400)] 
- The name ConcurrentModificationError has been
changed to StaleDataError, and descriptive
error messages have been revised to reflect
exactly what the issue is.   Both names will
remain available for the forseeable future
for schemes that may be specifying
ConcurrentModificationError in an "except:"
clause.

15 years agoreformatting /cleanup of column type docs, including [ticket:1858]
Mike Bayer [Sun, 1 Aug 2010 19:00:58 +0000 (15:00 -0400)] 
reformatting /cleanup of column type docs, including [ticket:1858]

15 years ago- Repaired the usage of merge() when used with
Mike Bayer [Sun, 1 Aug 2010 18:07:35 +0000 (14:07 -0400)] 
- Repaired the usage of merge() when used with
concrete inheriting mappers.  Such mappers frequently
have so-called "concrete" attributes, which are
subclass attributes that "disable" propagation from
the parent - these needed to allow a merge()
operation to pass through without effect.

15 years agoapply alt/ctrl t
Mike Bayer [Sun, 1 Aug 2010 17:27:12 +0000 (13:27 -0400)] 
apply alt/ctrl t

15 years agomake this point about clear_mappers
Mike Bayer [Sun, 1 Aug 2010 15:22:28 +0000 (11:22 -0400)] 
make this point about clear_mappers

15 years ago- Fixed "default schema" query to work with
Mike Bayer [Thu, 29 Jul 2010 15:17:53 +0000 (11:17 -0400)] 
- Fixed "default schema" query to work with
pymssql backend.

15 years ago- passive test fails on oracle, ensure passive test fails on sqlite as well
Mike Bayer [Wed, 28 Jul 2010 14:01:55 +0000 (10:01 -0400)] 
- passive test fails on oracle, ensure passive test fails on sqlite as well

15 years ago- class level listeners can be added after the fact
Mike Bayer [Tue, 27 Jul 2010 14:51:20 +0000 (10:51 -0400)] 
- class level listeners can be added after the fact
- more indirect listener registration allows multiple target types

15 years ago- initial move of AttributeExtension over to events. tests mostly OK with some glitches.
Mike Bayer [Sun, 25 Jul 2010 17:31:09 +0000 (13:31 -0400)] 
- initial move of AttributeExtension over to events.  tests mostly OK with some glitches.

15 years ago- pretty much all tests passing, maybe some callcounts are off
Mike Bayer [Sun, 25 Jul 2010 17:08:39 +0000 (13:08 -0400)] 
- pretty much all tests passing, maybe some callcounts are off
- test suite adjusted to use engine/pool events and not listeners
- deprecation warnings

15 years ago- got engine events partially working, needs work on return value considerations
Mike Bayer [Sun, 25 Jul 2010 00:35:03 +0000 (20:35 -0400)] 
- got engine events partially working, needs work on return value considerations

15 years agoshoulda listened harder in APL class
Mike Bayer [Sat, 24 Jul 2010 22:52:47 +0000 (18:52 -0400)] 
shoulda listened harder in APL class

15 years ago- worked it out so that classes declare a nested class "event",
Mike Bayer [Sat, 24 Jul 2010 21:55:06 +0000 (17:55 -0400)] 
- worked it out so that classes declare a nested class "event",
with methods representing events.  This is self-documenting via sphinx.
- implemented new model for pool, classmanager.   Most events are
one or two args, so going back to allowing any kind of *arg, **kw
signature for events - this is simpler and improves performance,
though we don't get the "we can add new kw's anytime".  perhaps
there's some other way to approach that.

15 years ago- initial "events" idea. will replace all Extension, Proxy, Listener
Mike Bayer [Sat, 24 Jul 2010 17:19:59 +0000 (13:19 -0400)] 
- initial "events" idea.   will replace all Extension, Proxy, Listener
implementations with a single interface.

15 years ago- The value of version_id_col can be changed
Mike Bayer [Sat, 24 Jul 2010 14:10:28 +0000 (10:10 -0400)] 
- The value of version_id_col can be changed
manually, and this will result in an UPDATE
of the row.  Versioned UPDATEs and DELETEs
now use the "committed" value of the
version_id_col in the WHERE clause and
not the pending changed value. The
version generator is also bypassed if
manual changes are present on the attribute.
[ticket:1857]
- ensure before_update/after_update called on parent
for collection change

15 years ago- Moving an o2m object from one collection to
Mike Bayer [Thu, 22 Jul 2010 05:46:41 +0000 (01:46 -0400)] 
- Moving an o2m object from one collection to
another, or vice versa changing the referenced
object by an m2o, where the foreign key is also a
member of the primary key, will now be more
carefully checked during flush if the change in
value of the foreign key on the "many" side is the
result of a change in the primary key of the "one"
side, or if the "one" is just a different object.
In one case, a cascade-capable DB would have
cascaded the value already and we need to look at
the "new" PK value to do an UPDATE, in the other we
need to continue looking at the "old". We now look
at the "old", assuming passive_updates=True,
unless we know it was a PK switch that
triggered the change. [ticket:1856]

15 years agoetc
Mike Bayer [Wed, 21 Jul 2010 21:20:41 +0000 (17:20 -0400)] 
etc

15 years agothis would help, right
Mike Bayer [Wed, 21 Jul 2010 20:51:23 +0000 (16:51 -0400)] 
this would help, right

15 years ago- The beaker_caching example has been reorgnized
Mike Bayer [Wed, 21 Jul 2010 20:19:08 +0000 (16:19 -0400)] 
- The beaker_caching example has been reorgnized
such that the Session, cache manager,
declarative_base are part of environment, and
custom cache code is portable and now within
"caching_query.py".  This allows the example to
be easier to "drop in" to existing projects.

15 years ago- add encode step to appease py3k
Mike Bayer [Wed, 21 Jul 2010 16:14:08 +0000 (12:14 -0400)] 
- add encode step to appease py3k

15 years ago- Changed the scheme used to generate truncated
Mike Bayer [Wed, 21 Jul 2010 15:33:47 +0000 (11:33 -0400)] 
- Changed the scheme used to generate truncated
"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]

15 years agocommit tag
Mike Bayer [Tue, 20 Jul 2010 15:55:12 +0000 (11:55 -0400)] 
commit tag

15 years agodocument the crap out of text(), Session.execute()
Mike Bayer [Tue, 20 Jul 2010 15:54:58 +0000 (11:54 -0400)] 
document the crap out of text(), Session.execute()

15 years agoAdded tag rel_0_6_3 for changeset 2bd3c795cfe39249aceb6b04ea4650a17788d9b6
Mike Bayer [Thu, 15 Jul 2010 16:44:56 +0000 (12:44 -0400)] 
Added tag rel_0_6_3 for changeset 2bd3c795cfe39249aceb6b04ea4650a17788d9b6

15 years ago- Column-entities (i.e. query(Foo.id)) copy their rel_0_6_3
Mike Bayer [Thu, 15 Jul 2010 13:59:17 +0000 (09:59 -0400)] 
- Column-entities (i.e. query(Foo.id)) copy their
state more fully when queries are derived from
themselves + a selectable (i.e. from_self(),
union(), etc.), so that join() and such have the
correct state to work from.  [ticket:1853]

- Fixed bug where Query.join() would fail if
querying a non-ORM column then joining without
an on clause when a FROM clause is already
present, now raises a checked exception the
same way it does when the clause is not
present.  [ticket:1853]

15 years ago- More tweaks to cx_oracle Decimal handling.
Mike Bayer [Wed, 14 Jul 2010 18:50:45 +0000 (14:50 -0400)] 
- More tweaks to cx_oracle Decimal handling.
"Ambiguous" numerics with no decimal place
are coerced to int at the connection handler
level.  The advantage here is that ints
come back as ints without SQLA type
objects being involved and without needless
conversion to Decimal first.

Unfortunately, some exotic subquery cases
can even see different types between
individual result rows, so the Numeric
handler, when instructed to return Decimal,
can't take full advantage of "native decimal"
mode and must run isinstance() on every value
to check if its Decimal already. Reopen of
[ticket:1840]

15 years ago- PG doc updates
Mike Bayer [Wed, 14 Jul 2010 01:30:55 +0000 (21:30 -0400)] 
- PG doc updates
- pypostgresql has 15 errors, 3 failures, this probably
puts it in the "yes" as opposed to the "partial" support
category.  [ticket:1850]

15 years ago- _extract_error_code now expects the raw DBAPI error in all cases
Mike Bayer [Wed, 14 Jul 2010 00:52:05 +0000 (20:52 -0400)] 
- _extract_error_code now expects the raw DBAPI error in all cases
for all four MySQL dialects.   has_table() passes in the "orig"
from the SQLAlchemy exception.  continuing of [ticket:1848]

15 years agorestore py2k directive that got whacked by python tidy
Mike Bayer [Wed, 14 Jul 2010 00:40:58 +0000 (20:40 -0400)] 
restore py2k directive that got whacked by python tidy