diff options
| author | jonathan vanasco <jonathan@2xlp.com> | 2021-09-27 12:41:24 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-11-17 16:06:57 -0500 |
| commit | 0fa0beacb465c61e792c97d530a0e8fdd7139256 (patch) | |
| tree | b84a309556ccc14ed2d86e2562a33a0e99369c37 /lib/sqlalchemy/sql | |
| parent | 6206f0ff74e95c9339dc0f0e26caab55e9bcda45 (diff) | |
| download | sqlalchemy-0fa0beacb465c61e792c97d530a0e8fdd7139256.tar.gz | |
Add new sections regarding schemas and reflection
* add a new section to reflection.rst `Schemas and Reflection`.
* this contains some text from the ticket
* migrate some text from `Specifying the Schema Name` to new section
* migrate some text from PostgreSQL dialect to new section
* target text is made more generic
* cross-reference the postgres and new sections to one another, to avoid duplication of docs
* update some docs 'meta' to 'metadata_obj'
Fixes: #4387
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I2b08672753fb2575d30ada07ead77587468fdade
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/schema.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/type_api.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 641e62be3..c8f26f906 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -4877,7 +4877,7 @@ class Computed(FetchedValue, SchemaItem): from sqlalchemy import Computed - Table('square', meta, + Table('square', metadata_obj, Column('side', Float, nullable=False), Column('area', Float, Computed('side * side')) ) @@ -4974,7 +4974,7 @@ class Identity(IdentityOptions, FetchedValue, SchemaItem): from sqlalchemy import Identity - Table('foo', meta, + Table('foo', metadata_obj, Column('id', Integer, Identity()) Column('description', Text), ) diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index f58851268..34f23fb0c 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -838,7 +838,7 @@ class UserDefinedType(util.with_metaclass(VisitableCheckKWArg, TypeEngine)): Once the type is made, it's immediately usable:: - table = Table('foo', meta, + table = Table('foo', metadata_obj, Column('id', Integer, primary_key=True), Column('data', MyType(16)) ) |
