diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-08-26 18:55:05 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-08-26 18:55:05 +0000 |
| commit | 7a15313c9e42bfcdd03b79a8edf3d0a7eb97d78d (patch) | |
| tree | ae09669d82cb00428dbccfa47206b4bd8c85231a /doc | |
| parent | 5385cc32c74329bc5583f18b747c2b954251b9d4 (diff) | |
| download | sqlalchemy-7a15313c9e42bfcdd03b79a8edf3d0a7eb97d78d.tar.gz | |
fixed inaccuracies regarding "connectable" parameter sent to create/drop
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/build/content/metadata.txt | 4 | ||||
| -rw-r--r-- | doc/build/content/unitofwork.txt | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/build/content/metadata.txt b/doc/build/content/metadata.txt index b9e16f41f..171b39594 100644 --- a/doc/build/content/metadata.txt +++ b/doc/build/content/metadata.txt @@ -266,7 +266,7 @@ Many table, schema, or column names require quoting to be enabled. Reasons for ### Creating and Dropping Database Tables {@name=creating} -Creating and dropping individual tables can be done via the `create()` and `drop()` methods of `Table`; these methods take an optional `engine` parameter which references an `Engine` or a `Connection`. If not supplied, the `Engine` bound to the `MetaData` will be used, else an error is raised: +Creating and dropping individual tables can be done via the `create()` and `drop()` methods of `Table`; these methods take an optional `connectable` parameter which references an `Engine` or a `Connection`. If not supplied, the `Engine` bound to the `MetaData` will be used, else an error is raised: {python} meta = BoundMetaData('sqlite:///:memory:') @@ -296,7 +296,7 @@ The `create()` and `drop()` methods also support an optional keyword argument `c employees.create(connectable=e, checkfirst=True) employees.drop(checkfirst=False) -Entire groups of Tables can be created and dropped directly from the `MetaData` object with `create_all()` and `drop_all()`. These methods always check for the existence of each table before creating or dropping. Each method takes an optional `engine` keyword argument which can reference an `Engine` or a `Connection`. If no engine is specified, the underlying bound `Engine`, if any, is used: +Entire groups of Tables can be created and dropped directly from the `MetaData` object with `create_all()` and `drop_all()`. These methods always check for the existence of each table before creating or dropping. Each method takes an optional `connectable` keyword argument which can reference an `Engine` or a `Connection`. If no engine is specified, the underlying bound `Engine`, if any, is used: {python} engine = create_engine('sqlite:///:memory:') diff --git a/doc/build/content/unitofwork.txt b/doc/build/content/unitofwork.txt index 8319ecd09..8f49ad896 100644 --- a/doc/build/content/unitofwork.txt +++ b/doc/build/content/unitofwork.txt @@ -72,7 +72,7 @@ It is possible to install a default "threadlocal" session context by importing a objectstore.flush() # which is the same as this (assuming we are still on the same thread): - session = objectstore.get_session() + session = objectstore.session session.flush() We will now cover some of the key concepts used by Sessions and its underlying Unit of Work. |
