summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Materialized paths example.Jack Zhou2014-06-072-0/+131
|
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-262-3/+3
| | | | Found using: https://github.com/intgr/topy
* - Support has been added for pytest to run tests. This runnerMike Bayer2014-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | is currently being supported in addition to nose, and will likely be preferred to nose going forward. The nose plugin system used by SQLAlchemy has been split out so that it works under pytest as well. There are no plans to drop support for nose at the moment and we hope that the test suite itself can continue to remain as agnostic of testing platform as possible. See the file README.unittests.rst for updated information on running tests with pytest. The test plugin system has also been enhanced to support running tests against mutiple database URLs at once, by specifying the ``--db`` and/or ``--dburi`` flags multiple times. This does not run the entire test suite for each database, but instead allows test cases that are specific to certain backends make use of that backend as the test is run. When using pytest as the test runner, the system will also run specific test suites multiple times, once for each database, particularly those tests within the "dialect suite". The plan is that the enhanced system will also be used by Alembic, and allow Alembic to run migration operation tests against multiple backends in one run, including third-party backends not included within Alembic itself. Third party dialects and extensions are also encouraged to standardize on SQLAlchemy's test suite as a basis; see the file README.dialects.rst for background on building out from SQLAlchemy's test platform.
* - Fixed bug in the versioned_history example where column-level INSERTMike Bayer2014-02-242-5/+38
| | | | defaults would prevent history values of NULL from being written.
* - use column.info to detect those cols part of "versioning"Mike Bayer2014-02-162-28/+56
| | | | | | | - pep8 cleanup - fix tests for "changed" column - document that "changed" is optional - changelog
* Merge branch 'patch-1' of https://github.com/jplaverdure/sqlalchemy into tMike Bayer2014-02-161-3/+5
|\
| * Switched to UTC Timestamppr/41jplaverdure2013-11-081-2/+2
| |
| * Added changed(timestamp) on _history table and supprot for schemasjplaverdure2013-11-081-3/+5
| |
* | - Added a tweak to the "history_meta" example where the check forMike Bayer2014-02-021-1/+2
| | | | | | | | | | "history" on a relationship-bound attribute will now no longer emit any SQL if the relationship is unloaded.
* | specify run as module hereMike Bayer2013-12-071-5/+6
| |
* | - remove verbiage about "namespaces" from the dogpile example, [ticket:2862]Mike Bayer2013-12-073-12/+15
| | | | | | | | - fix broken py2k/py3k isms
* | - add a new example section for "join conditions", start puttingMike Bayer2013-12-053-0/+210
| | | | | | | | the primaryjoin examples there
* | - the pronoun removal commit. there was only one instance of aMike Bayer2013-11-302-3/+3
| | | | | | | | | | | | | | | | standalone gendered pronoun with a gender-neutral subject, but also have replaced all occurences of "his/her", "his or her", etc. The docs have always strived to account for both genders in any non-specific singular pronoun, however recent controversy in the community suggests that a zero-gendered-pronoun policy is probably best going forward.
* | forgot to add this, oopsieMike Bayer2013-11-303-0/+396
| |
* | simplify thisMike Bayer2013-11-301-20/+2
| |
* | - start reworking examples to include more code from the wiki.Mike Bayer2013-11-295-253/+156
| | | | | | | | | | - add the other versioning examples from the wiki - modernize the dictlike examples
* | - add a new sphinx extension "viewsource". takes advantage of part of the ↵Mike Bayer2013-11-0933-125/+108
| | | | | | | | | | | | | | | | | | viewcode extension to allow ad-hoc display of the source of any file, as well as a "directory listing" structure. - reorganize examples/ to take advantage of new extension. in particular, keep moving all the descriptive text for files etc. into module docstrings, taking more advantage of self-documentation.
* | - add proof of concept for versioning, [ticket:2861]Mike Bayer2013-11-081-1/+31
|/
* - Fixed bug which prevented history_meta recipe from working withMike Bayer2013-11-073-99/+81
| | | | | | joined inheritance schemes more than one level deep. - don't need to use _lib.py here anymore now that these features are in sqlalchemy.testing
* - reorganize docs so expression, schema are broken out into subfiles, ↵Mike Bayer2013-08-181-0/+1
| | | | | | they're too big - fix the targeting of module names moved around by using custom handlers for "Bases", etc.
* - changelogMike Bayer2013-08-171-26/+26
| | | | - clean up these tests to not use globals so much, close out the session
* Made primary_key autoincrement=False in versioning example.Patrick R. Schmid2013-07-311-3/+3
|
* modernize this a bitMike Bayer2013-07-271-19/+10
|
* - Improved the examples in ``examples/generic_associations``, includingMike Bayer2013-07-195-48/+194
| | | | | | | | | | | | | | | that ``discriminator_on_association.py`` makes use of single table inheritance do the work with the "discriminator". Also added a true "generic foreign key" example, which works similarly to other popular frameworks in that it uses an open-ended integer to point to any other table, foregoing traditional referential integrity. While we don't recommend this pattern, information wants to be free. Also in 0.8.3. - Added a convenience class decorator :func:`.as_declarative`, is a wrapper for :func:`.declarative_base` which allows an existing base class to be applied using a nifty class-decorated approach. Also in 0.8.3.
* Forgot final check that a delete in a backref also doesn't create a new versionMatt Chisholm2013-06-171-0/+3
| | | | follow up to https://bitbucket.org/zzzeek/sqlalchemy/pull-request/2
* don't create a history entry when an object in a backref has changedMatt Chisholm2013-06-152-3/+42
| | | | The code that determines whether an object in a relation has been added/removed does not take into account that that relation may be a backref. If the relation is a backref, then nothing on the current table is changing, and therefore no history entry should be created.
* Merge branch 'master' into rel_0_9Mike Bayer2013-05-281-1/+1
|\
| * Fixed a small bug in the dogpile example where the generationMike Bayer2013-05-281-1/+1
| | | | | | | | | | of SQL cache keys wasn't applying deduping labels to the statement the same way :class:`.Query` normally does.
* | - the raw 2to3 runMike Bayer2013-04-2729-296/+296
|/ | | | - went through examples/ and cleaned out excess list() calls
* modernize some more examplesMike Bayer2013-04-2710-71/+80
|
* Fixed a long-standing bug in the caching example, whereMike Bayer2013-04-181-14/+5
| | | | | | | | | the limit/offset parameter values wouldn't be taken into account when computing the cache key. The _key_from_query() function has been simplified to work directly from the final compiled statement in order to get at both the full statement as well as the fully processed parameter list.
* - remove erroneous second RelationshipCache classMike Bayer2013-04-181-18/+0
|
* whack more long lines in very old docstringsMike Bayer2013-02-0210-29/+54
|
* Fixed a regression in the examples/dogpile_caching exampleMike Bayer2013-01-081-1/+2
| | | | which was due to the change in #2614.
* fixing InstrumentationManager linksDiana Clarke2012-12-071-3/+14
|
* - converted beaker demo to dogpile.cache, [ticket:2589]Mike Bayer2012-10-2111-413/+418
|
* add a noteMike Bayer2012-08-171-0/+3
|
* - really start making postgis example slick.Mike Bayer2012-08-171-60/+62
|
* - [feature] To complement [ticket:2547], typesMike Bayer2012-08-171-18/+13
| | | | | | | | | | | | | | | | can now provide "bind expressions" and "column expressions" which allow compile-time injection of SQL expressions into statements on a per-column or per-bind level. This is to suit the use case of a type which needs to augment bind- and result- behavior at the SQL level, as opposed to in the Python level. Allows for schemes like transparent encryption/ decryption, usage of Postgis functions, etc. [ticket:1534] - update postgis example fully. - still need to repair the result map propagation here to be transparent for cases like "labeled column".
* - modernize most of the postgis example. would like to do [ticket:1534] also.Mike Bayer2012-08-161-91/+85
| | | | | - we don't have coverage for type-wide instrumentation events, the listener was broke. could break again too.
* update the postgis example to actually work, using the old way (we'll update ↵Mike Bayer2012-08-161-9/+9
| | | | shortly)
* -whitespace bonanza, contdMike Bayer2012-07-2831-153/+153
|
* trailing whitespace bonanzaMike Bayer2012-07-285-34/+34
|
* - [moved] The InstrumentationManager interfaceMike Bayer2012-06-241-108/+11
| | | | | | | | | | | | | and the entire related system of alternate class implementation is now moved out to sqlalchemy.ext.instrumentation. This is a seldom used system that adds significant complexity and overhead to the mechanics of class instrumentation. The new architecture allows it to remain unused until InstrumentationManager is actually imported, at which point it is bootstrapped into the core.
* - [feature] The "deferred declarativeMike Bayer2012-05-172-144/+0
| | | | | | | | | | | | | | | | reflection" system has been moved into the declarative extension itself, using the new DeferredReflection class. This class is now tested with both single and joined table inheritance use cases. [ticket:2485] - [bug] The autoload_replace flag on Table, when False, will cause any reflected foreign key constraints which refer to already-declared columns to be skipped, assuming that the in-Python declared column will take over the task of specifying in-Python ForeignKey or ForeignKeyConstraint declarations.
* - [feature] New standalone function with_polymorphic()Mike Bayer2012-04-232-125/+135
| | | | | | | | | | | provides the functionality of query.with_polymorphic() in a standalone form. It can be applied to any entity within a query, including as the target of a join in place of the "of_type()" modifier. [ticket:2333] - redo a large portion of the inheritance docs in terms of declarative, new with_polymorphic() function - upgrade examples/inheritance/polymorph, rename to "joined"
* - [bug] Altered _params_from_query() functionMike Bayer2012-02-141-4/+8
| | | | | | | in Beaker example to pull bindparams from the fully compiled statement, as a quick means to get everything including subqueries in the columns clause, etc.
* declarartive reflection example didn't actually work for single inheritance, ↵Mike Bayer2012-02-091-0/+11
| | | | added a tweak to make that possible
* - [bug] Improved the "declarative reflection"Mike Bayer2012-01-281-15/+26
| | | | | | | | example to support single-table inheritance, multiple calls to prepare(), tables that are present in alternate schemas, establishing only a subset of classes as reflected.
* declarative reflection exampleMike Bayer2012-01-282-1/+9
|