summaryrefslogtreecommitdiff
path: root/doc/build/tutorial
Commit message (Collapse)AuthorAgeFilesLines
...
* initial 2.0 setupMike Bayer2021-10-301-30/+14
| | | | | | | Adapted from 55e64f857daeb6057b85ff67297a774b when we previously started a 2.0 branch. Change-Id: Ib5af75df94b23104eebe0e918adcf979d798ea3b
* add sections for ORM use with UNIONMike Bayer2021-10-251-0/+77
| | | | | | | this is a fairly non-obvious part of the new ORM querying style and needs its own sections Change-Id: Iacb176020d580066c1e0b7f2b40bfbbcb3587d76
* Remove misplaced apostrophe in tutorial/index.rst (#7043)JMcB172021-09-191-1/+1
| | | Citation: http://www.sussex.ac.uk/informatics/punctuation/apostrophe/possessives
* fix: typos in doc/build/tutorial (#7005)Kevin Kirsche2021-09-084-6/+6
|
* standardizing docs #6821jonathan vanasco2021-08-233-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | (redo of 2999/I5609025feee8cfdecc09b55bfbf1bd13fa2e6602) This PR is designed to bring more clarity within the docs by renaming object instances that may be consfusingly similar to class, method, and attribute names. For example, instances of the class `MetaData` are available on some objects as `.metadata` property, and had appeared within the docs as both `meta` and `metadata` which has confused some users in the past. By this PR, the docs now utilize the following naming convention: * MetaData - SQLAlchemy class * .metadata - SQLAlchemy API attributes * metadata_obj - developer instantiated metadata objects or references Detailed Changes: * standardized `meta` and `metadata` instances to `metadata_obj`. note: the docs were evenly split between 'meta' and 'metadata'. * standardized 'cursor' to 'cursor_obj' to avoid confusion with the method. * standardized a 'scalar_subquery = ' to 'scalar_subq' to avoid confusion with the method. * standardized a 'cte = ' to 'cte_obj' to avoid confusion with the method Change-Id: I79c98aee16c5fc6649289b2dd7d6dfc368222fb4
* Replace all http:// links to https://Federico Caselli2021-07-041-1/+1
| | | | | | Also replace http://pypi.python.org/pypi with https://pypi.org/project Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
* Fix typos in "Working with Related Objects" docs (#6651)Samuel Cattini-Schultz2021-06-171-2/+2
| | | | | * Fix typo in "Working with Related Objects" docs * Fix typo in "Working with Related Objects" docs
* ✏️ Fix minor typos in "Selecting Rows with Core or ORM" (#6381)Sebastián Ramírez2021-04-281-2/+2
|
* ✏️ Fix typos in "Data Manipulation with the ORM" (#6389)Sebastián Ramírez2021-04-281-3/+3
|
* ✏️ Fix typos in "Working with Related Objects" (#6393)Sebastián Ramírez2021-04-281-5/+5
|
* ✏️ Fix small typo in "Updating and Deleting Rows with Core" (#6382)Sebastián Ramírez2021-04-281-1/+1
|
* ✏️ Fix small typos in "Working with Database Metadata" (#6369)Sebastián Ramírez2021-04-271-3/+3
|
* ✏️ Fix small formatting typo in "Working with Data" (#6370)Sebastián Ramírez2021-04-271-1/+1
|
* ✏️ Fix small typos in SQLAlchemy 1.4 / 2.0 Tutorial (#6358)Sebastián Ramírez2021-04-261-3/+3
| | | | | | | * ✏️ Fix small typos in SQLAlchemy 1.4 / 2.0 Tutorial * ⏪ Revert bikeshedding about "they", "we" as I'm not sure changing to "they" actually helps disambiguate or not, so better to leave as it is.
* ✏️ Fix small typo in Working with Transactions and the DBAPI (#6363)Sebastián Ramírez2021-04-261-1/+1
|
* Add order by to union exampleMike Bayer2021-04-231-2/+7
| | | | | | | | the query in the second union example needs order by to produce determinstic results on all plaforms including OSX, arm Change-Id: I88fcc391561db8567c389ed9e904e5de29c1c2ad
* Break up data.rst; add unions, literal_columnMike Bayer2021-04-224-2013/+2202
| | | | | | | | | | This breaks data.rst into three separate sub-sections, as SELECT is getting very long. It then adds sections on select() + text/literal_column as well as unions and set operations, and also tries to improve the ORDER BY section a bit. Change-Id: Id90e6b4ff3699b2bbcb6e2eebbd23193e2ede00a
* add some cross-linking for orderby/groupby docs + label examplesMike Bayer2021-04-191-0/+4
| | | | | Change-Id: I34d4958ded8ec95e439ee47fdcb600f357cf7ae3 References: #6324
* Return Row for CursorResult.inserted_primary_keyMike Bayer2021-04-111-0/+4
| | | | | | | | | The tuple returned by :attr:`.CursorResult.inserted_primary_key` is now a :class:`_result.Row` object with a named tuple interface on top of the existing tuple interface. Fixes: #3314 Change-Id: I85677ef60d8329648f368bf497f634758f4e087b
* Clarify select_from(A).join(B.a)Mike Bayer2021-04-111-0/+7
| | | | | Fixes: #2722 Change-Id: I025715023fa74b1f9ade4ecc8ed8712f42de727a
* document rowcount for ORM update/deleteMike Bayer2021-03-311-0/+2
| | | | Change-Id: I16f50cb50fc3cccc1bd7cae3a64a085b1ea68612
* earler -> earliermgjo58992021-03-211-1/+1
|
* refer to row elements as "elements", not columnsMike Bayer2021-02-221-12/+14
| | | | | | | | disambiguate between the "elements of a row" and a "column" which is taken to mean a database column, and remove confusing terms like "single-column ORM entity". Change-Id: I7304bdb6dd0f60ab0c36ef3ae40b1f36b29ea291
* Fix typo on tutorial/data.rstFederico Caselli2021-02-181-1/+1
| | | | Change-Id: Ib7f7a92e2ae15c732659525170118288aebad9a2
* fix repeated footnoteMike Bayer2021-02-151-2/+2
| | | | Change-Id: Ibd8239907c3cf747d0d9a0fb670e37c9913871f8
* Repair tests for older SQLite, timing, pypyMike Bayer2021-02-031-4/+4
| | | | Change-Id: I9e425d2415d18a893342244755c7748b546fb20d
* Implement support for functions as FROM with columns clause supportMike Bayer2021-02-031-0/+416
| | | | | | | | | | | | | | | | Implemented support for "table valued functions" along with additional syntaxes supported by PostgreSQL, one of the most commonly requested features. Table valued functions are SQL functions that return lists of values or rows, and are prevalent in PostgreSQL in the area of JSON functions, where the "table value" is commonly referred towards as the "record" datatype. Table valued functions are also supported by Oracle and SQL Server. Moved from I5b093b72533ef695293e737eb75850b9713e5e03 due to accidental push Fixes: #3566 Change-Id: Iea36d04c80a5ed3509dcdd9ebf0701687143fef5
* Replace with_labels() and apply_labels() in ORM/CoreGord Thompson2021-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace :meth:`_orm.Query.with_labels` and :meth:`_sql.GenerativeSelect.apply_labels` with explicit getters and setters ``get_label_style`` and ``set_label_style`` to accommodate the three supported label styles: ``LABEL_STYLE_DISAMBIGUATE_ONLY`` (default), ``LABEL_STYLE_TABLENAME_PLUS_COL``, and ``LABEL_STYLE_NONE``. In addition, for Core and "future style" ORM queries, ``LABEL_STYLE_DISAMBIGUATE_ONLY`` is now the default label style. This style differs from the existing "no labels" style in that labeling is applied in the case of column name conflicts; with ``LABEL_STYLE_NONE``, a duplicate column name is not accessible via name in any case. For legacy ORM queries using :class:`_query.Query`, the table-plus-column names labeling style applied by ``LABEL_STYLE_TABLENAME_PLUS_COL`` continues to be used so that existing test suites and logging facilities see no change in behavior by default, however this style of labeling is no longer required for SQLAlchemy queries to function, as result sets are commonly matched to columns using a positional approach since SQLAlchemy 1.0. Within test suites, all use of apply_labels() / use_labels now uses the new methods. New tests added to test/sql/test_deprecations.py nad test/orm/test_deprecations.py to cover just the old apply_labels() method call. Tests in ORM that made explicit use apply_labels()/ etc. where it isn't needed for the ORM to work correctly use default label style now. Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com> Fixes: #4757 Change-Id: I5fdcd2ed4ae8c7fe62f8be2b6d0e8f66409b6a54
* Revert "Implement support for functions as FROM with columns clause support"Mike Bayer2021-01-211-283/+0
| | | | | | | This reverts commit 05a31f2708590161d4b3b4c7ff65196c99b4a22b. Atom has this little button called "push" and just pushes to master, I wasn't even *on* master. oops
* Implement support for functions as FROM with columns clause supportMike Bayer2021-01-201-0/+283
| | | | | | | WIP Fixes: #3566 Change-Id: I5b093b72533ef695293e737eb75850b9713e5e03
* Fix docs typo: subuqery -> subqueryEvan Moore2021-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <!-- Provide a general summary of your proposed changes in the Title field above --> ### Description Fixes #5839 (sorry, realized just now that an issue wasn't required) ### 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: #5840 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5840 Pull-request-sha: b6f6af929fab4dab771565f6373b0275acbca793 Change-Id: I0b4c9b2d893e8141ee1cd21742a9b111fe371bac
* improve cross-linking between Core /ORM for schema argMike Bayer2020-11-301-0/+5
| | | | | | | | | | | this should be backported to 1.3 as well to as much a degree as possible. Includes a new recipe to set the default schema name on connect. this will only work on 1.4, but also requires that we fix #5708 for it to work fully. Change-Id: I882edd5bbe06ee5b4d0a9c148854a57b2bcd4741
* Clarify how ORM rows are returned in the tutorialMike Bayer2020-11-171-9/+53
| | | | | | | | The ORM querying guide discussed how rows are returned but the tutorial fails to introduce this important concept. Fixes: #5706 Change-Id: I8c9585e28841b5dd86f4ab642f57cbc763635425
* Some small improvements on the tutorial 2.0 documentsFederico Caselli2020-11-136-63/+117
| | | | Change-Id: I7fb37d45c29307b2213bebd0ef280d73804ac473
* Allow multiple returning() callsMike Bayer2020-11-111-19/+34
| | | | | | | | Multiple calls to "returning", e.g. :meth:`_sql.Insert.returning`, may now be chained to add new columns to the RETURNING clause. Fixes: #5695 Change-Id: Ie2dac4162f686c730e000e31dccfb38f9ce9c96e
* Warn / raise for returning() / return_defaults() combinationsMike Bayer2020-11-111-1/+1
| | | | | | | | | | | | | A warning is emmitted if a returning() method such as :meth:`_sql.Insert.returning` is called multiple times, as this does not yet support additive operation. Version 1.4 will support additive operation for this. Additionally, any combination of the :meth:`_sql.Insert.returning` and :meth:`_sql.Insert.return_defaults` methods now raises an error as these methods are mutually exclusive; previously the operation would fail silently. Fixes: #5691 Change-Id: Id95e0f9da48bba0b59439cb26564f0daa684c8e3
* Remove misleading correlation examplesMike Bayer2020-11-111-82/+99
| | | | | | | add links to tutorial docs Fixes: #5694 Change-Id: I10a8e3f46a115945ded36d4ee59165c056c10f7a
* tutorial 2.0 WIPreview/mike_bayer/tutorial20Mike Bayer2020-10-319-0/+4316
Add SelectBase.exists() method as it seems strange this is not available already. The Exists construct itself does not provide full SELECT-building capabilities so it makes sense this should be used more like a scalar_subquery. Make sure stream_results is getting set up when yield_per is used, for 2.0 style statements as well. this was hardcoded inside of Query.yield_per() and is now moved to take place within QueryContext. Change-Id: Icafcd4fd9b708772343d56edf40995c9e8f835d6