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/i/n/input-lib-HEAD/packages/sqlalchemy/examples/inheritance/single.py   input-lib(Download)
from sqlalchemy import MetaData, Table, Column, Integer, String, ForeignKey
from sqlalchemy.orm import mapper, relationship, create_session
 
metadata = MetaData('sqlite://')
metadata.bind.echo = 'debug'
 
# 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/l/u/LuoYunCloud-HEAD/lyweb/lib/SQLAlchemy-0.8.2/examples/elementtree/optimized_al.py   LuoYunCloud(Download)
 
##################### PART I - Imports/Configuration #########################
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey,
    Unicode, and_, create_engine)
from sqlalchemy.orm import mapper, relationship, Session, lazyload
 
# stores a top level record of an XML document.
documents = Table('documents', meta,
    Column('document_id', Integer, primary_key=True),
    Column('filename', String(30), unique=True),
)
 
# stores XML nodes in an adjacency list model.  This corresponds to
# Element and SubElement objects.
elements = Table('elements', meta,
# stores attributes.  This corresponds to the dictionary of attributes
# stored by an Element or SubElement.
attributes = Table('attributes', meta,
    Column('element_id', Integer, ForeignKey('elements.element_id'), primary_key=True),
    Column('name', Unicode(100), nullable=False, primary_key=True),

src/k/i/kitsune-HEAD/vendor/packages/Werkzeug/examples/plnt/database.py   kitsune(Download)
    :license: BSD.
"""
from sqlalchemy import MetaData, Table, Column, ForeignKey, Boolean, \
     Integer, String, DateTime
from sqlalchemy.orm import dynamic_loader, scoped_session, create_session
 
 
blog_table = Table('blogs', metadata,
    Column('id', Integer, primary_key=True),
    Column('name', String(120)),
)
 
entry_table = Table('entries', metadata,
    Column('id', Integer, primary_key=True),
    Column('blog_id', Integer, ForeignKey('blogs.id')),

src/s/q/sqlalchemy-HEAD/examples/inheritance/single.py   sqlalchemy(Download)
from sqlalchemy import MetaData, Table, Column, Integer, String, ForeignKey
from sqlalchemy.orm import mapper, relation, create_session
 
metadata = MetaData('sqlite://')
metadata.bind.echo = 'debug'
 
# 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/elementtree/optimized_al.py   SQLAlchemy(Download)
 
##################### PART I - Imports/Configuration #########################
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey,
    Unicode, and_, create_engine)
from sqlalchemy.orm import mapper, relationship, Session, lazyload
 
# stores a top level record of an XML document.
documents = Table('documents', meta,
    Column('document_id', Integer, primary_key=True),
    Column('filename', String(30), unique=True),
)
 
# stores XML nodes in an adjacency list model.  This corresponds to
# Element and SubElement objects.
elements = Table('elements', meta,
# stores attributes.  This corresponds to the dictionary of attributes
# stored by an Element or SubElement.
attributes = Table('attributes', meta,
    Column('element_id', Integer, ForeignKey('elements.element_id'), primary_key=True),
    Column('name', Unicode(100), nullable=False, primary_key=True),

src/k/u/kuma-lib-HEAD/packages/Werkzeug/examples/plnt/database.py   kuma-lib(Download)
    :license: BSD.
"""
from sqlalchemy import MetaData, Table, Column, ForeignKey, Boolean, \
     Integer, String, DateTime
from sqlalchemy.orm import dynamic_loader, scoped_session, create_session
 
 
blog_table = Table('blogs', metadata,
    Column('id', Integer, primary_key=True),
    Column('name', String(120)),
)
 
entry_table = Table('entries', metadata,
    Column('id', Integer, primary_key=True),
    Column('blog_id', Integer, ForeignKey('blogs.id')),

src/l/u/LuoYunCloud-HEAD/lyweb/lib/SQLAlchemy-0.8.2/examples/elementtree/adjacency_list.py   LuoYunCloud(Download)
 
################################# PART I - Imports/Coniguration ####################################
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey,
    Unicode, and_, create_engine)
from sqlalchemy.orm import mapper, relationship, Session, lazyload
 
# stores a top level record of an XML document.
documents = Table('documents', meta,
    Column('document_id', Integer, primary_key=True),
    Column('filename', String(30), unique=True),
# stores XML nodes in an adjacency list model.  This corresponds to
# Element and SubElement objects.
elements = Table('elements', meta,
    Column('element_id', Integer, primary_key=True),
    Column('parent_id', Integer, ForeignKey('elements.element_id')),
# stores attributes.  This corresponds to the dictionary of attributes
# stored by an Element or SubElement.
attributes = Table('attributes', meta,
    Column('element_id', Integer, ForeignKey('elements.element_id'), primary_key=True),
    Column('name', Unicode(100), nullable=False, primary_key=True),

src/k/i/kitsune-HEAD/vendor/packages/sqlalchemy/examples/elementtree/optimized_al.py   kitsune(Download)
 
################################# PART I - Imports/Configuration ###########################################
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey,
    Unicode, and_)
from sqlalchemy.orm import mapper, relationship, create_session, lazyload
 
# stores a top level record of an XML document.  
documents = Table('documents', meta,
    Column('document_id', Integer, primary_key=True),
    Column('filename', String(30), unique=True),
)
 
# stores XML nodes in an adjacency list model.  This corresponds to 
# Element and SubElement objects.
elements = Table('elements', meta,
# stores attributes.  This corresponds to the dictionary of attributes
# stored by an Element or SubElement.
attributes = Table('attributes', meta,
    Column('element_id', Integer, ForeignKey('elements.element_id'), primary_key=True),
    Column('name', Unicode(100), nullable=False, primary_key=True),

src/s/q/SQLAlchemy-0.9.4/examples/elementtree/adjacency_list.py   SQLAlchemy(Download)
 
################################# PART I - Imports/Coniguration ####################################
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey,
    Unicode, and_, create_engine)
from sqlalchemy.orm import mapper, relationship, Session, lazyload
 
# stores a top level record of an XML document.
documents = Table('documents', meta,
    Column('document_id', Integer, primary_key=True),
    Column('filename', String(30), unique=True),
# stores XML nodes in an adjacency list model.  This corresponds to
# Element and SubElement objects.
elements = Table('elements', meta,
    Column('element_id', Integer, primary_key=True),
    Column('parent_id', Integer, ForeignKey('elements.element_id')),
# stores attributes.  This corresponds to the dictionary of attributes
# stored by an Element or SubElement.
attributes = Table('attributes', meta,
    Column('element_id', Integer, ForeignKey('elements.element_id'), primary_key=True),
    Column('name', Unicode(100), nullable=False, primary_key=True),

src/k/u/kuma-lib-HEAD/packages/sqlalchemy/examples/elementtree/optimized_al.py   kuma-lib(Download)
 
################################# PART I - Imports/Configuration ###########################################
from sqlalchemy import (MetaData, Table, Column, Integer, String, ForeignKey,
    Unicode, and_)
from sqlalchemy.orm import mapper, relationship, create_session, lazyload
 
# stores a top level record of an XML document.  
documents = Table('documents', meta,
    Column('document_id', Integer, primary_key=True),
    Column('filename', String(30), unique=True),
)
 
# stores XML nodes in an adjacency list model.  This corresponds to 
# Element and SubElement objects.
elements = Table('elements', meta,
# stores attributes.  This corresponds to the dictionary of attributes
# stored by an Element or SubElement.
attributes = Table('attributes', meta,
    Column('element_id', Integer, ForeignKey('elements.element_id'), primary_key=True),
    Column('name', Unicode(100), nullable=False, primary_key=True),

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