Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer 3712e35c32 - Fixed bug in 0.9's foreign key setup system, such that
the logic used to link a :class:`.ForeignKey` to its parent could fail
when the foreign key used "link_to_name=True" in conjunction with
a target :class:`.Table` that would not receive its parent column until
later, such as within a reflection + "useexisting" scenario,
if the target column in fact had a key value different from its name,
as would occur in reflection if column reflect events were used to
alter the .key of reflected :class:`.Column` objects so that the
link_to_name becomes significant.  Also repaired support for column
type via FK transmission in a similar way when target columns had a
different key and were referenced using link_to_name.
fixes #3298
2015-01-28 11:55:26 -05:00
Mike Bayer 8aaa8dd6bd - fix link to non_primary flag
- rewrite the multiple mappers section
2015-01-27 00:34:10 -05:00
Mike Bayer a826ff366b - additional test adjustments for pypy / psycopg2cffi. This
consists mainly of adjusting fixtures to ensure connections are closed
explicitly.  psycopg2cffi also handles unicode bind parameter
names differently than psycopg2, and seems to possibly have a little less
control over floating point values at least in one test which is
marked as a "fail", though will see if it runs differently on linux
than osx..
- changelog for psycopg2cffi, fixes #3052
2015-01-26 18:43:19 -05:00
Shaun Stanworth 226bd8d707 Include psycopg2cffi in dialect docs 2015-01-26 18:43:19 -05:00
Mike Bayer 987f40b5aa - changelog for #3262, fixes #3262 2015-01-26 17:04:40 -05:00
Mike Bayer 20cdf0e855 - changelog for pullreq github:150 2015-01-26 16:53:59 -05:00
Mike Bayer c3d898e8d0 - Added new user-space accessors for viewing transaction isolation
levels; :meth:`.Connection.get_isolation_level`,
:attr:`.Connection.default_isolation_level`.
- enhance documentation inter-linkage between new accessors,
existing isolation_level parameters, as well as in
the dialect-level methods which should be fully covered
by Engine/Connection level APIs now.
2015-01-20 11:42:02 -05:00
Mike Bayer 4032aaf097 - enhance detail here regarding the difference between
Connection.connection and engine.raw_connection()
2015-01-20 11:36:14 -05:00
Mike Bayer 234a5b9723 - restore r611883ffb35ca6664649f6328ae8 with additional fixes and an additional test
that is much more specific to #1326
2015-01-19 18:31:10 -05:00
Mike Bayer 26a1d8e77c - reverse the last commit temporarily as it breaks all the polymorphic cases 2015-01-19 18:00:21 -05:00
Mike Bayer 611883ffb3 - The primary :class:.Mapper of a :class:.Query is now passed to the
:meth:`.Session.get_bind` method when calling upon
:meth:`.Query.count`, :meth:`.Query.update`, :meth:`.Query.delete`,
as well as queries against mapped columns,
:obj:`.column_property` objects, and SQL functions and expressions
derived from mapped columns.   This allows sessions that rely upon
either customized :meth:`.Session.get_bind` schemes or "bound" metadata
to work in all relevant cases.
fixes #3227 fixes #3242 fixes #1326
2015-01-19 17:55:23 -05:00
Mike Bayer f3a892a3ef - Custom dialects that implement :class:.GenericTypeCompiler can
now be constructed such that the visit methods receive an indication
of the owning expression object, if any.  Any visit method that
accepts keyword arguments (e.g. ``**kw``) will in most cases
receive a keyword argument ``type_expression``, referring to the
expression object that the type is contained within.  For columns
in DDL, the dialect's compiler class may need to alter its
``get_column_specification()`` method to support this as well.
The ``UserDefinedType.get_col_spec()`` method will also receive
``type_expression`` if it provides ``**kw`` in its argument
signature.
fixes #3074
2015-01-16 20:03:33 -05:00
Mike Bayer 79fa69f1f3 - Fixed bug where Postgresql dialect would fail to render an
expression in an :class:`.Index` that did not correspond directly
to a table-bound column; typically when a :func:`.text` construct
was one of the expressions within the index; or could misinterpret the
list of expressions if one or more of them were such an expression.
fixes #3174
2015-01-16 18:03:45 -05:00
Mike Bayer 41307cd733 - add new section to ORM referring to runtime inspection API,
more links, attempt to fix #3290
2015-01-14 12:02:41 -05:00
Mike Bayer b63aae2c23 - The "wildcard" loader options, in particular the one set up by
the :func:`.orm.load_only` option to cover all attributes not
explicitly mentioned, now takes into account the superclasses
of a given entity, if that entity is mapped with inheritance mapping,
so that attribute names within the superclasses are also omitted
from the load.  Additionally, the polymorphic discriminator column
is unconditionally included in the list, just in the same way that
primary key columns are, so that even with load_only() set up,
polymorphic loading of subtypes continues to function correctly.
fixes #3287
2015-01-13 17:04:35 -05:00
Mike Bayer 92cc232726 - The multi-values version of :meth:.Insert.values has been
repaired to work more usefully with tables that have Python-
side default values and/or functions, as well as server-side
defaults. The feature will now work with a dialect that uses
"positional" parameters; a Python callable will also be
invoked individually for each row just as is the case with an
"executemany" style invocation; a server- side default column
will no longer implicitly receive the value explicitly
specified for the first row, instead refusing to invoke
without an explicit value. fixes #3288
2015-01-13 14:33:33 -05:00
Mike Bayer 5f1d34c4c8 - changelog for pr 41 2015-01-12 13:24:11 -05:00
Mike Bayer 57f684b4b4 - Fixed bug where if an exception were thrown at the start of a
:class:`.Query` before it fetched results, particularly when
row processors can't be formed, the cursor would stay open with
results pending and not actually be closed.  This is typically only
an issue on an interpreter like Pypy where the cursor isn't
immediately GC'ed, and can in some circumstances lead to transactions/
locks being open longer than is desirable.
fixes #3285
2015-01-05 21:38:19 -05:00
Mike Bayer 145d015151 fix verbiage 2015-01-05 19:07:33 -05:00
Mike Bayer 1104dcaa67 - add MemoizedSlots, a generalized solution to using __getattr__
for memoization on a class that uses slots.
- apply many more __slots__.  mem use for nova now at 46% savings
2015-01-05 19:02:08 -05:00
Mike Bayer 41ae0270d9 - make a new page that introduces mapping a little better for the
"mapping" section, contrasts declarative and classical some more
2015-01-05 14:20:03 -05:00
Mike Bayer 18d3dc7163 - Structural memory use has been improved via much more significant use
of ``__slots__`` for many internal objects.  This optimization is
particularly geared towards the base memory size of large applications
that have lots of tables and columns, and greatly reduces memory
size for a variety of high-volume objects including event listening
internals, comparator objects and parts of the ORM attribute and
loader strategy system.
2015-01-04 19:28:29 -05:00
Mike Bayer 93742b3d5c - The :class:.mysql.SET type has been overhauled to no longer
assume that the empty string, or a set with a single empty string
value, is in fact a set with a single empty string; instead, this
is by default treated as the empty set.  In order to handle persistence
of a :class:`.mysql.SET` that actually wants to include the blank
value ``''`` as a legitimate value, a new bitwise operational mode
is added which is enabled by the
:paramref:`.mysql.SET.retrieve_as_bitwise` flag, which will persist
and retrieve values unambiguously using their bitflag positioning.
Storage and retrieval of unicode values for driver configurations
that aren't converting unicode natively is also repaired.
fixes #3283
2015-01-03 20:43:45 -05:00
Mike Bayer 378ad79713 - put this back now that we found the source of this 2015-01-02 16:43:11 -05:00
Mike Bayer 21f47124ab - restate sort_tables in terms of a more fine grained
sort_tables_and_constraints function.
- The DDL generation system of :meth:`.MetaData.create_all`
and :meth:`.Metadata.drop_all` has been enhanced to in most
cases automatically handle the case of mutually dependent
foreign key constraints; the need for the
:paramref:`.ForeignKeyConstraint.use_alter` flag is greatly
reduced.  The system also works for constraints which aren't given
a name up front; only in the case of DROP is a name required for
at least one of the constraints involved in the cycle.
fixes #3282
2015-01-01 20:17:06 -05:00
Mike Bayer 8f5e4acbf6 - Added a new accessor :attr:.Table.foreign_key_constraints
to complement the :attr:`.Table.foreign_keys` collection,
as well as :attr:`.ForeignKeyConstraint.referred_table`.
2015-01-01 13:39:42 -05:00
Mike Bayer 87a1af4efe - fix some RST whitespace syntactical issues in toctrees
- have the topmost toctree only include page names
- add glossary to toctree, remove search by itself
2014-12-29 20:01:21 -05:00
Mike Bayer 3a620a304e - see if we can get RTD to use this for now 2014-12-28 17:11:36 -05:00
Mike Bayer 1cb24b3742 bump 2014-12-28 11:06:47 -05:00
Mike Bayer 60368fdd9f bump 2014-12-28 10:43:39 -05:00
Mike Bayer 0bd632804e - fix links for loading, add a redirect page
bump

foo
2014-12-27 19:52:44 -05:00
Mike Bayer d11c7a197e - another bump 2014-12-27 17:56:40 -05:00
Mike Bayer 31e2fe75d9 - remove private superclasses from docs in favor of fixing
zzzeeksphinx to omit these from warning

Conflicts:
	doc/build/orm/internals.rst
2014-12-27 17:46:55 -05:00
Mike Bayer 3ccae26789 remove pipe... 2014-12-27 17:17:05 -05:00
Mike Bayer 5343d24fee corrections 2014-12-27 16:54:32 -05:00
Mike Bayer 544e72bcb6 - corrections
- attempt to add a script to semi-automate the fixing of links
2014-12-27 16:22:41 -05:00
Mike Bayer 182553b740 - make the google deprecation messages more specific, use full URL
format
- add an extra doc to MySQLdb
- changelog
2014-12-19 14:15:56 -05:00
Priit Laes 8ae47dc6e0 Maul the evaulate & friends typo 2014-12-19 19:32:27 +02:00
Mike Bayer d1ac6cb33a - Fixed bug where using a :class:.TypeDecorator that implemented
a type that was also a :class:`.TypeDecorator` would fail with
Python's "Cannot create a consistent method resolution order (MRO)"
error, when any kind of SQL comparison expression were used against
an object using this type.
2014-12-19 12:14:52 -05:00
Mike Bayer b92589e3a0 - create a new section on "custom load rules", to help with edge
cases like that of #3277.  fixes #3277
2014-12-19 11:55:10 -05:00
Mike Bayer 023067a0b7 - classical is really not the most important topic here 2014-12-17 19:20:06 -05:00
Mike Bayer 9561321d03 - squash-merge the improve_toc branch, which moves all the Sphinx styling
and extensions into an external library, and also reorganizes most large documentation
pages into many small areas to reduce scrolling and better present the context
into a more fine-grained hierarchy.
2014-12-17 17:24:23 -05:00
Mike Bayer 00aaaa4bd4 - Added a version check to the MySQLdb dialect surrounding the
check for 'utf8_bin' collation, as this fails on MySQL server < 5.0.
fixes #3274
2014-12-16 17:02:48 -05:00
Mike Bayer d5f88ee9e5 - rework the migration doc sections
- small fixes in bulk docs
2014-12-14 17:10:44 -05:00
Mike Bayer 7cd4362924 - automap isn't new anymore 2014-12-14 16:21:40 -05:00
Mike Bayer 468db416db - rework sqlite FK and unique constraint system to combine both PRAGMA
and regexp parsing of SQL in order to form a complete picture of
constraints + their names.  fixes #3244 fixes #3261
- factor various PRAGMA work to be centralized into one call
2014-12-13 19:24:56 -05:00
Jon Nelson 5b146e1bab - add tentative 'changelog' documentation on #3244 2014-12-13 18:34:51 -05:00
Mike Bayer cf7981f60d - Added new method :meth:.Session.invalidate, functions similarly
to :meth:`.Session.close`, except also calls
:meth:`.Connection.invalidate`
on all connections, guaranteeing that they will not be returned to
the connection pool.  This is useful in situations e.g. dealing
with gevent timeouts when it is not safe to use the connection further,
even for rollbacks.
references #3258
2014-12-12 19:59:11 -05:00
Yuval Langer c86c593ec3 Removing unneeded space. 2014-12-09 04:19:18 +02:00
Mike Bayer 3f1477e2ec - A new series of :class:.Session methods which provide hooks
directly into the unit of work's facility for emitting INSERT
and UPDATE statements has been created.  When used correctly,
this expert-oriented system can allow ORM-mappings to be used
to generate bulk insert and update statements batched into
executemany groups, allowing the statements to proceed at
speeds that rival direct use of the Core.
fixes #3100
2014-12-08 01:10:30 -05:00