module provide *create table as* statement
Project description
"Create Table As" form for SQLAlchemy
Add create table as construct to SQLalchemy
Usage
Examples:
>>> from sqlalchemy import *
>>> from sqlalchemy_create_table_as import *
>>> str(
... CreateTableAs(
... table('new_table'),
... select(column('f1'), column('f2')).select_from(table('old_table'))
... )
... )
'CREATE TABLE new_table AS SELECT f1, f2 \nFROM old_table'
>>> t = Table('old_table', MetaData(), Column('f1'), Column('f2'))
>>> str(CreateTableAs(table('new_table'), select(t)))
>>> 'CREATE TABLE new_table AS SELECT old_table.f1, old_table.f2 \nFROM old_table'
Installation
...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlalchemy_create_table_as-0.1.0.tar.gz.
File metadata
- Download URL: sqlalchemy_create_table_as-0.1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.4 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b111c7a45912540c1c66c2ebcd6b0600cee67c703f5b077f00690b33d40ca9
|
|
| MD5 |
64b0a8c684e62919b82217fd7f639d5b
|
|
| BLAKE2b-256 |
ac1abd3c1fee60d955c054c6cc444a9a57ef0534c37c5b1121b4c0d5721b9960
|
File details
Details for the file sqlalchemy_create_table_as-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sqlalchemy_create_table_as-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.4 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
688d4f46fc183a25e03723ac0fb744e20b986e89da08dfe6f6ebf252ec9c8ad3
|
|
| MD5 |
03957c85b5082b3fc25bf2081e35034c
|
|
| BLAKE2b-256 |
53f51438c2d3cb0314720008373c127640ae921eedc2dbc874ccd2d1f8f8b3b1
|