Commit Graph

26 Commits

Author SHA1 Message Date
Eric Hanchrow 0df9759b73 Revise / rewrite sentences that use the phrase "referred towards"
Comments by Mike <mike_mp@zzzcomputing.com>:

"Referred towards" is not correct English and can be replaced directly
with "referred to".  However, this then introduces a dangling
preposition to sentences which I don't think is appropriate for this
style of writing.  So instead, use phrases like "known as",
"references", "to which X refers".

To help me identify dangling prepositions I made use of ChatGPT,
here's the log of how that transpired:
https://chat.openai.com/share/60d42ff4-c1ac-4232-893a-415c2b6d7320

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Closes: #10210
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/10210
Pull-request-sha: 5d30e79c14

Change-Id: Ib6a98e5be441f5b25d3929a2efb7d873bcfef98e
2023-09-20 18:18:29 -04:00
Tim Stewart bf3a395e8f fix typo ('resemblence' -> 'resemblance') (#9674) 2023-04-20 19:42:02 +02:00
Tom Wolfskämpf c7ce7ff022 docs: 📚 fix duplicate word typo (#9539) 2023-03-25 18:45:37 +01:00
Mike Bayer 42b3b80fae add tip that reflection is not necessary for an existing database
a new user spent many days misled by this paragraph thinking
they were required to use reflection for an existing database.

Change-Id: I4c6757b931481db7a8d4202334382143e1491935
2023-03-21 13:40:36 -04:00
easy_markie_tee 9d9e47fe93 Fix Typo In Tutorial (#9399)
Missing a word on the page `Working with Database Metadata`.
First paragraph under section 'Setting up MetaData with Table objects'.
"...the database which we query from is know [as] a table."

Co-authored-by: markie tee <cassette.head@gmail.com>
2023-03-01 22:51:43 +01:00
Federico Caselli 8b4b26e709 avoid confusion in rst comment
Change-Id: I6e971f7445ae19f73097516b58776ab05a5371f1
2023-01-18 23:02:48 +01:00
Mike Bayer 6da2f72b11 super-fine pass through the metadata tutorial
try to keep the wordiness down here, using sidebars
and topics for non-essential information.   Sphinx seems
to read out attrs from under TYPE_CHECKING sections now
so link out the attrs in DeclarativeBase w/ docstrings,
not sure why we didn't think of this earlier.  looks great

Change-Id: Ib2e07e3606185998561c2d77b2564fd3eddb4d75
2023-01-15 13:11:38 -05:00
Mike Bayer 0c5faf37c2 fix typo
Change-Id: I273459175a3c55290b1f6c28f656ed9c4db17ccf
2023-01-13 14:31:28 -05:00
Federico Caselli b04b7527ed Make the custom type map more discoverable
Change-Id: Id6cdaddad83aa93508e256e54010a6c53218b717
2023-01-13 10:40:19 -05:00
Federico Caselli dce11383f8 Improve sql formatting
change {opensql} to {printsql} in prints, add missing markers

Change-Id: I07b72e6620bb64e329d6b641afa27631e91c4f16
2023-01-11 20:24:29 +01:00
Mike Bayer 2f09374d44 remove anchor removed by mistake
Change-Id: I20e196f63c8cea9cd805501ab174cab320575b05
2023-01-09 15:20:39 -05:00
Mike Bayer c30a48604c fix inconsistent title level
Change-Id: I954818fdf9f5b56a895dbfdaf191c4c5867b574f
2023-01-09 15:16:50 -05:00
Mike Bayer 1e7d452836 more thoughts on tutorial presentation of ORM /Core
Change-Id: Iaa0c160e3f8285f1ca989dcb12b86de15ea82f03
2023-01-04 15:17:26 -05:00
Mike Bayer 72268e9387 tutorial updates re: Core /ORM commonality
updates for Insert / bulk insert, executemanyvalues,
as well as beginning to describe Table / declared class more
closely together, mentioning typing support.

Fixed a long-standing issue where sphinx would complain about
the Insert symbol being ambiguous.

Change-Id: Id4cc09b9581e8fa39c9c00bc8f229636e626e9bc
2023-01-03 18:21:25 -05:00
Mike Bayer 6c180ab743 the future is here
the autodoc for the "future" Engine / Connection were removed,
so all these links weren't working.   Replace all _future
for these with _engine.  There was just one _future pointing
to select, changed that separately.

Change-Id: Ib28270d8da8616b533953204e22eabee9388d620
2022-10-02 21:26:22 -04:00
Federico Caselli dcbda9f1ea Improvements to code formatter
Change-Id: I75cf7143f3ed3bbc09aa8bc18edbce5c8af0f0be
2022-10-02 10:55:42 -04:00
Federico Caselli 23dbf572ce Format code in the rst docs file
Added script to format code in the rst documentation using black.
This is also added to the lint tox job to ensure that the code
in the docs is properly formatted.

Change-Id: I799444f22da153484ca5f095d57755762348da40
2022-09-30 14:39:48 -04:00
Mike Bayer 9a37ebdf99 update ORM declarative docs for new features
I screwed up a rebase or something so this was
temporarily in Ic51a12de3358f3a451bd7cf3542b375569499fc1

Change-Id: I847ee1336381221c0112b67854df022edf596b25
2022-07-16 16:28:11 -04:00
Federico Caselli db08a69948 rearchitect reflection for batched performance
Rearchitected the schema reflection API to allow some dialects to make use
of high performing batch queries to reflect the schemas of many tables at
once using much fewer queries. The new performance features are targeted
first at the PostgreSQL and Oracle backends, and may be applied to any
dialect that makes use of SELECT queries against system catalog tables to
reflect tables (currently this omits the MySQL and SQLite dialects which
instead make use of parsing the "CREATE TABLE" statement, however these
dialects do not have a pre-existing performance issue with reflection. MS
SQL Server is still a TODO).

The new API is backwards compatible with the previous system, and should
require no changes to third party dialects to retain compatibility;
third party dialects can also opt into the new system by implementing
batched queries for schema reflection.

Along with this change is an updated reflection API that is fully
:pep:`484` typed, features many new methods and some changes.

Fixes: #4379
Change-Id: I897ec09843543aa7012bcdce758792ed3d415d08
2022-06-18 14:57:26 -04:00
Mike Bayer 1dffb7cede clarify alternative mapping example
this second example is not part of the doctest steps,
clarify that it's not part of code examples to be present
in execution steps.   Add an extra registry +
declarative base on top
so that even if someone does run it, the Base will have
been reset and the examples will continue to work
(noting that column order in statements may change, but
probably nothing else).

Fixes: #7891
Change-Id: Icb1ba310230841e502185d9d0cadd3c18d467292
2022-04-03 10:52:30 -04:00
Maple 2ea12b2f5c fix small indentation typo (#7882) 2022-04-03 11:30:08 +02:00
jonathan vanasco 369edbbd67 standardizing docs #6821
(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
2021-08-23 16:25:21 -04:00
Sebastián Ramírez 2af1b107fc ✏️ Fix small typos in "Working with Database Metadata" (#6369) 2021-04-27 22:22:38 +02:00
mgjo5899 365e5295b8 earler -> earlier 2021-03-21 15:40:44 -05:00
Mike Bayer 0c8c7b6656 improve cross-linking between Core /ORM for schema arg
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
2020-11-30 19:07:36 -05:00
Mike Bayer 654b462d66 tutorial 2.0 WIP
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
2020-10-31 13:44:53 -04:00