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/m/m/mmc-HEAD/pulse2/services/mmc/plugins/glpi/database_084.py   mmc(Download)
from configobj import ConfigObj
 
from sqlalchemy import and_, create_engine, MetaData, Table, Column, String, \
        Integer, ForeignKey, asc, or_, not_, desc, func, distinct
from sqlalchemy.orm import create_session, mapper, relationship
        for i in ('glpi_operatingsystemversions', 'glpi_computertypes', 'glpi_operatingsystems', 'glpi_operatingsystemservicepacks', 'glpi_domains', \
                'glpi_computermodels', 'glpi_networks'):
            setattr(self, i, Table(i, self.metadata, autoload = True))
            j = self.getTableName(i)
            exec "class %s(DbTOA): pass" % j
                        'devicemotherboards', 'devicenetworkcards', 'devicepcis', 'devicepowersupplies', 'devicesoundcards')
        for i in self.devices:
            setattr(self, i, Table("glpi_%s"%i, self.metadata, autoload = True))
            j = self.getTableName(i)
            exec "class %s(DbTOA): pass" % j
            mapper(eval(j), getattr(self, i))
            self.klass[i] = eval(j)
 
            setattr(self, "computers_%s"%i, Table("glpi_items_%s"%i, self.metadata,
 
        # entity
        self.location = Table("glpi_entities", self.metadata, autoload = True)
        mapper(Location, self.location)
 

src/p/y/PyAMF-0.6.1/doc/tutorials/examples/actionscript/addressbook/python/persistent.py   PyAMF(Download)
    def createSchema(self):
        metadata = sa.MetaData()
 
        metadata = sa.MetaData()
        self.users_table = sa.Table('users_table', metadata,
                                 server_default="2001-01-01 01:01:01"))
 
        self.phone_numbers_table = sa.Table('phone_numbers_table', metadata,
            sa.Column('id', sa.Integer, primary_key=True),
            sa.Column('user_id', sa.Integer, sa.ForeignKey('users_table.id')),
            sa.Column('label', sa.String(50)),
            sa.Column('number', sa.String(50)))
 
        self.emails_table = sa.Table('emails_table', metadata,

src/k/u/kuma-lib-HEAD/packages/sqlalchemy/examples/sharding/attribute_shard.py   kuma-lib(Download)
 
# step 1. imports
from sqlalchemy import (create_engine, MetaData, Table, Column, Integer,
    String, ForeignKey, Float, DateTime)
from sqlalchemy.orm import sessionmaker, mapper, relationship
# #1.  Any other method will do just as well; UUID, hilo, application-specific, etc.
 
ids = Table('ids', meta,
    Column('nextid', Integer, nullable=False))
 
# if you're willing to write more complex sharding functions.
 
weather_locations = Table("weather_locations", meta,
        Column('id', Integer, primary_key=True, default=id_generator),
        Column('continent', String(30), nullable=False),
        Column('city', String(50), nullable=False)
    )
 
weather_reports = Table("weather_reports", meta,

src/p/y/pyamf-HEAD/doc/tutorials/examples/actionscript/addressbook/python/persistent.py   pyamf(Download)
    def createSchema(self):
        metadata = sa.MetaData()
 
        metadata = sa.MetaData()
        self.users_table = sa.Table('users_table', metadata,
                                 server_default="2001-01-01 01:01:01"))
 
        self.phone_numbers_table = sa.Table('phone_numbers_table', metadata,
            sa.Column('id', sa.Integer, primary_key=True),
            sa.Column('user_id', sa.Integer, sa.ForeignKey('users_table.id')),
            sa.Column('label', sa.String(50)),
            sa.Column('number', sa.String(50)))
 
        self.emails_table = sa.Table('emails_table', metadata,

src/s/q/SQLAlchemy-0.9.4/examples/inheritance/concrete.py   SQLAlchemy(Download)
"""Concrete (table-per-class) inheritance example."""
 
from sqlalchemy import create_engine, MetaData, Table, Column, Integer, \
    String
from sqlalchemy.orm import mapper, sessionmaker, polymorphic_union
 
metadata = MetaData()
 
managers_table = Table('managers', metadata,
)
 
engineers_table = Table('engineers', metadata,
    Column('employee_id', Integer, primary_key=True),
    Column('name', String(50)),

src/i/n/input-lib-HEAD/packages/sqlalchemy/examples/sharding/attribute_shard.py   input-lib(Download)
 
# step 1. imports
from sqlalchemy import (create_engine, MetaData, Table, Column, Integer,
    String, ForeignKey, Float, DateTime)
from sqlalchemy.orm import sessionmaker, mapper, relationship
# #1.  Any other method will do just as well; UUID, hilo, application-specific, etc.
 
ids = Table('ids', meta,
    Column('nextid', Integer, nullable=False))
 
# if you're willing to write more complex sharding functions.
 
weather_locations = Table("weather_locations", meta,
        Column('id', Integer, primary_key=True, default=id_generator),
        Column('continent', String(30), nullable=False),
        Column('city', String(50), nullable=False)
    )
 
weather_reports = Table("weather_reports", meta,

src/l/u/LuoYunCloud-HEAD/lyweb/lib/SQLAlchemy-0.8.2/examples/elementtree/pickle.py   LuoYunCloud(Download)
"""
 
from sqlalchemy import (create_engine, MetaData, Table, Column, Integer, String,
    PickleType)
from sqlalchemy.orm import mapper, Session
# stores a top level record of an XML document.
# the "element" column will store the ElementTree document as a BLOB.
documents = Table('documents', meta,
    Column('document_id', Integer, primary_key=True),
    Column('filename', String(30), unique=True),

src/n/a/nagare.examples-0.3.0/nagare/examples/gallery/gallerysqlalchemy.py   nagare.examples(Download)
from nagare.database import session
 
from sqlalchemy import MetaData, Table, Column, Unicode, BLOB, ForeignKey, Integer
from sqlalchemy.orm import mapper, relation, deferred
 
 
photo_table = Table(
                    'photo', __metadata__,
                    Column('title', Unicode(100), primary_key=True),
                    Column('img', BLOB),
 
gallery_table = Table(
                     'gallery', __metadata__,
                     Column('name', Unicode(40), primary_key=True)
                    )

src/m/m/mmc-HEAD/pulse2/services/mmc/plugins/glpi/database_08.py   mmc(Download)
import calendar
 
from sqlalchemy import and_, create_engine, MetaData, Table, Column, String, \
        Integer, ForeignKey, asc, or_, not_, desc, func, distinct
from sqlalchemy.orm import create_session, mapper
        for i in ('glpi_operatingsystemversions', 'glpi_computertypes', 'glpi_operatingsystems', 'glpi_operatingsystemservicepacks', 'glpi_domains', \
                'glpi_computermodels', 'glpi_networks'):
            setattr(self, i, Table(i, self.metadata, autoload = True))
            j = self.getTableName(i)
            exec "class %s(DbTOA): pass" % j
                        'devicemotherboards', 'devicenetworkcards', 'devicepcis', 'devicepowersupplies', 'devicesoundcards')
        for i in self.devices:
            setattr(self, i, Table("glpi_%s"%i, self.metadata, autoload = True))
            j = self.getTableName(i)
            exec "class %s(DbTOA): pass" % j
            mapper(eval(j), getattr(self, i))
            self.klass[i] = eval(j)
 
            setattr(self, "computers_%s"%i, Table("glpi_computers_%s"%i, self.metadata,
 
        # entity
        self.location = Table("glpi_entities", self.metadata, autoload = True)
        mapper(Location, self.location)
 

src/s/q/sqlalchemy-HEAD/examples/sharding/attribute_shard.py   sqlalchemy(Download)
 
# step 1. imports
from sqlalchemy import (create_engine, MetaData, Table, Column, Integer,
    String, ForeignKey, Float, DateTime)
from sqlalchemy.orm import sessionmaker, mapper, relation
# #1.  Any other method will do just as well; UUID, hilo, application-specific, etc.
 
ids = Table('ids', meta,
    Column('nextid', Integer, nullable=False))
 
# if you're willing to write more complex sharding functions.
 
weather_locations = Table("weather_locations", meta,
        Column('id', Integer, primary_key=True, default=id_generator),
        Column('continent', String(30), nullable=False),
        Column('city', String(50), nullable=False)
    )
 
weather_reports = Table("weather_reports", meta,

Previous  5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13  Next