Did I find the right examples for you? yes no

All Samples(8067)  |  Call(6186)  |  Derive(1)  |  Import(1880)
Represent a table in a database.

e.g.::

    mytable = Table("mytable", metadata,
                    Column('mytable_id', Integer, primary_key=True),
                    Column('value', String(50))
               )

The :class:`.Table` object constructs a unique instance of itself based(more...)

src/s/q/sqlalchemy-HEAD/examples/large_collection/large_collection.py   sqlalchemy(Download)
 
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey,
                        create_engine)
from sqlalchemy.orm import (mapper, relation, sessionmaker)
 
 
meta = MetaData()
 
org_table = Table('organizations', meta, 
    mysql_engine='InnoDB')
 
member_table = Table('members', meta,
    Column('member_id', Integer, primary_key=True),
    Column('member_name', String(50), nullable=False, key='name'),

src/k/i/kitsune-HEAD/vendor/packages/sqlalchemy/examples/vertical/dictlike-polymorphic.py   kitsune(Download)
 
if __name__ == '__main__':
    from sqlalchemy import (MetaData, Table, Column, Integer, Unicode,
        ForeignKey, UnicodeText, and_, not_, or_, String, Boolean, cast, text,
        null, case)
    metadata = MetaData()
 
    animals = Table('animal', metadata,
                    Column('id', Integer, primary_key=True),
                    Column('name', Unicode(100)))
 
    chars = Table('facts', metadata,

src/n/o/nova-gce-HEAD/nova/db/sqlalchemy/migrate_repo/versions/082_essex.py   nova-gce(Download)
from migrate import ForeignKeyConstraint
from sqlalchemy import Boolean, BigInteger, Column, DateTime, Float, ForeignKey
from sqlalchemy import Index, Integer, MetaData, String, Table, Text
 
from nova import flags
def upgrade(migrate_engine):
    meta = MetaData()
    meta.bind = migrate_engine
 
    agent_builds = Table('agent_builds', meta,
    )
 
    aggregate_hosts = Table('aggregate_hosts', meta,
        Column('created_at', DateTime),
        Column('updated_at', DateTime),
    )
 
    aggregate_metadata = Table('aggregate_metadata', meta,
        Column('created_at', DateTime),
        Column('updated_at', DateTime),
    )
 
    aggregates = Table('aggregates', meta,
        Column('created_at', DateTime),
        Column('updated_at', DateTime),

src/k/u/kuma-lib-HEAD/packages/sqlalchemy/examples/vertical/dictlike-polymorphic.py   kuma-lib(Download)
 
if __name__ == '__main__':
    from sqlalchemy import (MetaData, Table, Column, Integer, Unicode,
        ForeignKey, UnicodeText, and_, not_, or_, String, Boolean, cast, text,
        null, case)
    metadata = MetaData()
 
    animals = Table('animal', metadata,
                    Column('id', Integer, primary_key=True),
                    Column('name', Unicode(100)))
 
    chars = Table('facts', metadata,

src/i/n/input-lib-HEAD/packages/sqlalchemy/examples/vertical/dictlike-polymorphic.py   input-lib(Download)
 
if __name__ == '__main__':
    from sqlalchemy import (MetaData, Table, Column, Integer, Unicode,
        ForeignKey, UnicodeText, and_, not_, or_, String, Boolean, cast, text,
        null, case)
    metadata = MetaData()
 
    animals = Table('animal', metadata,
                    Column('id', Integer, primary_key=True),
                    Column('name', Unicode(100)))
 
    chars = Table('facts', metadata,

src/l/u/LuoYunCloud-HEAD/lyweb/lib/SQLAlchemy-0.8.2/examples/inheritance/single.py   LuoYunCloud(Download)
from sqlalchemy import MetaData, Table, Column, Integer, String, \
    ForeignKey, create_engine
from sqlalchemy.orm import mapper, relationship, sessionmaker
 
metadata = MetaData()
 
# a table to store companies
companies = Table('companies', metadata,
   Column('name', String(50)))
 
employees_table = Table('employees', metadata,
    Column('employee_id', Integer, primary_key=True),
    Column('company_id', Integer, ForeignKey('companies.company_id')),

src/s/q/SQLAlchemy-0.9.4/examples/inheritance/single.py   SQLAlchemy(Download)
"""Single-table inheritance example."""
 
from sqlalchemy import MetaData, Table, Column, Integer, String, \
    ForeignKey, create_engine
from sqlalchemy.orm import mapper, relationship, sessionmaker
 
metadata = MetaData()
 
# a table to store companies
companies = Table('companies', metadata,
   Column('name', String(50)))
 
employees_table = Table('employees', metadata,
    Column('employee_id', Integer, primary_key=True),
    Column('company_id', Integer, ForeignKey('companies.company_id')),

src/s/q/sqlalchemy-HEAD/examples/vertical/dictlike-polymorphic.py   sqlalchemy(Download)
 
if __name__ == '__main__':
    from sqlalchemy import (MetaData, Table, Column, Integer, Unicode,
        ForeignKey, UnicodeText, and_, not_, or_, String, Boolean, cast, text,
        null, case)
    metadata = MetaData()
 
    animals = Table('animal', metadata,
                    Column('id', Integer, primary_key=True),
                    Column('name', Unicode(100)))
 
    chars = Table('facts', metadata,

src/k/i/kitsune-HEAD/vendor/packages/sqlalchemy/examples/inheritance/single.py   kitsune(Download)
from sqlalchemy import MetaData, Table, Column, Integer, String, \
    ForeignKey, create_engine
from sqlalchemy.orm import mapper, relationship, sessionmaker
 
metadata = MetaData()
 
# a table to store companies
companies = Table('companies', metadata, 
   Column('name', String(50)))
 
employees_table = Table('employees', metadata, 
    Column('employee_id', Integer, primary_key=True),
    Column('company_id', Integer, ForeignKey('companies.company_id')),

src/k/u/kuma-lib-HEAD/packages/sqlalchemy/examples/inheritance/single.py   kuma-lib(Download)
from sqlalchemy import MetaData, Table, Column, Integer, String, \
    ForeignKey, create_engine
from sqlalchemy.orm import mapper, relationship, sessionmaker
 
metadata = MetaData()
 
# a table to store companies
companies = Table('companies', metadata, 
   Column('name', String(50)))
 
employees_table = Table('employees', metadata, 
    Column('employee_id', Integer, primary_key=True),
    Column('company_id', Integer, ForeignKey('companies.company_id')),

Previous  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next