Commit Graph

3720 Commits

Author SHA1 Message Date
Michael Trier 5af78e2946 Fixed typo where plugins docs were referencing synonyn_for instead of synonym_for. Closes #1029 2008-07-03 04:38:28 +00:00
Michael Trier d3581d1c09 Added PGCidr type to postgres. Closes #1092
(cherry picked from commit 2394a6bb6c5f77afd448640ce03cf6fda0335a23)
2008-07-03 04:21:13 +00:00
Michael Trier 4af4968926 Corrected a reference to alt_schema_2 and fixed a docstring indentation for Table. 2008-07-03 03:10:46 +00:00
Mike Bayer f3a9acc7e2 merge r4889, SQLite Float type, from 0.4 branch 2008-07-02 18:29:36 +00:00
Michael Trier 644d7ea600 Corrected docstring for Pool class to show that the default value for use_threadlocal is False. closes #1095. 2008-07-02 15:37:02 +00:00
Gaëtan de Menten 38180f855a simplified _get_colspec 2008-07-02 12:58:57 +00:00
Ants Aasma c571fd6f8a Ugh, learning to use git-svn, [4884] was not supposed to go upstream. Reverting. 2008-07-01 17:00:51 +00:00
Ants Aasma 64a23962ee Session.bind gets used as a default even when table/mapper specific binds are defined. 2008-07-01 16:51:25 +00:00
Ants Aasma c33e7c7bfa query update and delete need to autoflush 2008-07-01 16:51:14 +00:00
Mike Bayer 5873525e48 0.5 2008-06-30 21:33:57 +00:00
Mike Bayer 4095056a01 removed fairly pointless test which relied on PK generation artifacts 2008-06-30 05:09:04 +00:00
Jason Kirtland eaa4328aac - consider args[0] as self when introspecting def(*args): ... [ticket:1091] 2008-06-29 18:58:11 +00:00
Mike Bayer 8755dc3d66 - fixed up vertical.py
- Fixed query.join() when used in conjunction with a
columns-only clause and an SQL-expression
ON clause in the join.
2008-06-28 15:23:08 +00:00
Mike Bayer 4a66683c9f - Modified SQLite's representation of "microseconds" to
match the output of str(somedatetime), i.e. in that the
microseconds are represented as fractional seconds in
string format.  [ticket:1090]
- implemented a __legacy_microseconds__ flag on DateTimeMixin which can
be used per-class or per-type instances to get the old behavior, for
compatibility with existing SQLite databases encoded by a previous
version of SQLAlchemy.
- will implement the reverse legacy behavior in 0.4.
2008-06-27 20:12:11 +00:00
Jonathan Ellis a02b12da7e use normal ScopedSession, with autoflush, instead of custom one 2008-06-27 17:23:36 +00:00
Gaëtan de Menten d0c243711b session.Query().iterate_instances() has been renamed to just instances(). The old instances() method returning a list instead of an iterator no longer
exists. If you were relying on that behavior, you should use `list(your_query.instances())`.
2008-06-25 15:55:49 +00:00
Mike Bayer 22fcee0e07 - Repaired __str__() method on Query. [ticket:1066] 2008-06-24 19:27:32 +00:00
Mike Bayer 3e8b095178 - Fixed explicit, self-referential joins between two
joined-table inheritance mappers when using
query.join(cls, aliased=True).  [ticket:1082]
2008-06-22 19:02:19 +00:00
Mike Bayer f2af07217f fixed the quote() call within dropper.visit_index() 2008-06-22 19:01:42 +00:00
Mike Bayer 8c1f08c8aa merged r4870 from 0.4 branch, index name truncation, [ticket:820] 2008-06-22 17:52:13 +00:00
Mike Bayer b2b754c2ce - merged r4868, disallow overly long names from create/drop, from 0.4 branch, [ticket:571] 2008-06-22 16:56:16 +00:00
Mike Bayer be2d349ade - fixed some concrete inheritance ramifications regarding r4866
- added explicit test coverage for r4866 with joined table inheritance
2008-06-21 18:08:34 +00:00
Mike Bayer c5e2d673a9 - implemented [ticket:887], refresh readonly props upon save
- moved up "eager_defaults" active refresh step (this is an option used by just one user pretty much)
to be per-instance instead of per-table
- fixed table defs from previous deferred attributes enhancement
- CompositeColumnLoader equality comparison fixed for a/b == None; I suspect the composite capability in SA
needs a lot more work than this
2008-06-21 17:23:14 +00:00
Mike Bayer 060c3ce33c - In addition to expired attributes, deferred attributes
also load if their data is present in the result set
[ticket:870]
2008-06-21 16:08:04 +00:00
Gaëtan de Menten 8af372585a better comment 2008-06-20 13:33:43 +00:00
Jason Kirtland c49a7dd910 - Oops, convert @decorator to 2.3 syntax and strengthen raw_append test. 2008-06-19 17:40:13 +00:00
Mike Bayer c1363d8aca - Added is_active flag to Sessions to detect when
a transaction is in progress [ticket:976].  This
flag is always True with a "transactional"
(in 0.5 a non-"autocommit") Session.
2008-06-17 20:52:11 +00:00
Mike Bayer 3bff98d530 test coverage for server side statement detection 2008-06-17 20:16:26 +00:00
Mike Bayer be818baf28 merged r4857, postgres server_side_cursors fix, from 0.4 branch 2008-06-17 15:15:16 +00:00
Mike Bayer fd107f2329 remove old test 2008-06-12 20:46:22 +00:00
Mike Bayer d3fb8ff904 updated verbiage for 0.5beta1 release rel_0_5beta1 2008-06-12 20:29:13 +00:00
Jason Kirtland c8de80f4ea - Don't insist on locals() mutability [ticket:1073] 2008-06-12 20:09:02 +00:00
Mike Bayer c48ea0ae43 will call this beta1 (same as 0.4 version did) 2008-06-12 20:04:01 +00:00
Mike Bayer 887c8efc5b - merged r4841 from 0.4 branch (enable_typechecks lockdown) 2008-06-12 03:53:39 +00:00
Mike Bayer d733c2f829 restored a "distinct" setting that got whacked 2008-06-09 19:14:39 +00:00
Mike Bayer e83459d37d docstrings for instances()/iterate_instances() 2008-06-09 01:49:59 +00:00
Mike Bayer 3cd10102e4 - Query.UpdateDeleteTest.test_delete_fallback fails on mysql due to subquery in DELETE; not sure how to do this exact operation in MySQL
- added query_cls keyword argument to sessionmaker(); allows user-defined Query subclasses to be generated by query().
- added @attributes.on_reconstitute decorator, MapperExtension.on_reconstitute, both receieve 'on_load' attribute event allowing
non-__init__ dependent instance initialization routines.
- push memusage to the top to avoid pointless heisenbugs
- renamed '_foostate'/'_fooclass_manager' to '_sa_instance_state'/'_sa_class_manager'
- removed legacy instance ORM state accessors
- query._get() will use _remove_newly_deleted instead of expunge() on ObjectDeleted, so that transaction rollback
restores the previous state
- removed MapperExtension.get(); replaced by a user-defined Query subclass
- removed needless **kwargs from query.get()
- removed Session.get(cls, id); this is redundant against Session.query(cls).get(id)
- removed Query.load() and Session.load(); the use case for this method has never been clear, and the same functionality is available in more explicit ways
2008-06-09 01:24:08 +00:00
Mike Bayer cde133c45d merged merge fix from r4834/rel_0_4 branch 2008-06-03 14:33:08 +00:00
Mike Bayer 86ded90c6e make Query._clone() class-agnostic 2008-06-02 15:32:17 +00:00
Mike Bayer c998539b40 illustrates a simple Query "hook" to implement query caching. 2008-06-02 15:27:38 +00:00
Mike Bayer e525aee015 - removed query.min()/max()/sum()/avg(). these should be called using column arguments or values in conjunction with func.
- fixed [ticket:1008], count() works with single table inheritance
- changed the relationship of InstrumentedAttribute to class such that each subclass in an inheritance hierarchy gets a unique InstrumentedAttribute per column-oriented attribute, including for the same underlying ColumnProperty.  This allows expressions from subclasses to be annotated accurately so that Query can get a hold of the exact entities to be queried when using column-based expressions.  This repairs various polymorphic scenarios with both single and joined table inheritance.
- still to be determined is what does something like query(Person.name, Engineer.engineer_info) do; currently it's problematic.  Even trickier is query(Person.name, Engineer.engineer_info, Manager.manager_name)
2008-06-02 03:07:12 +00:00
Mike Bayer e3e1535720 merged r4829 of rel_0_4, [ticket:1058] 2008-06-01 14:15:41 +00:00
Mike Bayer 29e34c2a4b merged [ticket:1062] fix from 0.4 branch r4827 2008-05-30 21:01:20 +00:00
Mike Bayer 59c1887945 - improved the attribute and state accounting performed by query.update() and query.delete()
- added autoflush support to same
2008-05-29 14:45:40 +00:00
Jason Kirtland ff7574ffa3 - Lengthless String type 2008-05-29 02:42:58 +00:00
Ants Aasma 87718fa82b Add delete and update methods to query 2008-05-29 02:12:17 +00:00
Ants Aasma c194844692 Not implemenented binary ops also raise UnevaluatableError 2008-05-29 02:12:06 +00:00
Ants Aasma 4cccb50228 add with_only_columns to Select to allow for removing columns from selects 2008-05-29 02:11:59 +00:00
Ants Aasma 77c308367f Preliminary implementation for the evaluation framework 2008-05-29 02:11:49 +00:00
Mike Bayer 5ccfa64294 - bumped PG's call count on test #6 to 1193 for py2.4; this is due to non-pool-threadlocal nature adding some checkout overhead 2008-05-27 03:08:35 +00:00