summaryrefslogtreecommitdiff
path: root/examples/elementtree
Commit message (Collapse)AuthorAgeFilesLines
* New ORM Query Guide featuring DML supportMike Bayer2022-09-257-703/+0
| | | | | | | | | | | | | | | | | reviewers: these docs publish periodically at: https://docs.sqlalchemy.org/en/gerrit/4042/orm/queryguide/index.html See the "last generated" timestamp near the bottom of the page to ensure the latest version is up Change includes some other adjustments: * small typing fixes for end-user benefit * removal of a bunch of old examples for patterns that nobody uses or aren't really what we promote now * modernization of some examples, including inheritance Change-Id: I9929daab7797be9515f71c888b28af1209e789ff
* Clean up most py3k compatFederico Caselli2021-11-242-4/+0
| | | | Change-Id: I8172fdcc3103ff92aa049827728484c8779af6b7
* Remove object in class definitionFederico Caselli2021-11-223-9/+9
| | | | | References: #4600 Change-Id: I2a62ddfe00bc562720f0eae700a497495d7a987a
* References: #4426jonathan vanasco2021-09-283-18/+18
| | | | | | | | | | Updated elementtree example to replace the deprecated classical mappings interface with the current `registry.map_imperatively()` version. The examples STILL use classical mappings, so the ticket remains open. This update merely removes the deprecated API in favor of the (temporary?) replacement. Change-Id: I8ddb86b76d82ac9d87a55edb0225e6b2f6ab4940
* Fix various lib / test / examples typos (#7017)Kevin Kirsche2021-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: lib/sqlalchemy/sql/lambdas.py * fix: lib/sqlalchemy/sql/compiler.py * fix: lib/sqlalchemy/sql/selectable.py * fix: lib/sqlalchemy/orm/relationships.py * fix: lib/sqlalchemy/dialects/mssql/base.py * fix: lib/sql/test_compiler.py * fix: lib/sqlalchemy/testing/requirements.py * fix: lib/sqlalchemy/orm/path_registry.py * fix: lib/sqlalchemy/dialects/postgresql/psycopg2.py * fix: lib/sqlalchemy/cextension/immutabledict.c * fix: lib/sqlalchemy/cextension/resultproxy.c * fix: ./lib/sqlalchemy/dialects/oracle/cx_oracle.py * fix: examples/versioned_rows/versioned_rows_w_versionid.py * fix: examples/elementtree/optimized_al.py * fix: test/orm/test_attribute.py * fix: test/sql/test_compare.py * fix: test/sql/test_type_expression.py * fix: capitalization in test/dialect/mysql/test_compiler.py * fix: typos in test/dialect/postgresql/test_reflection.py * fix: typo in tox.ini comment * fix: typo in /lib/sqlalchemy/orm/decl_api.py * fix: typo in test/orm/test_update_delete.py * fix: self-induced typo * fix: typo in test/orm/test_query.py * fix: typos in test/dialect/mssql/test_types.py * fix: typo in test/sql/test_types.py
* Consider aliased=True, from_joinpoint as legacyMike Bayer2020-05-042-35/+70
| | | | | | | | | | | | | | | | For a 1.4 / 1.3 merge, rewrite the documentation for Query.join() to indicate calling forms that are now considered legacy, including the use of strings in join(), sending a series of join paths in one call, and using the aliased=True flag. update the elementtree examples as well to use aliased() (they are much simpler to understand this way too) and update other links. Also improve docs for aliased() and some other ORM targets such as PropComparator. Change-Id: I636e3a9130dc5509e51c2cf60a52f38fcadffbc6 References: #4705
* Remove print statement in favor of print() function in docs and examplesAlbert Tugushev2020-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <!-- Provide a general summary of your proposed changes in the Title field above --> ### Description <!-- Describe your changes in detail --> Remove print statements ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [X] A documentation / typographical error fix - Good to go, no issue or tests are needed - [ ] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #5166 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5166 Pull-request-sha: 04a7394f71298322188f0861b4dfe93e5485839d Change-Id: Ib90a59fac929661a18748c6e44966fb87e3978c6
* Enable F841Mike Bayer2019-06-202-4/+1
| | | | | | | | | | | This is a very useful assertion which prevents unused variables from being set up allows code to be more readable and sometimes even more efficient. test suites seem to be where the most problems are and there do not seem to be documentation examples that are using this, or at least the linter is not taking effect within rst blocks. Change-Id: I2b3341d8dd14da34879d8425838e66a4b9f8e27d
* Reinstate elementtree exampleVraj Mohan2019-01-164-25/+16
| | | | | | | | | | Partially fixes sqlalchemy/sqlalchemy#4426. Closes: #4441 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4441 Pull-request-sha: ed90f3b77c2d0f4cc2cd54f40f5af29b489977d2 Change-Id: Ic32e5d8020073da055b12a6aeb61e698a97dc504
* Post black reformattingMike Bayer2019-01-063-85/+123
| | | | | | | | | | | | | Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
* Run black -l 79 against all source filesMike Bayer2019-01-064-106/+225
| | | | | | | | | | | | | | This is a straight reformat run using black as is, with no edits applied at all. The black run will format code consistently, however in some cases that are prevalent in SQLAlchemy code it produces too-long lines. The too-long lines will be resolved in the following commit that will resolve all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
* - add a new sphinx extension "viewsource". takes advantage of part of the ↵Mike Bayer2013-11-093-25/+18
| | | | | | | | | 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.
* - the raw 2to3 runMike Bayer2013-04-272-41/+41
| | | | - went through examples/ and cleaned out excess list() calls
* whack more long lines in very old docstringsMike Bayer2013-02-021-10/+17
|
* -whitespace bonanza, contdMike Bayer2012-07-283-10/+10
|
* - whitespace removal bonanzaMike Bayer2011-01-023-15/+15
|
* - optimized_al doesn't need mapper extensionMike Bayer2010-09-244-42/+43
| | | | - convert to non-bound metadata, Session, session.commit()
* - converted all lazy=True|False|None to 'select'|'joined'|'noload'Mike Bayer2010-03-242-4/+4
| | | | | - converted all eager to joined in examples - fixed beaker/advanced.py to reference RelationshipCache
* - The official name for the relation() function is nowMike Bayer2010-03-172-9/+9
| | | | | | relationship(), to eliminate confusion over the relational algebra term. relation() however will remain available in equal capacity for the foreseeable future. [ticket:1740]
* Cleaned up some long lines to test the commit hooks.Michael Trier2010-03-071-25/+28
|
* - mega example cleanupMike Bayer2010-01-194-29/+30
| | | | | | - added READMEs to all examples in each __init__.py and added to sphinx documentation - added versioning example - removed vertical/vertical.py, the dictlikes are more straightforward
* Added in Examples into the test suite so they get exercised regularly. ↵Michael Trier2009-07-272-1/+6
| | | | Cleaned up some deprecation warnings in the examples.
* Cleaned up the deprecation problems with the examples.Michael Trier2009-04-133-3/+3
|
* Lots of fixes to the code examples to specify imports explicitly.Michael Trier2009-03-313-17/+18
| | | | | | | Explicit imports make it easier for users to understand the examples. Additionally a lot of the examples were fixed to work with the changes in the 0.5.x code base. One small correction to the Case expression. Thanks a bunch to Adam Lowry! Fixes #717.
* typoGaëtan de Menten2008-07-111-1/+1
|
* oof...unicode object still needs to return the value if it just warned...Mike Bayer2007-12-143-24/+24
|
* small fix for filter() aliasing, upgraded elementtree examples to use 0.4 ↵Mike Bayer2007-08-032-37/+29
| | | | style queries
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-276-0/+524
maintenance branch in branches/rel_0_3.