Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
‹EYc@@sndZddlmZddlZddlmZmZmZmZddl	m
Z
mZddlmZdd	lm
Z
dd
l	mZmZddlmZmZmZmZmZmZmZmZmZddlmZddlZddlZdd
lmZddlZej dƒZ!ej ddƒZ"d„Z#ej$de
ej%fd„ƒYƒZ&dee&efd„ƒYZ'de&efd„ƒYZ(dee&fd„ƒYZ)de*fd„ƒYZ+de+e&fd„ƒYZ,de,fd„ƒYZ-d e,fd!„ƒYZ.ej$d"e+e
fd#„ƒYƒZ/d$e/fd%„ƒYZ0d&e0fd'„ƒYZ1d(ee&fd)„ƒYZ2d*„Z3d+„Z4d,e*fd-„ƒYZ5d.e5e2fd/„ƒYZ6d0e6fd1„ƒYZ7d2e6fd3„ƒYZ8d4e6fd5„ƒYZ9d6e6fd7„ƒYZ:d8ee5e&fd9„ƒYZ;ej<id:d;6ƒZ=d<e&fd=„ƒYZ>d>e>fd?„ƒYZ?dS(@s/The schema module provides the building blocks for database metadata.

Each element within this module describes a database entity which can be
created and dropped, or is otherwise part of such an entity.  Examples include
tables, columns, sequences, and indexes.

All entities are subclasses of :class:`~sqlalchemy.schema.SchemaItem`, and as
defined in this module they are intended to be agnostic of any vendor-specific
constructs.

A collection of entities are grouped into a unit called
:class:`~sqlalchemy.schema.MetaData`. MetaData serves as a logical grouping of
schema elements, and can also be associated with an actual database connection
such that operations involving the contained elements can contact the database
as needed.

Two of the elements here also build upon their "syntactic" counterparts, which
are defined in :class:`~sqlalchemy.sql.expression.`, specifically
:class:`~sqlalchemy.schema.Table` and :class:`~sqlalchemy.schema.Column`.
Since these objects are part of the SQL expression language, they are usable
as components in SQL expressions.

i(tabsolute_importNi(texctutilteventt
inspectioni(tSchemaEventTargett
DialectKWArgs(tvisitors(ttype_api(t_bind_or_errortColumnCollection(	t
ClauseElementtColumnClauset_truncated_labelt
_as_truncatedt
TextClauset_literal_as_textt
ColumnElementt
_find_columnstquoted_name(tTableClause(tddlt
retain_schematblank_schemasËSymbol indicating that a :class:`.Table` or :class:`.Sequence`
    should have 'None' for its schema, even if the parent
    :class:`.MetaData` has specified a schema.

    .. versionadded:: 1.0.14

    cC@s |dkr|S|d|SdS(Nt.(tNone(tnametschema((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_get_table_key>st
SchemaItemcB@steZdZdZd„Zd„Zd„Zd„Zee	j
ddƒd„ƒƒZe	jd	„ƒZ
d
„ZRS(s3Base class for items that define a database schema.tschema_itemcC@s|j|||ƒS(N(t_execute_default(tselft
connectiontmultiparamstparams((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_execute_on_connectionKscG@s1x*|D]"}|dk	r|j|ƒqqWdS(s7Initialize the list of child items for this SchemaItem.N(Rt_set_parent_with_dispatch(R targstitem((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_init_itemsNs
cK@sgS(s"used to allow SchemaVisitor access((R tkwargs((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytget_childrenUscC@stj|ddgƒS(Nt
omit_kwargtinfo(Rtgeneric_repr(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__repr__Yss0.9sUse ``<obj>.name.quote``cC@s
|jjS(s’Return the value of the ``quote`` flag passed
        to this schema object, for those schema items which
        have a ``name`` field.

        (Rtquote(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR/\s	cC@siS(sLInfo dictionary associated with the object, allowing user-defined
        data to be associated with this :class:`.SchemaItem`.

        The dictionary is automatically generated when first accessed.
        It can also be specified in the constructor of some objects,
        such as :class:`.Table` and :class:`.Column`.

        ((R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR,gs
cC@s;d|jkr$|jjƒ|_n|jj|jƒ|S(NR,(t__dict__R,tcopytdispatcht_update(R R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_schema_item_copyss(t__name__t
__module__t__doc__t__visit_name__R$R(R*R.tpropertyRt
deprecatedR/tmemoized_propertyR,R4(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyREs				
tTablecB@sXeZdZdZd„Zeejddƒd„ƒƒZd„Z	d„Z
fd„Zed	„ƒZed
„ƒZ
d„Zd„Zd
„Zd„Zejd„ƒZed„ƒZd„Zd„Zed„ƒZd„Zd„Zd„Zd„Zd„Zeed„Ze d„Z!e ed„Z"e ed„Z#e$e e d„Z%RS(s/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
    on its name and optional schema name within the given
    :class:`.MetaData` object. Calling the :class:`.Table`
    constructor with the same name and same :class:`.MetaData` argument
    a second time will return the *same* :class:`.Table` object - in this way
    the :class:`.Table` constructor acts as a registry function.

    .. seealso::

        :ref:`metadata_describing` - Introduction to database metadata

    Constructor arguments are as follows:

    :param name: The name of this table as represented in the database.

        The table name, along with the value of the ``schema`` parameter,
        forms a key which uniquely identifies this :class:`.Table` within
        the owning :class:`.MetaData` collection.
        Additional calls to :class:`.Table` with the same name, metadata,
        and schema name will return the same :class:`.Table` object.

        Names which contain no upper case characters
        will be treated as case insensitive names, and will not be quoted
        unless they are a reserved word or contain special characters.
        A name with any number of upper case characters is considered
        to be case sensitive, and will be sent as quoted.

        To enable unconditional quoting for the table name, specify the flag
        ``quote=True`` to the constructor, or use the :class:`.quoted_name`
        construct to specify the name.

    :param metadata: a :class:`.MetaData` object which will contain this
        table.  The metadata is used as a point of association of this table
        with other tables which are referenced via foreign key.  It also
        may be used to associate this table with a particular
        :class:`.Connectable`.

    :param \*args: Additional positional arguments are used primarily
        to add the list of :class:`.Column` objects contained within this
        table. Similar to the style of a CREATE TABLE statement, other
        :class:`.SchemaItem` constructs may be added here, including
        :class:`.PrimaryKeyConstraint`, and :class:`.ForeignKeyConstraint`.

    :param autoload: Defaults to False, unless :paramref:`.Table.autoload_with`
        is set in which case it defaults to True; :class:`.Column` objects
        for this table should be reflected from the database, possibly
        augmenting or replacing existing :class:`.Column` objects that were
        expicitly specified.

        .. versionchanged:: 1.0.0 setting the :paramref:`.Table.autoload_with`
           parameter implies that :paramref:`.Table.autoload` will default
           to True.

        .. seealso::

            :ref:`metadata_reflection_toplevel`

    :param autoload_replace: Defaults to ``True``; when using
        :paramref:`.Table.autoload`
        in conjunction with :paramref:`.Table.extend_existing`, indicates
        that :class:`.Column` objects present in the already-existing
        :class:`.Table` object should be replaced with columns of the same
        name retrieved from the autoload process.   When ``False``, columns
        already present under existing names will be omitted from the
        reflection process.

        Note that this setting does not impact :class:`.Column` objects
        specified programmatically within the call to :class:`.Table` that
        also is autoloading; those :class:`.Column` objects will always
        replace existing columns of the same name when
        :paramref:`.Table.extend_existing` is ``True``.

        .. versionadded:: 0.7.5

        .. seealso::

            :paramref:`.Table.autoload`

            :paramref:`.Table.extend_existing`

    :param autoload_with: An :class:`.Engine` or :class:`.Connection` object
        with which this :class:`.Table` object will be reflected; when
        set to a non-None value, it implies that :paramref:`.Table.autoload`
        is ``True``.   If left unset, but :paramref:`.Table.autoload` is
        explicitly set to ``True``, an autoload operation will attempt to
        proceed by locating an :class:`.Engine` or :class:`.Connection` bound
        to the underlying :class:`.MetaData` object.

        .. seealso::

            :paramref:`.Table.autoload`

    :param extend_existing: When ``True``, indicates that if this
        :class:`.Table` is already present in the given :class:`.MetaData`,
        apply further arguments within the constructor to the existing
        :class:`.Table`.

        If :paramref:`.Table.extend_existing` or
        :paramref:`.Table.keep_existing` are not set, and the given name
        of the new :class:`.Table` refers to a :class:`.Table` that is
        already present in the target :class:`.MetaData` collection, and
        this :class:`.Table` specifies additional columns or other constructs
        or flags that modify the table's state, an
        error is raised.  The purpose of these two mutually-exclusive flags
        is to specify what action should be taken when a :class:`.Table`
        is specified that matches an existing :class:`.Table`, yet specifies
        additional constructs.

        :paramref:`.Table.extend_existing` will also work in conjunction
        with :paramref:`.Table.autoload` to run a new reflection
        operation against the database, even if a :class:`.Table`
        of the same name is already present in the target
        :class:`.MetaData`; newly reflected :class:`.Column` objects
        and other options will be added into the state of the
        :class:`.Table`, potentially overwriting existing columns
        and options of the same name.

        .. versionchanged:: 0.7.4 :paramref:`.Table.extend_existing` will
           invoke a new reflection operation when combined with
           :paramref:`.Table.autoload` set to True.

        As is always the case with :paramref:`.Table.autoload`,
        :class:`.Column` objects can be specified in the same :class:`.Table`
        constructor, which will take precedence.  Below, the existing
        table ``mytable`` will be augmented with :class:`.Column` objects
        both reflected from the database, as well as the given :class:`.Column`
        named "y"::

            Table("mytable", metadata,
                        Column('y', Integer),
                        extend_existing=True,
                        autoload=True,
                        autoload_with=engine
                    )

        .. seealso::

            :paramref:`.Table.autoload`

            :paramref:`.Table.autoload_replace`

            :paramref:`.Table.keep_existing`


    :param implicit_returning: True by default - indicates that
        RETURNING can be used by default to fetch newly inserted primary key
        values, for backends which support this.  Note that
        create_engine() also provides an implicit_returning flag.

    :param include_columns: A list of strings indicating a subset of
        columns to be loaded via the ``autoload`` operation; table columns who
        aren't present in this list will not be represented on the resulting
        ``Table`` object. Defaults to ``None`` which indicates all columns
        should be reflected.

    :param info: Optional data dictionary which will be populated into the
        :attr:`.SchemaItem.info` attribute of this object.

    :param keep_existing: When ``True``, indicates that if this Table
        is already present in the given :class:`.MetaData`, ignore
        further arguments within the constructor to the existing
        :class:`.Table`, and return the :class:`.Table` object as
        originally created. This is to allow a function that wishes
        to define a new :class:`.Table` on first call, but on
        subsequent calls will return the same :class:`.Table`,
        without any of the declarations (particularly constraints)
        being applied a second time.

        If :paramref:`.Table.extend_existing` or
        :paramref:`.Table.keep_existing` are not set, and the given name
        of the new :class:`.Table` refers to a :class:`.Table` that is
        already present in the target :class:`.MetaData` collection, and
        this :class:`.Table` specifies additional columns or other constructs
        or flags that modify the table's state, an
        error is raised.  The purpose of these two mutually-exclusive flags
        is to specify what action should be taken when a :class:`.Table`
        is specified that matches an existing :class:`.Table`, yet specifies
        additional constructs.

        .. seealso::

            :paramref:`.Table.extend_existing`

    :param listeners: A list of tuples of the form ``(<eventname>, <fn>)``
        which will be passed to :func:`.event.listen` upon construction.
        This alternate hook to :func:`.event.listen` allows the establishment
        of a listener function specific to this :class:`.Table` before
        the "autoload" process begins.  Particularly useful for
        the :meth:`.DDLEvents.column_reflect` event::

            def listen_for_reflect(table, column_info):
                "handle the column reflection event"
                # ...

            t = Table(
                'sometable',
                autoload=True,
                listeners=[
                    ('column_reflect', listen_for_reflect)
                ])

    :param mustexist: When ``True``, indicates that this Table must already
        be present in the given :class:`.MetaData` collection, else
        an exception is raised.

    :param prefixes:
        A list of strings to insert after CREATE in the CREATE TABLE
        statement.  They will be separated by spaces.

    :param quote: Force quoting of this table's name on or off, corresponding
        to ``True`` or ``False``.  When left at its default of ``None``,
        the column identifier will be quoted according to whether the name is
        case sensitive (identifiers with at least one upper case character are
        treated as case sensitive), or if it's a reserved word.  This flag
        is only needed to force quoting of a reserved word which is not known
        by the SQLAlchemy dialect.

    :param quote_schema: same as 'quote' but applies to the schema identifier.

    :param schema: The schema name for this table, which is required if
        the table resides in a schema other than the default selected schema
        for the engine's database connection.  Defaults to ``None``.

        If the owning :class:`.MetaData` of this :class:`.Table` specifies
        its own :paramref:`.MetaData.schema` parameter, then that schema
        name will be applied to this :class:`.Table` if the schema parameter
        here is set to ``None``.  To set a blank schema name on a :class:`.Table`
        that would otherwise use the schema set on the owning :class:`.MetaData`,
        specify the special symbol :attr:`.BLANK_SCHEMA`.

        .. versionadded:: 1.0.14  Added the :attr:`.BLANK_SCHEMA` symbol to
           allow a :class:`.Table` to have a blank schema name even when the
           parent :class:`.MetaData` specifies :paramref:`.MetaData.schema`.

        The quoting rules for the schema name are the same as those for the
        ``name`` parameter, in that quoting is applied for reserved words or
        case-sensitive names; to enable unconditional quoting for the
        schema name, specify the flag
        ``quote_schema=True`` to the constructor, or use the
        :class:`.quoted_name` construct to specify the name.

    :param useexisting: Deprecated.  Use :paramref:`.Table.extend_existing`.

    :param \**kw: Additional keyword arguments not mentioned above are
        dialect specific, and passed in the form ``<dialectname>_<argname>``.
        See the documentation regarding an individual dialect at
        :ref:`dialect_toplevel` for detail on documented arguments.

    ttablecO@sm|stj|ƒSy$|d|d|d}}}Wntk
rVtdƒ‚nX|jddƒ}|dkr|j}n|tkr–d}n|jdt	ƒ}|jdt	ƒ}d|krd	}t
j|ƒ|r÷d
}tj
|ƒ‚n|jdt	ƒ}n|r0|r0d}tj
|ƒ‚n|jdt	ƒ}	t||ƒ}
|
|jkrº|r|rt|ƒrtjd
|
ƒ‚n|j|
}|r¶|j||Žn|S|	rÖtjd|
ƒ‚ntj|ƒ}|jj||ƒ|j|||ƒy1|j||||Ž|jj||ƒ|SWn*t
jƒ|j||ƒWdQXnXdS(Niiis$Table() takes at least two argumentsRt
keep_existingtextend_existingtuseexistings0useexisting is deprecated.  Use extend_existing.s/useexisting is synonymous with extend_existing.s9keep_existing and extend_existing are mutually exclusive.t	mustexists–Table '%s' is already defined for this MetaData instance.  Specify 'extend_existing=True' to redefine options and columns on an existing Table object.sTable '%s' not defined(tobjectt__new__t
IndexErrort	TypeErrortgetRRtBLANK_SCHEMAtpoptFalseRtwarn_deprecatedRt
ArgumentErrorRttablestbooltInvalidRequestErrort_init_existingR2tbefore_parent_attacht
_add_tablet_inittafter_parent_attachtsafe_reraiset
_remove_table(tclsR&tkwRtmetadataRR>R?tmsgRAtkeyR=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRC€s^
$
	



s0.9sUse ``table.schema.quote``cC@s
|jjS(s^Return the value of the ``quote_schema`` flag passed
        to this :class:`.Table`.
        (RR/(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytquote_schemaºscO@sdS(s¼Constructor for :class:`~.schema.Table`.

        This method is a no-op.   See the top-level
        documentation for :class:`~.schema.Table`
        for constructor arguments.

        N((R R&RW((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__init__ÃscO@sEtt|ƒjt||jddƒƒƒ||_|jddƒ|_|jdkrg|j|_nB|jtkr‚d|_n'|jddƒ}t|j|ƒ|_t	ƒ|_
t	ƒ|_tƒ|_
tƒj|ƒt	ƒ|_t	ƒ|_|jdk	r d|j|jf|_n|j|_|jddƒ}|jd|dk	ƒ}|jdtƒ|jddƒ}|jd	tƒ|_d
|kr®|jd
ƒ|_nd|krö|jdƒ}	x*|	D]\}
}tj||
|ƒqÐWn|jdgƒ|_|j||r4|j|||ƒn|j|ŒdS(
NR/RR[s%s.%st
autoload_withtautoloadtautoload_replacetinclude_columnstimplicit_returningR,t	listenerstprefixes(tsuperR<R\RRHRRXRRGtsettindexestconstraintsR
t_columnstPrimaryKeyConstraintR%tforeign_keyst_extra_dependenciesRtfullnametTrueRaR,Rtlistent	_prefixest
_extra_kwargst	_autoloadR((R RRXR&R)R[R]R^R`Rbtevttfn((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRRÎsF	
cC@sW|r%|j|jj|||ƒn.t|ddƒ}|j|jj|||ƒdS(NRYs°No engine is bound to this Table's MetaData. Pass an engine to the Table via autoload_with=<someengine>, or associate the MetaData with an engine via metadata.bind=<someengine>(trun_callabletdialecttreflecttableR	(R RXR]R`texclude_columnstbind((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRqs			cC@st|jdd„ƒS(sTReturn the set of constraints as a list, sorted by creation
        order.

        RZcS@s|jS(N(t_creation_order(tc((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt<lambda>s(tsortedRg(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_sorted_constraintsscC@std„|jDƒƒS(sï:class:`.ForeignKeyConstraint` objects referred to by this
        :class:`.Table`.

        This list is produced from the collection of :class:`.ForeignKey`
        objects currently associated.

        .. versionadded:: 1.0.0

        cs@s|]}|jVqdS(N(t
constraint(t.0tfkc((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pys	<genexpr>,s(ReRj(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytforeign_key_constraints!scO@s–|jddƒ}|jd|dk	ƒ}|jdtƒ}|jddƒ}|r||jkrtjd|j|fƒ‚n|jddƒ}|dk	rØx6|jD](}|j|kr©|jj	|ƒq©q©Wnx,dD]$}	|	|krßtjd	ƒ‚qßqßWd
|kr(|jd
ƒ|_
n|rx|sVg|jD]}|j^q>}
nd}
|j|j|||
ƒn|j
||j|ŒdS(
NR]R^R_Rs7Can't change schema of existing table from '%s' to '%s'R`R/R[s2Can't redefine 'quote' or 'quote_schema' argumentsR,(squotesquote_schema((RHRRmRRRKRzRRhtremoveR,RqRXRpR((R R&R)R]R^R_RR`RzRZRw((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRO.s8
"	

cK@s|j|ƒdS(N(t_validate_dialect_kwargs(R R)((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRpSscC@sdS(N((R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_init_collectionsVscC@sdS(N((R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_reset_exportedYsc
C@s¤x|jD]’}|jr
|jjdk	r
t|jjtjjƒr
|js_|jdkr
t	|j
tdƒtfƒr
|jdks˜|jj
r
|Sq
WdS(Nt	ignore_fk(tprimary_keyt
autoincrementttypet_type_affinityRt
issubclassRtINTEGERTYPERjt
isinstancetdefaulttSequencetserver_defaultt	reflected(R tcol((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_autoincrement_column\s
cC@st|j|jƒS(s_Return the 'key' for this :class:`.Table`.

        This value is used as the dictionary key within the
        :attr:`.MetaData.tables` collection.   It is typically the same
        as that of :attr:`.Table.name` for a table with no
        :attr:`.Table.schema` set; otherwise it is typically of the form
        ``schemaname.tablename``.

        (RRR(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRZiscC@s€ddjt|jƒgt|jƒgg|jD]}t|ƒ^q2gdgD]%}d|tt||ƒƒf^qRƒS(Ns	Table(%s)s, Rs%s=%s(tjointreprRRXtcolumnstgetattr(R txtk((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.vs	?cC@st|j|jƒS(N(RtdescriptionR(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__str__|scC@s|jr|jjpdS(s2Return the connectable associated with this Table.N(RXRxR(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRxscC@s|jj|ƒdS(s©Add a 'dependency' for this Table.

        This is another Table object which must be created
        first before this one can, or dropped after this one.

        Usually, dependencies between tables are determined via
        ForeignKey objects.   However, for other situations that
        create dependencies outside of foreign keys (rules, inheriting),
        this method can manually establish such a link.

        N(Rktadd(R R=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytadd_is_dependent_on…scC@s|j|ƒdS(szAppend a :class:`~.schema.Column` to this :class:`~.schema.Table`.

        The "key" of the newly added :class:`~.schema.Column`, i.e. the
        value of its ``.key`` attribute, will then be available
        in the ``.c`` collection of this :class:`~.schema.Table`, and the
        column definition will be included in any CREATE TABLE, SELECT,
        UPDATE, etc. statements generated from this :class:`~.schema.Table`
        construct.

        Note that this does **not** change the definition of the table
        as it exists within any underlying database, assuming that
        table has already been created in the database.   Relational
        databases support the addition of columns to existing tables
        using the SQL ALTER command, which would need to be
        emitted for an already-existing table that doesn't contain
        the newly added column.

        N(R%(R tcolumn((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt
append_column“scC@s|j|ƒdS(s÷Append a :class:`~.schema.Constraint` to this
        :class:`~.schema.Table`.

        This has the effect of the constraint being included in any
        future CREATE TABLE statement, assuming specific DDL creation
        events have not been associated with the given
        :class:`~.schema.Constraint` object.

        Note that this does **not** produce the constraint within the
        relational database automatically, for a table that already exists
        in the database.   To add a constraint to an
        existing relational database table, the SQL ALTER command must
        be used.  SQLAlchemy also provides the
        :class:`.AddConstraint` construct which can produce this SQL when
        invoked as an executable clause.

        N(R%(R R~((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytappend_constraint©sc@s9‡‡fd†}tj|dˆjddƒ|ƒdS(szAppend a DDL event listener to this ``Table``.

        .. deprecated:: 0.7
            See :class:`.DDLEvents`.

        c@sˆˆ||ƒdS(N((ttargetR!RW(t
event_nametlistener(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytadapt_listenerÆstt-t_N(RRntreplace(R R¢R£R¤((R¢R£sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytappend_ddl_listener¾scC@s&|j|j|j|ƒ||_dS(N(RQRRRX(R RX((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_set_parentËscK@s7|stj|d||S|r/t|jƒSgSdS(Ntcolumn_collections(RR*tlistR–(R R«tschema_visitorRW((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR*Ïs
cC@s=|dkrt|ƒ}n|j|jj|jd|jƒS(s!Return True if this table exists.RN(RR	RtRut	has_tableRR(R Rx((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytexistsÚscC@s8|dkrt|ƒ}n|jtj|d|ƒdS(sÉIssue a ``CREATE`` statement for this
        :class:`.Table`, using the given :class:`.Connectable`
        for connectivity.

        .. seealso::

            :meth:`.MetaData.create_all`.

        t
checkfirstN(RR	t_run_visitorRtSchemaGenerator(R RxR°((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytcreateãs
cC@s8|dkrt|ƒ}n|jtj|d|ƒdS(sÅIssue a ``DROP`` statement for this
        :class:`.Table`, using the given :class:`.Connectable`
        for connectivity.

        .. seealso::

            :meth:`.MetaData.drop_all`.

        R°N(RR	R±Rt
SchemaDropper(R RxR°((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytdropôs

c

C@s\|dkr|j}n|tkr0|j}n|dkrH|j}nt||ƒ}||jkr…tjd|jƒ|j|Sg}x*|j	D]}|j
|jd|ƒƒq•Wt||d|||j
Ž}xï|jD]ä}t|tƒrY|j}	|r|||||	ƒ}
n|	|jkr1|nd}
|j|jd|
d|ƒƒqà|jsàt|tƒr¢t|j	ƒdkr¢t|j	ƒdjr¢qàn|j|jd|d|ƒƒqàqàWx„|jD]y}t|j	ƒdkr	t|j	ƒdjr	qÒnt|jd|jg|j	jƒD]}|j|^q+|j
ŽqÒW|j|ƒS(s`
Return a copy of this :class:`.Table` associated with a different
        :class:`.MetaData`.

        E.g.::

            m1 = MetaData()

            user = Table('user', m1, Column('id', Integer, priamry_key=True))

            m2 = MetaData()
            user_copy = user.tometadata(m2)

        :param metadata: Target :class:`.MetaData` object, into which the
         new :class:`.Table` object will be created.

        :param schema: optional string name indicating the target schema.
         Defaults to the special symbol :attr:`.RETAIN_SCHEMA` which indicates
         that no change to the schema name should be made in the new
         :class:`.Table`.  If set to a string name, the new :class:`.Table`
         will have this new name as the ``.schema``.  If set to ``None``, the
         schema will be set to that of the schema set on the target
         :class:`.MetaData`, which is typically ``None`` as well, unless
         set explicitly::

            m2 = MetaData(schema='newschema')

            # user_copy_one will have "newschema" as the schema name
            user_copy_one = user.tometadata(m2, schema=None)

            m3 = MetaData()  # schema defaults to None

            # user_copy_two will have None as the schema name
            user_copy_two = user.tometadata(m3, schema=None)

        :param referred_schema_fn: optional callable which can be supplied
         in order to provide for the schema name that should be assigned
         to the referenced table of a :class:`.ForeignKeyConstraint`.
         The callable accepts this parent :class:`.Table`, the
         target schema that we are changing to, the
         :class:`.ForeignKeyConstraint` object, and the existing
         "target schema" of that constraint.  The function should return the
         string schema name that should be applied.
         E.g.::

                def referred_schema_fn(table, to_schema,
                                                constraint, referred_schema):
                    if referred_schema == 'base_tables':
                        return referred_schema
                    else:
                        return to_schema

                new_table = table.tometadata(m2, schema="alt_schema",
                                        referred_schema_fn=referred_schema_fn)

         .. versionadded:: 0.9.2

        :param name: optional string name indicating the target table name.
         If not specified or None, the table name is retained.  This allows
         a :class:`.Table` to be copied to the same :class:`.MetaData` target
         with a new name.

         .. versionadded:: 1.0.0

        sBTable '%s' already exists within the given MetaData - not copying.Rttarget_tableiituniqueN(RRt
RETAIN_SCHEMARRRLRtwarnRšR–tappendR1R<R)RgRtForeignKeyConstraintt_referred_schemaR t_type_boundtUniqueConstrainttlenR¬R·RftindextIndextkeysRzR4(
R RXRtreferred_schema_fnRRZR&RzR=treferred_schematfk_constraint_schemaRÀR’((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt
tometadatasTB			 &(&R5R6R7R8RCR9RR:R[R\RRRqR}RRORpR„R…R;R“RZR.R›RxRRŸR R©RªRmRIR*RR¯R³RµR¸RÆ(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR<zs@ÿ	:		7
	%			

						
	
	tColumncB@sƒeZdZdZd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Ze
e
ed„Zed„ZRS(
s(Represents a column in a database table.RžcO@s¢|jddƒ}|jddƒ}t|ƒ}|rt|dtjƒr|dk	rjtjdƒ‚n|jdƒ}qn|rÑ|d}t|dƒrÑ|dk	r¼tjdƒ‚n|jdƒ}qÑn|dk	rût	||jddƒƒ}nd|krtjdƒ‚nt
t|ƒj||ƒ|jd	|ƒ|_
|jd
tƒ|_|jd|jƒ|_|jddƒ|_|jd
dƒ|_|jddƒ|_|jddƒ|_|jddƒ|_|jdtƒ|_|jddƒ|_|jddƒ|_|jdtƒ|_tƒ|_tƒ|_d|krk|jdƒ|_n%t|jt ƒr|jj!|ƒn|jdk	r0t|jt"t#fƒrÊ|j$|jƒq0t%|jdtƒrt|jtj&ƒrtj'd|j
|jfƒqn|j$t"|jƒƒn|jdk	r†t|jt(ƒrm|j$|jj)tƒƒq†|j$t*|jƒƒn|jdk	rßt|jt"t#fƒrÀ|j$|jƒqß|j$t"|jdtƒƒn|jdk	r;t|jt(ƒr|j$|jj)tƒƒq;|j$t*|jdtƒƒn|j+|Œtj,|ƒd|krv|jdƒ|_-n|ržtjdt.t|ƒƒƒ‚ndS(sò.
        Construct a new ``Column`` object.

        :param name: The name of this column as represented in the database.
          This argument may be the first positional argument, or specified
          via keyword.

          Names which contain no upper case characters
          will be treated as case insensitive names, and will not be quoted
          unless they are a reserved word.  Names with any number of upper
          case characters will be quoted and sent exactly.  Note that this
          behavior applies even for databases which standardize upper
          case names as case insensitive such as Oracle.

          The name field may be omitted at construction time and applied
          later, at any time before the Column is associated with a
          :class:`.Table`.  This is to support convenient
          usage within the :mod:`~sqlalchemy.ext.declarative` extension.

        :param type\_: The column's type, indicated using an instance which
          subclasses :class:`~sqlalchemy.types.TypeEngine`.  If no arguments
          are required for the type, the class of the type can be sent
          as well, e.g.::

            # use a type with arguments
            Column('data', String(50))

            # use no arguments
            Column('level', Integer)

          The ``type`` argument may be the second positional argument
          or specified by keyword.

          If the ``type`` is ``None`` or is omitted, it will first default to
          the special type :class:`.NullType`.  If and when this
          :class:`.Column` is made to refer to another column using
          :class:`.ForeignKey` and/or :class:`.ForeignKeyConstraint`, the type
          of the remote-referenced column will be copied to this column as
          well, at the moment that the foreign key is resolved against that
          remote :class:`.Column` object.

          .. versionchanged:: 0.9.0
            Support for propagation of type to a :class:`.Column` from its
            :class:`.ForeignKey` object has been improved and should be
            more reliable and timely.

        :param \*args: Additional positional arguments include various
          :class:`.SchemaItem` derived constructs which will be applied
          as options to the column.  These include instances of
          :class:`.Constraint`, :class:`.ForeignKey`, :class:`.ColumnDefault`,
          and :class:`.Sequence`.  In some cases an equivalent keyword
          argument is available such as ``server_default``, ``default``
          and ``unique``.

        :param autoincrement: This flag may be set to ``False`` to
          indicate an integer primary key column that should not be
          considered to be the "autoincrement" column, that is
          the integer primary key column which generates values
          implicitly upon INSERT and whose value is usually returned
          via the DBAPI cursor.lastrowid attribute.   It defaults
          to ``True`` to satisfy the common use case of a table
          with a single integer primary key column.  If the table
          has a composite primary key consisting of more than one
          integer column, set this flag to True only on the
          column that should be considered "autoincrement".

          The setting *only* has an effect for columns which are:

          * Integer derived (i.e. INT, SMALLINT, BIGINT).

          * Part of the primary key

          * Not refering to another column via :class:`.ForeignKey`, unless
            the value is specified as ``'ignore_fk'``::

                # turn on autoincrement for this column despite
                # the ForeignKey()
                Column('id', ForeignKey('other.id'),
                            primary_key=True, autoincrement='ignore_fk')

            It is typically not desirable to have "autoincrement" enabled
            on such a column as its value intends to mirror that of a
            primary key column elsewhere.

          * have no server side or client side defaults (with the exception
            of Postgresql SERIAL).

          The setting has these two effects on columns that meet the
          above criteria:

          * DDL issued for the column will include database-specific
            keywords intended to signify this column as an
            "autoincrement" column, such as AUTO INCREMENT on MySQL,
            SERIAL on Postgresql, and IDENTITY on MS-SQL.  It does
            *not* issue AUTOINCREMENT for SQLite since this is a
            special SQLite flag that is not required for autoincrementing
            behavior.

            .. seealso::

                :ref:`sqlite_autoincrement`

          * The column will be considered to be available as
            cursor.lastrowid or equivalent, for those dialects which
            "post fetch" newly inserted identifiers after a row has
            been inserted (SQLite, MySQL, MS-SQL).  It does not have
            any effect in this regard for databases that use sequences
            to generate primary key identifiers (i.e. Firebird, Postgresql,
            Oracle).

          .. versionchanged:: 0.7.4
              ``autoincrement`` accepts a special value ``'ignore_fk'``
              to indicate that autoincrementing status regardless of foreign
              key references.  This applies to certain composite foreign key
              setups, such as the one demonstrated in the ORM documentation
              at :ref:`post_update`.

        :param default: A scalar, Python callable, or
            :class:`.ColumnElement` expression representing the
            *default value* for this column, which will be invoked upon insert
            if this column is otherwise not specified in the VALUES clause of
            the insert. This is a shortcut to using :class:`.ColumnDefault` as
            a positional argument; see that class for full detail on the
            structure of the argument.

            Contrast this argument to :paramref:`.Column.server_default`
            which creates a default generator on the database side.

            .. seealso::

                :ref:`metadata_defaults_toplevel`

        :param doc: optional String that can be used by the ORM or similar
            to document attributes.   This attribute does not render SQL
            comments (a future attribute 'comment' will achieve that).

        :param key: An optional string identifier which will identify this
            ``Column`` object on the :class:`.Table`. When a key is provided,
            this is the only identifier referencing the ``Column`` within the
            application, including ORM attribute mapping; the ``name`` field
            is used only when rendering SQL.

        :param index: When ``True``, indicates that the column is indexed.
            This is a shortcut for using a :class:`.Index` construct on the
            table. To specify indexes with explicit names or indexes that
            contain multiple columns, use the :class:`.Index` construct
            instead.

        :param info: Optional data dictionary which will be populated into the
            :attr:`.SchemaItem.info` attribute of this object.

        :param nullable: When set to ``False``, will cause the "NOT NULL"
            phrase to be added when generating DDL for the column.   When
            ``True``, will normally generate nothing (in SQL this defaults to
            "NULL"), except in some very specific backend-specific edge cases
            where "NULL" may render explicitly.   Defaults to ``True`` unless
            :paramref:`~.Column.primary_key` is also ``True``, in which case it
            defaults to ``False``.  This parameter is only used when issuing
            CREATE TABLE statements.

        :param onupdate: A scalar, Python callable, or
            :class:`~sqlalchemy.sql.expression.ClauseElement` representing a
            default value to be applied to the column within UPDATE
            statements, which wil be invoked upon update if this column is not
            present in the SET clause of the update. This is a shortcut to
            using :class:`.ColumnDefault` as a positional argument with
            ``for_update=True``.

            .. seealso::

                :ref:`metadata_defaults` - complete discussion of onupdate

        :param primary_key: If ``True``, marks this column as a primary key
            column. Multiple columns can have this flag set to specify
            composite primary keys. As an alternative, the primary key of a
            :class:`.Table` can be specified via an explicit
            :class:`.PrimaryKeyConstraint` object.

        :param server_default: A :class:`.FetchedValue` instance, str, Unicode
            or :func:`~sqlalchemy.sql.expression.text` construct representing
            the DDL DEFAULT value for the column.

            String types will be emitted as-is, surrounded by single quotes::

                Column('x', Text, server_default="val")

                x TEXT DEFAULT 'val'

            A :func:`~sqlalchemy.sql.expression.text` expression will be
            rendered as-is, without quotes::

                Column('y', DateTime, server_default=text('NOW()'))

                y DATETIME DEFAULT NOW()

            Strings and text() will be converted into a
            :class:`.DefaultClause` object upon initialization.

            Use :class:`.FetchedValue` to indicate that an already-existing
            column will generate a default value on the database side which
            will be available to SQLAlchemy for post-fetch after inserts. This
            construct does not specify any DDL and the implementation is left
            to the database, such as via a trigger.

            .. seealso::

                :ref:`server_defaults` - complete discussion of server side
                defaults

        :param server_onupdate:   A :class:`.FetchedValue` instance
             representing a database-side default generation function,
             such as a trigger. This
             indicates to SQLAlchemy that a newly generated value will be
             available after updates. This construct does not actually
             implement any kind of generation function within the database,
             which instead must be specified separately.

            .. seealso::

                :ref:`triggered_columns`

        :param quote: Force quoting of this column's name on or off,
             corresponding to ``True`` or ``False``. When left at its default
             of ``None``, the column identifier will be quoted according to
             whether the name is case sensitive (identifiers with at least one
             upper case character are treated as case sensitive), or if it's a
             reserved word. This flag is only needed to force quoting of a
             reserved word which is not known by the SQLAlchemy dialect.

        :param unique: When ``True``, indicates that this column contains a
             unique constraint, or if ``index`` is ``True`` as well, indicates
             that the :class:`.Index` should be created with the unique flag.
             To specify multiple columns in the constraint/index or to specify
             an explicit name, use the :class:`.UniqueConstraint` or
             :class:`.Index` constructs explicitly.

        :param system: When ``True``, indicates this is a "system" column,
             that is a column which is automatically made available by the
             database, and should not be included in the columns list for a
             ``CREATE TABLE`` statement.

             For more elaborate scenarios where columns should be
             conditionally rendered differently on different backends,
             consider custom compilation rules for :class:`.CreateColumn`.

             .. versionadded:: 0.8.3 Added the ``system=True`` parameter to
                :class:`.Column`.

        Rttype_is0May not pass name positionally and as a keyword.t
_sqla_types1May not pass type_ positionally and as a keyword.R/s9Explicit 'name' is required when sending 'quote' argumentRZR‡tnullableRŽRtserver_onupdateRÀR·tsystemtdoctonupdateRˆt_proxiest_warn_on_bytestrings?Unicode column '%s' has non-unicode default value %r specified.t
for_updateR,s$Unknown arguments passed to Column: N(/RHRR¬RRtstring_typesRRKthasattrRRdRÇR\RZRIR‡RÊRŽRRËRÀR·RÌRÍRÎRmRˆReRgRjRÏR‰RR%t
ColumnDefaultRRºR—tbinary_typeR¹tFetchedValuet_as_for_updatet
DefaultClauseR(tset_creation_orderR,R•(R R&R)RRÈtcoltype((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\€sŠû



cC@sX|jdkrdS|jdk	rM|jjrC|jjd|jS|jSn|jSdS(Ns	(no name)R(RRR=tnamed_with_columnRš(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR›Þs
cC@s8x1|jD]"}|jjj|jƒr
tSq
WtSdS(sOReturn True if this Column references the given column via foreign
        key.N(RjRžt	proxy_settintersectionRmRI(R Ržtfk((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt
referenceséscC@s|j|ƒdS(N(R%(R RÞ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytappend_foreign_keyósc
C@stg}|j|jkr(|jdƒn|jrA|jdƒn|jsZ|jdƒn|jrs|jdƒn|jrŒ|jdƒn|jr¥|jdƒnddjt	|jƒgt	|j
ƒgg|jD]}|dk	r×t	|ƒ^q×g|j
D]}t	|ƒ^q|jdk	r8d	|jjp;d
gg|D]%}d|t	t||ƒƒf^qFƒS(NRZR‡RÊRÎRŽRs
Column(%s)s, s
table=<%s>s
table=Nones%s=%s(RZRRºR‡RÊRÎRŽRR”R•R‰RjRRgR=RšR—(R tkwargR˜R™((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.ös 						‘c@s5|jstjdƒ‚n|jdkr9|j|_nt|ddƒ}|dk	r…|ˆk	r…tjd|j|jfƒ‚n|jˆjkr
ˆjj|jƒ}||k	r
xL|j	D]>}ˆj	j
|ƒ|jˆjkrˆjj
|jƒqÂqÂWq
nˆjj
|ƒ|jrFˆjj|ƒtjjˆƒn4|jˆjkrztjd|jˆjfƒ‚nˆ|_|jrÒt|jtjƒr³tjdƒ‚ntd|dt|jƒƒnI|jrt|jtjƒrtjdƒ‚nˆjt|jƒƒn|j‡fd†ƒdS(	NsfColumn must be constructed with a non-blank name or assign a non-blank .name before adding to a Table.R=s1Column object '%s' already assigned to Table '%s'sTTrying to redefine primary-key column '%s' as a non-primary-key column on table '%s's–The 'index' keyword argument on Column is boolean only. To create indexes with a specific name, create an explicit Index object external to the Table.R·sõThe 'unique' keyword argument on Column is boolean only. To create unique constraints or indexes with a specific name, append an explicit UniqueConstraint to the Table's list of elements, or create an explicit Index object external to the Table.c@s
|jˆƒS(N(t_set_remote_table(RÞ(R=(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR{Ds(RRRKRZRR—RšRhRFRjR‚R~RgR¨R‡t_replaceR<R“t_resetRlR=RÀRRRÒRÁRMR·R R¾t_setup_on_memoized_fks(R R=texistingR’RÞ((R=sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRªsL	 				cC@s£|jj|jftf|jj|jftfg}xf|D]^\}}||jjjkr=x:|jjj|D]"}|j|krr||ƒqrqrWq=q=WdS(N(R=RZRIRRmRXt	_fk_memostlink_to_name(R Rstfk_keystfk_keyRèRÞ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRåFscC@s9|jdk	r"|||jƒntj|d|ƒdS(NRS(R=RRRn(R Rs((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_on_table_attachQscK@sg|jD]}|js
|j|^q
g|jD]}|js5|j|^q5}|j}t|tƒr„|j|}n|jd|j	d|d|j
d|jd|jd|j
d|jd|jd	|jd
|jd|jd|jd
|jd|j|Œ}|j|ƒS(sgCreate a copy of this ``Column``, unitialized.

        This is used in ``Table.tometadata``.

        RRÈRZR‡RÊR·RÌRÀRˆRŽRRÎRËRÍ(RgR½R1RjR~R‰RRt_constructorRRZR‡RÊR·RÌRÀRˆRŽRRÎRËRÍR4(R RWRzR&RÈ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR1Ws,	+/															c	K@syg|jD]}t|jd|jƒ^q
}|dkr[|jdkr[tjdƒ‚ny||j|rt	|py|jƒn|p‹|j|j
d|r |n|r¬|n|jd|jd|j
d|g|Œ}Wn+tk
rtjtd|jƒƒnX||_|jj|ƒ|jdk	rF|jj|j|_n|jrb|jj|ƒn|jj||ƒ|S(	s$Create a *proxy* for this column.

        This is a copy of this ``Column`` referenced by a different parent
        (such as an alias or select statement).  The column should
        be used only in select scenarios, as its full DDL/default
        information is not transferred.

        t_constraints^Cannot initialize a sub-selectable with this Column object until its 'name' has been assigned.RZR‡RÊRÏsÊCould not create a copy of this %r object.  Ensure the class includes a _constructor() attribute or method which accepts the standard Column constructor arguments, or references the Column class itself.N(Rjt
ForeignKeyRžR~RRRRNRìRR‰RZR‡RÊRERtraise_from_causet	__class__R=RhRœt_is_clone_ofR–R2RS(	R t
selectableRRZtname_is_truncatableRWtfRÞRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_make_proxy{s4
+'	!		
		cK@sc|rOg|j|jfD]}|dk	r|^qt|jƒt|jƒStj||SdS(N(RŽRÎRR¬RjRgRR*(R R­R)R˜((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR*¨sI(R5R6R7R8R\R›RßRàR.RªRåRëR1RRIRõR*(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRÇ{s	ÿ_		
			:			$,RîcB@søeZdZdZdedddddeddd„
Zd„Zdd„Zddd„Z	e
d„ƒZd„Ze
e	ƒZ
d„Zd	„Zejd
„ƒZd„Zd„Zd
„Zejd„ƒZd„Zd„Zd„Zd„ZRS(séDefines a dependency between two columns.

    ``ForeignKey`` is specified as an argument to a :class:`.Column` object,
    e.g.::

        t = Table("remote_table", metadata,
            Column("remote_id", ForeignKey("main_table.id"))
        )

    Note that ``ForeignKey`` is only a marker object that defines
    a dependency between two columns.   The actual constraint
    is in all cases represented by the :class:`.ForeignKeyConstraint`
    object.   This object will be generated automatically when
    a ``ForeignKey`` is associated with a :class:`.Column` which
    in turn is associated with a :class:`.Table`.   Conversely,
    when :class:`.ForeignKeyConstraint` is applied to a :class:`.Table`,
    ``ForeignKey`` markers are automatically generated to be
    present on each associated :class:`.Column`, which are also
    associated with the constraint object.

    Note that you cannot define a "composite" foreign key constraint,
    that is a constraint between a grouping of multiple parent/child
    columns, using ``ForeignKey`` objects.   To define this grouping,
    the :class:`.ForeignKeyConstraint` object must be used, and applied
    to the :class:`.Table`.   The associated ``ForeignKey`` objects
    are created automatically.

    The ``ForeignKey`` objects associated with an individual
    :class:`.Column` object are available in the `foreign_keys` collection
    of that column.

    Further examples of foreign key configuration are in
    :ref:`metadata_foreignkeys`.

    tforeign_keyc
K@s;||_t|jtjƒr*d|_n˜t|jdƒrQ|jjƒ|_n|j|_t|jtƒsˆt	j
d|jƒ‚n:t|jjtjt
fƒsÂt	j
d|jjƒ‚n||_d|_||_||_||_||_||_||_|	|_|
|_|r.||_n||_dS(s
        Construct a column-level FOREIGN KEY.

        The :class:`.ForeignKey` object when constructed generates a
        :class:`.ForeignKeyConstraint` which is associated with the parent
        :class:`.Table` object's collection of constraints.

        :param column: A single target column for the key relationship. A
            :class:`.Column` object or a column name as a string:
            ``tablename.columnkey`` or ``schema.tablename.columnkey``.
            ``columnkey`` is the ``key`` which has been assigned to the column
            (defaults to the column name itself), unless ``link_to_name`` is
            ``True`` in which case the rendered name of the column is used.

            .. versionadded:: 0.7.4
                Note that if the schema name is not included, and the
                underlying :class:`.MetaData` has a "schema", that value will
                be used.

        :param name: Optional string. An in-database name for the key if
            `constraint` is not provided.

        :param onupdate: Optional string. If set, emit ON UPDATE <value> when
            issuing DDL for this constraint. Typical values include CASCADE,
            DELETE and RESTRICT.

        :param ondelete: Optional string. If set, emit ON DELETE <value> when
            issuing DDL for this constraint. Typical values include CASCADE,
            DELETE and RESTRICT.

        :param deferrable: Optional bool. If set, emit DEFERRABLE or NOT
            DEFERRABLE when issuing DDL for this constraint.

        :param initially: Optional string. If set, emit INITIALLY <value> when
            issuing DDL for this constraint.

        :param link_to_name: if True, the string name given in ``column`` is
            the rendered name of the referenced column, not its locally
            assigned ``key``.

        :param use_alter: passed to the underlying
            :class:`.ForeignKeyConstraint` to indicate the constraint should
            be generated/dropped externally from the CREATE TABLE/ DROP TABLE
            statement.  See :paramref:`.ForeignKeyConstraint.use_alter`
            for further description.

            .. seealso::

                :paramref:`.ForeignKeyConstraint.use_alter`

                :ref:`use_alter`

        :param match: Optional string. If set, emit MATCH <value> when issuing
            DDL for this constraint. Typical values include SIMPLE, PARTIAL
            and FULL.

        :param info: Optional data dictionary which will be populated into the
            :attr:`.SchemaItem.info` attribute of this object.

            .. versionadded:: 1.0.0

        :param \**dialect_kw:  Additional keyword arguments are dialect
            specific, and passed in the form ``<dialectname>_<argname>``.  The
            arguments are ultimately handled by a corresponding
            :class:`.ForeignKeyConstraint`.  See the documentation regarding
            an individual dialect at :ref:`dialect_toplevel` for detail on
            documented arguments.

            .. versionadded:: 0.9.2

        t__clause_element__s9String, Column, or Column-bound argument expected, got %rs8ForeignKey received Column not bound to a Table, got: %rN(t_colspecRRRÒRt
_table_columnRÓR÷RRRKR=tNoneTypeRR~tparentt	use_alterRRÎtondeletet
deferrablet	initiallyRètmatchR,t_unvalidated_dialect_kw(
R RžRíRüRRÎRýRþRÿRèRR,t
dialect_kw((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\Øs8M											cC@sd|jƒS(NsForeignKey(%r)(t_get_colspec(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.LscC@sst|jd|ƒd|jd|jd|jd|jd|jd|jd|jd	|j	|j
}|j|ƒS(
sÕProduce a copy of this :class:`.ForeignKey` object.

        The new :class:`.ForeignKey` will not be bound
        to any :class:`.Column`.

        This method is usually used by the internal
        copy procedures of :class:`.Column`, :class:`.Table`,
        and :class:`.MetaData`.

        :param schema: The returned :class:`.ForeignKey` will
          reference the original table and column name, qualified
          by the given string schema name.

        RRüRRÎRýRþRÿRèR(RîRRüRRÎRýRþRÿRèRRR4(R RRÞ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR1Os							cC@sµ|r>|j\}}}|dk	r-|}nd|||fS|r~|j\}}}|rmd|||fSd||fSn3|jdk	rªd|jjj|jjfS|jSdS(sèReturn a string based 'column specification' for this
        :class:`.ForeignKey`.

        This is usually the equivalent of the string-based "tablename.colname"
        argument first passed to the object's constructor.

        s%s.%s.%ss%s.%sN(t_column_tokensRRùR=RlRZRø(R Rt
table_namet_schemattnametcolname((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRms	cC@s|jdS(Ni(R(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR¼†scC@sX|jdk	r5|jjdkr%dS|jjjSn|j\}}}t||ƒSdS(N(RùRR=RZRR(R RRR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt
_table_keyŠscC@s|j|jƒdk	S(s\Return True if the given :class:`.Table` is referenced by this
        :class:`.ForeignKey`.N(tcorresponding_columnRžR(R R=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRߖscC@s|j|jƒS(sÜReturn the :class:`.Column` in the given :class:`.Table`
        referenced by this :class:`.ForeignKey`.

        Returns None if this :class:`.ForeignKey` does not reference the given
        :class:`.Table`.

        (R
Rž(R R=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytget_referentœs	cC@s°|jƒjdƒ}|dkr:tjd|jƒ‚nt|ƒdkra|jƒ}d}n|jƒ}|jƒ}t|ƒdkrdj|ƒ}nd}|||fS(s7parse a string-based _colspec into its component parts.Rs,Invalid foreign key column specification: %siiN(	RtsplitRRRKRøR¿RHR”(R tmRRR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR§s	cC@s÷|jdkr!tjdƒ‚n$|jjdkrEtjdƒ‚n|jj}xH|jjD].}t|tƒr^|j|ksˆt‚Pq^q^Wt	sœt‚|j
\}}}|dkrÛ|jjdk	rÛ|jj}nt
||ƒ}|||fS(NsLthis ForeignKey object does not yet have a parent Column associated with it.sCthis ForeignKey's parent column is not yet associated with a Table.(RûRRRNR=tbase_columnsRRÇtAssertionErrorRIRRXRR(R tparenttableRzRRRttablekey((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_resolve_col_tokensÆs"cC@st|jdƒs!||j_n|jj|ks9t‚d}|dkrr|j}|jj|jjdƒ}nY|j	r°|}xG|jD]}|j
|kr‹|}q‹q‹Wn|}|jj|dƒ}|dkrtjd|j
|j
|j
|f|j
|ƒ‚n|j|ƒdS(Nt_referred_tablesiCould not initialize target column for ForeignKey '%s' on table '%s': table '%s' has no column named '%s'(RÓR~RRRRûRzRFRZRèRRtNoReferencedColumnErrorRøt_set_target_column(R RR=Rt_columnRZRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_link_to_col_by_colstringçs(		c@se|jjjr!ˆj|j_nt|jjtƒrX‡fd†}|jj|ƒnˆ|_dS(Nc@s%|jjjr!ˆj|j_ndS(N(RûR‰t_isnull(RÞ(Rž(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytset_types(RûR‰RRR=R<RåRž(R RžR((RžsJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRscC@sêt|jtjƒr´|jƒ\}}}||jkr^tjd|j||f|ƒ‚qæ|j	|jkr†tj
d|ƒ‚qætjd|j|j||f||ƒ‚n2t
|jdƒrÙ|jjƒ}|S|j}|SdS(s©Return the target :class:`.Column` referenced by this
        :class:`.ForeignKey`.

        If no target column has been established, an exception
        is raised.

        .. versionchanged:: 0.9.0
            Foreign key target column resolution now occurs as soon as both
            the ForeignKey object and the remote Column to which it refers
            are both associated with the same MetaData object.

        s|Foreign key associated with column '%s' could not find table '%s' with which to generate a foreign key to target column '%s's9Table %s is no longer associated with its parent MetaDatasiCould not initialize target column for ForeignKey '%s' on table '%s': table '%s' has no column named '%s'R÷N(RRøRRÒRRXRtNoReferencedTableErrorRûRZRNRRRÓR÷(R RRRR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRžs(
	cC@sc|jdk	r0|j|k	r0tjdƒ‚n||_|jjj|ƒ|jj|jƒdS(Ns&This ForeignKey already has a parent !(RûRRRNRjRœRët
_set_table(R Rž((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRªDs	cC@s<|jƒ\}}}|j|||ƒ|jj|ƒdS(N(RRR~t_validate_dest_table(R R=RRR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRâLscC@sO|jƒ\}}}||f}||j|krK|j|j|ƒndS(N(RRçR‚(R RXRt	table_keyRRê((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_remove_from_metadataQscC@s™|jdkr›t|tƒr›tggd|jd|jd|jd|jd|j	d|j
d|j|j|_|jj
||ƒ|jj|ƒn|jj|ƒt|jtjƒrN|jƒ\}}}||f}||jjkr4|jj|}y|j|||ƒWq4tjk
r0q4Xn|jj|j|ƒnGt|jdƒr|jjƒ}|j|ƒn|j}|j|ƒdS(	NRüRRÎRýRþRÿRR÷(R~RRR<R»RüRRÎRýRþRÿRRt_append_elementR%RjRœRøRRÒRRXRLRRRRçRºRÓR÷R(R RžR=RRRRêR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRYs4	N(R5R6R7R8RRIR\R.R1RR9R¼R	ttarget_fullnameRßRRR;RRRRRžRªRâRR(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRî±s.#			q		
			!	!	,			t_NotAColumnExprcB@s-eZd„Zd„ZZed„ƒZRS(cC@stjd|jjƒ‚dS(Ns7This %s cannot be used directly as a column expression.(RRNRðR5(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_not_a_column_exprscC@s
|jƒS(N(R"(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR{„scC@s
|jƒS(N(R"(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR{…s(R5R6R"R÷t
self_groupR9t
_from_objects(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR!~s	
tDefaultGeneratorcB@sVeZdZdZeZeZdZed„Z	d„Z
dd„Zed„ƒZ
RS(s'Base class for column *default* values.tdefault_generatorcC@s
||_dS(N(RÑ(R RÑ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\‘scC@s1||_|jr!||j_n||j_dS(N(RžRÑRÎRŽ(R Rž((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRª”s		cK@s+|dkrt|ƒ}n|j||S(N(RR	R(R RxR)((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytexecute›scC@s-t|ddƒdk	r%|jjjSdSdS(s4Return the connectable associated with this default.RžN(R—RRžR=Rx(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRx s
N(R5R6R7R8RItis_sequencetis_server_defaultRRžR\RªR'R9Rx(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR%ˆs	RÔcB@steZdZd„Zejd„ƒZejd„ƒZejd„ƒZd„Z	d„Z
ee
ƒZd„Z
RS(sèA plain default value on a column.

    This could correspond to a constant, a callable function,
    or a SQL clause.

    :class:`.ColumnDefault` is generated automatically
    whenever the ``default``, ``onupdate`` arguments of
    :class:`.Column` are used.  A :class:`.ColumnDefault`
    can be passed positionally as well.

    For example, the following::

        Column('foo', Integer, default=50)

    Is equivalent to::

        Column('foo', Integer, ColumnDefault(50))


    cK@sett|ƒj|t|tƒr7tjdƒ‚ntj|ƒrX|j	|ƒ}n||_
dS(sj"Construct a new :class:`.ColumnDefault`.


        :param arg: argument representing the default value.
         May be one of the following:

         * a plain non-callable Python value, such as a
           string, integer, boolean, or other simple type.
           The default value will be used as is each time.
         * a SQL expression, that is one which derives from
           :class:`.ColumnElement`.  The SQL expression will
           be rendered into the INSERT or UPDATE statement,
           or in the case of a primary key column when
           RETURNING is not used may be
           pre-executed before an INSERT within a SELECT.
         * A Python callable.  The function will be invoked for each
           new row subject to an INSERT or UPDATE.
           The callable must accept exactly
           zero or one positional arguments.  The one-argument form
           will receive an instance of the :class:`.ExecutionContext`,
           which provides contextual information as to the current
           :class:`.Connection` in use as well as the current
           statement and parameters.

        s4ColumnDefault may not be a server-side default type.N(RdRÔR\RRÖRRKRtcallablet_maybe_wrap_callabletarg(R R,R)((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\¿scC@stj|jƒS(N(RR*R,(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytis_callableáscC@st|jtƒS(N(RR,R(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytis_clause_elementåscC@s|jo|jo|jS(N(R-R.R((R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt	is_scalarés

c@s­ytjˆdtƒ}Wntk
r6‡fd†SX|ddk	rWt|dƒpZd}t|dƒ|}|dkrЇfd†S|dkršˆStjdƒ‚dS(	s±Wrap callables that don't accept a context.

        This is to allow easy compatibility with default callables
        that aren't specific to accepting of a context.

        tno_selfc@sˆƒS(N((tctx(Rs(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR{ùsiic@sˆƒS(N((R1(Rs(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR{ÿsisDColumnDefault Python function takes zero or one positional argumentsN(Rtget_callable_argspecRmRERR¿RRK(R Rstargspect	defaultedtpositionals((RssJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR+ïs
&
cC@s|jr
dSdSdS(Ntcolumn_onupdatetcolumn_default(RÑ(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_visit_names	cC@sd|jS(NsColumnDefault(%r)(R,(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.s(R5R6R7R\RR;R-R.R/R+R8R9R8R.(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRÔ©s	"		RcB@s×eZdZdZeZddddddddeddded„
Ze	j
d„ƒZe	j
d„ƒZe	j
dƒd„ƒZd„Zd„Zd	„Zed
„ƒZded„Zded„Zd
„ZRS(sÎRepresents a named database sequence.

    The :class:`.Sequence` object represents the name and configurational
    parameters of a database sequence.   It also represents
    a construct that can be "executed" by a SQLAlchemy :class:`.Engine`
    or :class:`.Connection`, rendering the appropriate "next value" function
    for the target database and returning a result.

    The :class:`.Sequence` is typically associated with a primary key column::

        some_table = Table(
            'some_table', metadata,
            Column('id', Integer, Sequence('some_table_seq'),
            primary_key=True)
        )

    When CREATE TABLE is emitted for the above :class:`.Table`, if the
    target platform supports sequences, a CREATE SEQUENCE statement will
    be emitted as well.   For platforms that don't support sequences,
    the :class:`.Sequence` construct is ignored.

    .. seealso::

        :class:`.CreateSequence`

        :class:`.DropSequence`

    tsequencecC@s
tt|ƒjd|ƒt||ƒ|_||_||_||_||_||_	||_
||_|
|_|	t
krd|_}	nF|dk	rÃ|	dkrÃ|jrÃ|j|_}	nt|	|
ƒ|_||_t||	ƒ|_|r|j|ƒndS(sConstruct a :class:`.Sequence` object.

        :param name: The name of the sequence.
        :param start: the starting index of the sequence.  This value is
         used when the CREATE SEQUENCE command is emitted to the database
         as the value of the "START WITH" clause.   If ``None``, the
         clause is omitted, which on most platforms indicates a starting
         value of 1.
        :param increment: the increment value of the sequence.  This
         value is used when the CREATE SEQUENCE command is emitted to
         the database as the value of the "INCREMENT BY" clause.  If ``None``,
         the clause is omitted, which on most platforms indicates an
         increment of 1.
        :param minvalue: the minimum value of the sequence.  This
         value is used when the CREATE SEQUENCE command is emitted to
         the database as the value of the "MINVALUE" clause.  If ``None``,
         the clause is omitted, which on most platforms indicates a
         minvalue of 1 and -2^63-1 for ascending and descending sequences,
         respectively.

         .. versionadded:: 1.0.7

        :param maxvalue: the maximum value of the sequence.  This
         value is used when the CREATE SEQUENCE command is emitted to
         the database as the value of the "MAXVALUE" clause.  If ``None``,
         the clause is omitted, which on most platforms indicates a
         maxvalue of 2^63-1 and -1 for ascending and descending sequences,
         respectively.

         .. versionadded:: 1.0.7

        :param nominvalue: no minimum value of the sequence.  This
         value is used when the CREATE SEQUENCE command is emitted to
         the database as the value of the "NO MINVALUE" clause.  If ``None``,
         the clause is omitted, which on most platforms indicates a
         minvalue of 1 and -2^63-1 for ascending and descending sequences,
         respectively.

         .. versionadded:: 1.0.7

        :param nomaxvalue: no maximum value of the sequence.  This
         value is used when the CREATE SEQUENCE command is emitted to
         the database as the value of the "NO MAXVALUE" clause.  If ``None``,
         the clause is omitted, which on most platforms indicates a
         maxvalue of 2^63-1 and -1 for ascending and descending sequences,
         respectively.

         .. versionadded:: 1.0.7

        :param cycle: allows the sequence to wrap around when the maxvalue
         or minvalue has been reached by an ascending or descending sequence
         respectively.  This value is used when the CREATE SEQUENCE command
         is emitted to the database as the "CYCLE" clause.  If the limit is
         reached, the next number generated will be the minvalue or maxvalue,
         respectively.  If cycle=False (the default) any calls to nextval
         after the sequence has reached its maximum value will return an
         error.

         .. versionadded:: 1.0.7

        :param schema: Optional schema name for the sequence, if located
         in a schema other than the default.  The rules for selecting the
         schema name when a :class:`.MetaData` is also present are the same
         as that of :paramref:`.Table.schema`.

        :param optional: boolean value, when ``True``, indicates that this
         :class:`.Sequence` object only needs to be explicitly generated
         on backends that don't provide another way to generate primary
         key identifiers.  Currently, it essentially means, "don't create
         this sequence on the Postgresql backend, where the SERIAL keyword
         creates a sequence for us automatically".
        :param quote: boolean value, when ``True`` or ``False``, explicitly
         forces quoting of the schema name on or off.  When left at its
         default of ``None``, normal quoting rules based on casing and
         reserved words take place.
        :param quote_schema: set the quoting preferences for the ``schema``
         name.
        :param metadata: optional :class:`.MetaData` object which will be
         associated with this :class:`.Sequence`.  A :class:`.Sequence`
         that is associated with a :class:`.MetaData` gains access to the
         ``bind`` of that :class:`.MetaData`, meaning the
         :meth:`.Sequence.create` and :meth:`.Sequence.drop` methods will
         make usage of that engine automatically.

         .. versionchanged:: 0.7
             Additionally, the appropriate CREATE SEQUENCE/
             DROP SEQUENCE DDL commands will be emitted corresponding to this
             :class:`.Sequence` when :meth:`.MetaData.create_all` and
             :meth:`.MetaData.drop_all` are invoked.

         Note that when a :class:`.Sequence` is applied to a :class:`.Column`,
         the :class:`.Sequence` is automatically associated with the
         :class:`.MetaData` object of that column's parent :class:`.Table`,
         when that association is made.   The :class:`.Sequence` will then
         be subject to automatic CREATE SEQUENCE/DROP SEQUENCE corresponding
         to when the :class:`.Table` object itself is created or dropped,
         rather than that of the :class:`.MetaData` object overall.
        :param for_update: Indicates this :class:`.Sequence`, when associated
         with a :class:`.Column`, should be invoked for UPDATE statements
         on that column's table, rather than for INSERT statements, when
         no value is otherwise present for that column in the statement.

        RÑN(RdRR\RRtstartt	incrementtminvaluetmaxvaluet
nominvaluet
nomaxvaluetcycletoptionalRGRRRXRt_keyt
_set_metadata(R RR:R;R<R=R>R?R@RRAR/RXR[RÑ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\4s&l								!	cC@stS(N(RI(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR-µscC@stS(N(RI(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.¹sssqlalchemy.sql.functions.funccC@s|j|d|jƒS(s´Return a :class:`.next_value` function element
        which will render the appropriate increment function
        for this :class:`.Sequence` within any SQL expression.

        Rx(t
next_valueRx(R tfunc((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRD½scC@s*tt|ƒj|ƒ|j|jƒdS(N(RdRRªRëR(R Rž((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRªÆscC@s|j|jƒdS(N(RCRX(R RžR=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRÊscC@s ||_||jj|j<dS(N(RXt
_sequencesRB(R RX((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRCÍs	cC@s|jr|jjSdSdS(N(RXRxR(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRxÑs	
cC@s8|dkrt|ƒ}n|jtj|d|ƒdS(s&Creates this sequence in the database.R°N(RR	R±RR²(R RxR°((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR³Øs
cC@s8|dkrt|ƒ}n|jtj|d|ƒdS(s&Drops this sequence from the database.R°N(RR	R±RR´(R RxR°((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRµás
cC@stjd|jjƒ‚dS(NsœThis %s cannot be used directly as a column expression.  Use func.next_value(sequence) to produce a 'next value' function that's usable as a column element.(RRNRðR5(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR"êsN(R5R6R7R8RmR(RRIR\RR;R-R.tdependenciesRDRªRRCR9RxR³RµR"(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRs$	}						RÖcB@sPeZdZeZeZeZed„Zd„Z	d„Z
d„Zd„ZRS(sŸA marker for a transparent database-side default.

    Use :class:`.FetchedValue` when the database is configured
    to provide some automatic default for a column.

    E.g.::

        Column('foo', Integer, FetchedValue())

    Would indicate that some trigger or default generator
    will create a new value for the ``foo`` column during an
    INSERT.

    .. seealso::

        :ref:`triggered_columns`

    cC@s
||_dS(N(RÑ(R RÑ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\	scC@s$||jkr|S|j|ƒSdS(N(RÑt_clone(R RÑ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR×	scC@sH|jj|jƒ}|jj|jƒ|jjddƒ||_|S(NRž(RðRCR0tupdateRHRRÑ(R RÑtn((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRH	s
	cC@s1||_|jr!||j_n||j_dS(N(RžRÑRËR(R Rž((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRª	s		cC@s
tj|ƒS(N(RR-(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR."	s(
R5R6R7RmR)RIR‘thas_argumentR\R×RHRªR.(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRÖós			RØcB@s,eZdZeZeed„Zd„ZRS(s7A DDL-specified DEFAULT column value.

    :class:`.DefaultClause` is a :class:`.FetchedValue`
    that also generates a "DEFAULT" clause when
    "CREATE TABLE" is emitted.

    :class:`.DefaultClause` is generated automatically
    whenever the ``server_default``, ``server_onupdate`` arguments of
    :class:`.Column` are used.  A :class:`.DefaultClause`
    can be passed positionally as well.

    For example, the following::

        Column('foo', Integer, server_default="50")

    Is equivalent to::

        Column('foo', Integer, DefaultClause("50"))

    cC@sOtj|tjdttfdƒtt|ƒj|ƒ||_||_	dS(NiR,(
Rtassert_arg_typeRÒRRRdRØR\R,R‘(R R,RÑt
_reflected((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\>	s
	cC@sd|j|jfS(Ns DefaultClause(%r, for_update=%r)(R,RÑ(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.F	s(R5R6R7RmRKRIR\R.(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRØ&	stPassiveDefaultcB@s,eZdZejddeƒd„ƒZRS(s˜A DDL-specified DEFAULT column value.

    .. deprecated:: 0.6
        :class:`.PassiveDefault` is deprecated.
        Use :class:`.DefaultClause`.
    s0.6sE:class:`.PassiveDefault` is deprecated.  Use :class:`.DefaultClause`.cO@stj|||ŽdS(N(RØR\(R R,RW((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\R	s(R5R6R7RR:RIR\(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRNK	s	t
ConstraintcB@sPeZdZdZddddded„Zed„ƒZd„Z	d„Z
RS(sA table-level SQL constraint.R~cK@s]||_||_||_|r-||_n||_||_tj|ƒ|j|ƒdS(s÷Create a SQL constraint.

        :param name:
          Optional, the in-database name of this ``Constraint``.

        :param deferrable:
          Optional bool.  If set, emit DEFERRABLE or NOT DEFERRABLE when
          issuing DDL for this constraint.

        :param initially:
          Optional string.  If set, emit INITIALLY <value> when issuing DDL
          for this constraint.

        :param info: Optional data dictionary which will be populated into the
            :attr:`.SchemaItem.info` attribute of this object.

            .. versionadded:: 1.0.0

        :param _create_rule:
          a callable which is passed the DDLCompiler object during
          compilation. Returns True or False to signal inline generation of
          this Constraint.

          The AddConstraint and DropConstraint DDL constructs provide
          DDLElement's more comprehensive "conditional DDL" approach that is
          passed a database connection when DDL is being issued. _create_rule
          is instead called during any CREATE TABLE compilation, where there
          may not be any transaction/connection in progress. However, it
          allows conditional compilation of the constraint even for backends
          which do not support addition of constraints through ALTER TABLE,
          which currently includes SQLite.

          _create_rule is used by some types to create constraints.
          Currently, its call signature is subject to change at any time.

        :param \**dialect_kw:  Additional keyword arguments are dialect
            specific, and passed in the form ``<dialectname>_<argname>``.  See
            the documentation regarding an individual dialect at
            :ref:`dialect_toplevel` for detail on documented arguments.

        N(	RRþRÿR,t_create_ruleR½RRÙRƒ(R RRþRÿRPR,R½R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\_	s-					
cC@sDyt|jtƒr|jSWntk
r0nXtjdƒ‚dS(NsdThis constraint is not bound to a table.  Did you mean to call table.append_constraint(constraint) ?(RRûR<tAttributeErrorRRN(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR=–	s
cC@s||_|jj|ƒdS(N(RûRgRœ(R Rû((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRª¡	s	cK@s
tƒ‚dS(N(tNotImplementedError(R RW((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR1¥	sN(R5R6R7R8RRIR\R9R=RªR1(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyROZ	s	6	cC@sCt|dƒr|jƒ}nt|tƒs?tjdƒ‚n|S(NR÷sschema.Column object expected(RÓR÷RRÇRRK(telement((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_to_schema_column©	s
cC@sWt|dƒr|jƒ}nt|tjtfƒsSd}tj||ƒ‚n|S(NR÷s1Element %r is not a string name or column element(RÓR÷RRRÒRRRK(RSRY((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_to_schema_column_or_string±	stColumnCollectionMixincB@sAeZdZeZd„Zed„ƒZed„Z	d„Z
RS(cO@s`|jdtƒ}tƒ|_g|D]}t|ƒ^q%|_|r\|jr\|jƒndS(Nt_autoattach(RHRmR
R–RUt_pending_colargst
_check_attach(R R–RWRWRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\Æ	scc@s˜x‘|D]‰}d}d}t|tƒs1|}n6g}tj|ii|jd6ƒ|rg|d}n|dk	ry|n|}||||fVqWdS(NRži(RRRRttraverseRº(RVtexpressionstexprtstrnameRžtcolstadd_element((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt"_extract_col_expression_collectionÎ	s
	
c@sÆgˆjD]}t|tƒr
|^q
}g|D]}t|jtƒr2|^q2}t|ƒj|ƒ‰ˆrâ|s„tdƒ‚tˆjƒj|ƒ}|s⇇fd†}ˆˆ_xˆD]}|j	|ƒqÄWdSn|}tg|D]}|j^qòƒ}	t
|	ƒdkr2ˆj|	jƒƒnt
|	ƒdkrˆj
rÂ|dj}
g|dD]}|j|
k	rf|^qf}|rÂtjddjd„|Dƒƒ|
jfƒ‚qÂndS(Ns#Should not reach here on event callc@s*ˆj|ƒˆs&ˆjdtƒndS(NRr(tdiscardRYRm(RžR=(t
cols_wo_tableR (sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt
_col_attachedó	s
iis(Column(s) %s are not part of table '%s'.s, cs@s|]}d|VqdS(s'%s'N((RRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pys	<genexpr>
s(RXRRÇR=R<Ret
differenceRt_cols_wo_tableRëR¿R%RHt_allow_multiple_tablesRRKR”Rš(R RrRztcol_objstcols_w_tablethas_string_colsRcR’R–RLR=tothers((RbR sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRYÞ	s2+	
"
,cC@sJxC|jD]8}t|tjƒr2|j|}n|jj|ƒq
WdS(N(RXRRRÒRzR–Rœ(R R=R’((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRª
sN(R5R6RR–RIRfR\tclassmethodR`RYRª(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRVº	s	-tColumnCollectionConstraintcB@sMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	RS(s-A constraint that proxies a ColumnCollection.cO@s<|jdtƒ}tj||tj|d||ŒdS(sZ
        :param \*columns:
          A sequence of column names or Column objects.

        :param name:
          Optional, the in-database name of this constraint.

        :param deferrable:
          Optional bool.  If set, emit DEFERRABLE or NOT DEFERRABLE when
          issuing DDL for this constraint.

        :param initially:
          Optional string.  If set, emit INITIALLY <value> when issuing DDL
          for this constraint.

        :param \**kw: other keyword arguments including dialect-specific
          arguments are propagated to the :class:`.Constraint` superclass.

        RWN(RHRmROR\RV(R R–RWRW((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\
scC@s$tj||ƒtj||ƒdS(N(RORªRV(R R=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRª-
scC@s
||jkS(N(R–(R R˜((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__contains__1
scK@s@|jd|jd|jd|j|jjƒŒ}|j|ƒS(NRRþRÿ(RðRRþRÿR–RÂR4(R RWRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR14
scC@s|jj|ƒS(sÕReturn True if this constraint contains the given column.

        Note that this object also contains an attribute ``.columns``
        which is a :class:`.ColumnCollection` of :class:`.Column` objects.

        (R–tcontains_column(R R’((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRn9
sc@s#|jj‰‡fd†ˆjDƒS(Nc3@s|]}ˆ|VqdS(N((RRZ(tordered_dict(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pys	<genexpr>H
s(R–t_datat_list(R ((RosJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__iter__C
scC@st|jjƒS(N(R¿R–Rp(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__len__J
s(
R5R6R7R\RªRmR1RnRrRs(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRl
s					
	tCheckConstraintc	B@sVeZdZeZddddddeed„Zd„Ze	eƒZdd„Z
RS(slA table- or column-level CHECK constraint.

    Can be included in the definition of a Table or Column.
    c
C@s›t|dtƒ|_g}
tj|jii|
jd6ƒtt|ƒjd|d|d|d|d|d|	d	||
Œ|d
k	r—|j
|ƒnd
S(sÃConstruct a CHECK constraint.

        :param sqltext:
          A string containing the constraint definition, which will be used
          verbatim, or a SQL expression construct.   If given as a string,
          the object is converted to a :class:`.Text` object.   If the textual
          string includes a colon character, escape this using a backslash::

            CheckConstraint(r"foo ~ E'a(?\:b|c)d")

        :param name:
          Optional, the in-database name of the constraint.

        :param deferrable:
          Optional bool.  If set, emit DEFERRABLE or NOT DEFERRABLE when
          issuing DDL for this constraint.

        :param initially:
          Optional string.  If set, emit INITIALLY <value> when issuing DDL
          for this constraint.

        :param info: Optional data dictionary which will be populated into the
            :attr:`.SchemaItem.info` attribute of this object.

            .. versionadded:: 1.0.0

        R¹RžRRþRÿRPR,R½RWN(RRItsqltextRRZRºRdRtR\RR%(R RuRRþRÿR=R,RPRWR½R–((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\V
s 	cC@st|jtƒrdSdSdS(Ntcheck_constrainttcolumn_check_constraint(RRûR<(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR8ƒ
sc@s”ˆdk	r9‡‡fd†}tjˆji|ƒ}n	ˆj}t|dˆjdˆjdˆjdˆjdˆdt	dˆj
ƒ}ˆj|ƒS(	Nc@s+ˆjjj|ƒr#ˆj|jSdSdS(N(R=RzRnRZR(R’(R R¶(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR¨Œ
sRRÿRþRPR=RWR½(RRtreplacement_traverseRuRtRRÿRþRPRIR½R4(R R¶RWR¨RuRz((R R¶sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR1Š
s						N(R5R6R7RmRfRRIR\R8R9R1(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRtN
s+	R»cB@s°eZdZdZdddddeedddd„
Zd„Zed„ƒZ	ed„ƒZ
ed„ƒZd„Zed„ƒZ
ed	„ƒZd
„Zddd„ZRS(
s¥A table-level FOREIGN KEY constraint.

    Defines a single column or composite FOREIGN KEY ... REFERENCES
    constraint. For a no-frills, single column foreign key, adding a
    :class:`.ForeignKey` to the definition of a :class:`.Column` is a
    shorthand equivalent for an unnamed, single column
    :class:`.ForeignKeyConstraint`.

    Examples of foreign key configuration are in :ref:`metadata_foreignkeys`.

    tforeign_key_constraintc
K@s"tj|d|d|d|d||
||_||_|	|_||_|
|_g|D]f}t|d|d|jd|jd|jd|jd	|jd
|jd|j	d|j
|j	^q\|_t
j||Œ|dk	rt|dƒr||jkst‚n|j|ƒndS(
sConstruct a composite-capable FOREIGN KEY.

        :param columns: A sequence of local column names. The named columns
          must be defined and present in the parent Table. The names should
          match the ``key`` given to each column (defaults to the name) unless
          ``link_to_name`` is True.

        :param refcolumns: A sequence of foreign column names or Column
          objects. The columns must all be located within the same Table.

        :param name: Optional, the in-database name of the key.

        :param onupdate: Optional string. If set, emit ON UPDATE <value> when
          issuing DDL for this constraint. Typical values include CASCADE,
          DELETE and RESTRICT.

        :param ondelete: Optional string. If set, emit ON DELETE <value> when
          issuing DDL for this constraint. Typical values include CASCADE,
          DELETE and RESTRICT.

        :param deferrable: Optional bool. If set, emit DEFERRABLE or NOT
          DEFERRABLE when issuing DDL for this constraint.

        :param initially: Optional string. If set, emit INITIALLY <value> when
          issuing DDL for this constraint.

        :param link_to_name: if True, the string name given in ``column`` is
          the rendered name of the referenced column, not its locally assigned
          ``key``.

        :param use_alter: If True, do not emit the DDL for this constraint as
          part of the CREATE TABLE definition. Instead, generate it via an
          ALTER TABLE statement issued after the full collection of tables
          have been created, and drop it via an ALTER TABLE statement before
          the full collection of tables are dropped.

          The use of :paramref:`.ForeignKeyConstraint.use_alter` is
          particularly geared towards the case where two or more tables
          are established within a mutually-dependent foreign key constraint
          relationship; however, the :meth:`.MetaData.create_all` and
          :meth:`.MetaData.drop_all` methods will perform this resolution
          automatically, so the flag is normally not needed.

          .. versionchanged:: 1.0.0  Automatic resolution of foreign key
             cycles has been added, removing the need to use the
             :paramref:`.ForeignKeyConstraint.use_alter` in typical use
             cases.

          .. seealso::

                :ref:`use_alter`

        :param match: Optional string. If set, emit MATCH <value> when issuing
          DDL for this constraint. Typical values include SIMPLE, PARTIAL
          and FULL.

        :param info: Optional data dictionary which will be populated into the
            :attr:`.SchemaItem.info` attribute of this object.

            .. versionadded:: 1.0.0

        :param \**dialect_kw:  Additional keyword arguments are dialect
          specific, and passed in the form ``<dialectname>_<argname>``.  See
          the documentation regarding an individual dialect at
          :ref:`dialect_toplevel` for detail on documented arguments.

            .. versionadded:: 0.9.2

        RRþRÿR,RíRÎRýRüRèRRûN(ROR\RÎRýRèRüRRîRRþRÿtdialect_kwargstelementsRVRRÓRûRR%(R R–t
refcolumnsRRÎRýRþRÿRüRèRR=R,Rtrefcol((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\­
sJ
					scC@s$|jj|ƒ|jj|ƒdS(N(R–RœR{Rº(R RžRÞ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRscC@stjt|j|jƒƒS(N(RtOrderedDicttziptcolumn_keysR{(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt	_elementsscC@s x|jD]
}|jSWdSdS(N(R{R¼R(R telem((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR¼%scC@s|jdjjS(s^The :class:`.Table` object to which this
        :class:`.ForeignKeyConstraint` references.

        This is a dynamically calculated attribute which may not be available
        if the constraint and/or parent table is not yet associated with
        a metadata collection that contains the referred table.

        .. versionadded:: 1.0.0

        i(R{RžR=(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytreferred_table,scC@s‹tg|jD]}|jƒ^q
ƒ}d|kr‡t|ƒdkr‡t|ƒdd!\}}tjd|j|j	||fƒ‚ndS(NiiisJForeignKeyConstraint on %s(%s) refers to multiple remote tables: %s and %s(
ReR{R	RR¿R|RRKRlt_col_description(R R=R‚t
table_keystelem0telem1((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR:s"cC@sXt|dƒr|jjƒSg|jD]*}t|tƒrD|jn	t|ƒ^q&SdS(s•Return a list of string keys representing the local
        columns in this :class:`.ForeignKeyConstraint`.

        This list is either the original string arguments sent
        to the constructor of the :class:`.ForeignKeyConstraint`,
        or if the constraint has been initialized with :class:`.Column`
        objects, is the string .key of each element.

        .. versionadded:: 1.0.0

        RûN(RÓR–RÂRXRRRZtstr(R R’((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR€Hs

cC@sdj|jƒS(Ns, (R”R€(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR„]scC@sÃtj||ƒytj||ƒWn6tk
r\}tjd|j|jdfƒ‚nXxRt|j	|j
ƒD];\}}t|dƒsž|j|k	rs|j
|ƒqsqsW|j|ƒdS(NsQCan't create ForeignKeyConstraint on table '%s': no column named '%s' is present.iRû(RORªRltKeyErrorRRKRšR&RR–R{RÓRûR%R(R R=tkeR’RÞ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRªas"cK@stg|jD]}|jj^q
g|jD]N}|jd|d|dk	rq|jƒ|jjjkrq|jndƒ^q,d|jd|j	d|j
d|jd|jd|j
d	|jd
|jƒ}x0t|j|jƒD]\}}|j|ƒqáW|j|ƒS(NRRRRÎRýRüRþRÿRèR(R»R{RûRZRRR	R=RRÎRýRüRþRÿRèRRR4(R RR¶RWR˜R€tself_fktother_fk((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR1ss"[							N(R5R6R7R8RRIR\RR9RR¼RƒRR€R„RªR1(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR»Ÿ
s		j			RicB@s/eZdZdZd„Zd„Zd„ZRS(sµ
A table-level PRIMARY KEY constraint.

    The :class:`.PrimaryKeyConstraint` object is present automatically
    on any :class:`.Table` object; it is assigned a set of
    :class:`.Column` objects corresponding to those marked with
    the :paramref:`.Column.primary_key` flag::

        >>> my_table = Table('mytable', metadata,
        ...                 Column('id', Integer, primary_key=True),
        ...                 Column('version_id', Integer, primary_key=True),
        ...                 Column('data', String(50))
        ...     )
        >>> my_table.primary_key
        PrimaryKeyConstraint(
            Column('id', Integer(), table=<mytable>,
                   primary_key=True, nullable=False),
            Column('version_id', Integer(), table=<mytable>,
                   primary_key=True, nullable=False)
        )

    The primary key of a :class:`.Table` can also be specified by using
    a :class:`.PrimaryKeyConstraint` object explicitly; in this mode of usage,
    the "name" of the constraint can also be specified, as well as other
    options which may be recognized by dialects::

        my_table = Table('mytable', metadata,
                    Column('id', Integer),
                    Column('version_id', Integer),
                    Column('data', String(50)),
                    PrimaryKeyConstraint('id', 'version_id',
                                         name='mytable_pk')
                )

    The two styles of column-specification should generally not be mixed.
    An warning is emitted if the columns present in the
    :class:`.PrimaryKeyConstraint`
    don't match the columns that were marked as ``primary_key=True``, if both
    are present; in this case, the columns are taken strictly from the
    :class:`.PrimaryKeyConstraint` declaration, and those columns otherwise
    marked as ``primary_key=True`` are ignored.  This behavior is intended to
    be backwards compatible with previous behavior.

    .. versionchanged:: 0.9.2  Using a mixture of columns within a
       :class:`.PrimaryKeyConstraint` in addition to columns marked as
       ``primary_key=True`` now emits a warning if the lists don't match.
       The ultimate behavior of ignoring those columns marked with the flag
       only is currently maintained for backwards compatibility; this warning
       may raise an exception in a future release.

    For the use case where specific options are to be specified on the
    :class:`.PrimaryKeyConstraint`, but the usual style of using
    ``primary_key=True`` flags is still desirable, an empty
    :class:`.PrimaryKeyConstraint` may be specified, which will take on the
    primary key column collection from the :class:`.Table` based on the
    flags::

        my_table = Table('mytable', metadata,
                    Column('id', Integer, primary_key=True),
                    Column('version_id', Integer, primary_key=True),
                    Column('data', String(50)),
                    PrimaryKeyConstraint(name='mytable_pk',
                                         mssql_clustered=True)
                )

    .. versionadded:: 0.9.2 an empty :class:`.PrimaryKeyConstraint` may now
       be specified for the purposes of establishing keyword arguments with
       the constraint, independently of the specification of "primary key"
       columns within the :class:`.Table` itself; columns marked as
       ``primary_key=True`` will be gathered into the empty constraint's
       column collection.

    tprimary_key_constraintc
C@sLtt|ƒj|ƒ|j|k	rT|jj|jƒ||_|jj|ƒng|jD]}|jr^|^q^}|jr|rt	|ƒt	|jj
ƒƒkrtjd|j
djd„|Dƒƒdjd„|jDƒƒdjd„|jDƒƒfƒg|(nx#|jD]}t|_t|_qW|jj|ƒdS(NsÇTable '%s' specifies columns %s as primary_key=True, not matching locally specified columns %s; setting the current primary key columns to %s. This warning may become an exception in a future releases, cs@s|]}d|jVqdS(s'%s'N(R(RRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pys	<genexpr>ëscs@s|]}d|jVqdS(s'%s'N(R(RRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pys	<genexpr>ìscs@s|]}d|jVqdS(s'%s'N(R(RRz((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pys	<genexpr>ís(RdRiRªR‡RgRaRœRzR–RetvaluesRR¹RR”RmRIRÊtextend(R R=Rzt	table_pks((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRªÙs&	%!!
	
cC@s>x|D]}t|_qW|jj|ƒ|j|jƒdS(sDrepopulate this :class:`.PrimaryKeyConstraint` given
        a set of columns.

        Existing columns in the table that are marked as primary_key=True
        are maintained.

        Also fires a new event.

        This is basically like putting a whole new
        :class:`.PrimaryKeyConstraint` object on the parent
        :class:`.Table` object without actually replacing the object.

        The ordering of the given list of columns is also maintained; these
        columns will be appended to the list of columns after any which
        are already present.

        N(RmR‡R–RR%R=(R R–R’((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_reload÷s

cC@s|jj|ƒdS(N(R–R¨(R R’((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRãs(R5R6R7R8RªR‘Rã(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRis
H		R¾cB@seZdZdZRS(sA table-level UNIQUE constraint.

    Defines a single column or composite UNIQUE constraint. For a no-frills,
    single column constraint, adding ``unique=True`` to the ``Column``
    definition is a shorthand equivalent for an unnamed, single column
    UniqueConstraint.
    tunique_constraint(R5R6R7R8(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR¾sRÁcB@sVeZdZdZd„Zd„Zed„ƒZdd„Z	dd„Z
d„ZRS(	s´	A table-level INDEX.

    Defines a composite (one or more column) INDEX.

    E.g.::

        sometable = Table("sometable", metadata,
                        Column("name", String(50)),
                        Column("address", String(100))
                    )

        Index("some_index", sometable.c.name)

    For a no-frills, single column index, adding
    :class:`.Column` also supports ``index=True``::

        sometable = Table("sometable", metadata,
                        Column("name", String(50), index=True)
                    )

    For a composite index, multiple columns can be specified::

        Index("some_index", sometable.c.name, sometable.c.address)

    Functional indexes are supported as well, typically by using the
    :data:`.func` construct in conjunction with table-bound
    :class:`.Column` objects::

        Index("some_index", func.lower(sometable.c.name))

    .. versionadded:: 0.8 support for functional and expression-based indexes.

    An :class:`.Index` can also be manually associated with a :class:`.Table`,
    either through inline declaration or using
    :meth:`.Table.append_constraint`.  When this approach is used, the names
    of the indexed columns can be specified as strings::

        Table("sometable", metadata,
                        Column("name", String(50)),
                        Column("address", String(100)),
                        Index("some_index", "name", "address")
                )

    To support functional or expression-based indexes in this form, the
    :func:`.text` construct may be used::

        from sqlalchemy import text

        Table("sometable", metadata,
                        Column("name", String(50)),
                        Column("address", String(100)),
                        Index("some_index", text("lower(name)"))
                )

    .. versionadded:: 0.9.5 the :func:`.text` construct may be used to
       specify :class:`.Index` expressions, provided the :class:`.Index`
       is explicitly associated with the :class:`.Table`.


    .. seealso::

        :ref:`schema_indexes` - General information on :class:`.Index`.

        :ref:`postgresql_indexes` - PostgreSQL-specific options available for
        the :class:`.Index` construct.

        :ref:`mysql_indexes` - MySQL-specific options available for the
        :class:`.Index` construct.

        :ref:`mssql_indexes` - MSSQL-specific options available for the
        :class:`.Index` construct.

    RÀc	O@sÏd|_g}x?|j|ƒD].\}}}}|dk	r|j|ƒqqW||_t||jddƒƒ|_|jdtƒ|_	d|kr®|jdƒ|_
n|j|ƒtj
||ŒdS(s~Construct an index object.

        :param name:
          The name of the index

        :param \*expressions:
          Column expressions to include in the index.   The expressions
          are normally instances of :class:`.Column`, but may also
          be arbitrary SQL expressions which ultimately refer to a
          :class:`.Column`.

        :param unique=False:
            Keyword only argument; if True, create a unique index.

        :param quote=None:
            Keyword only argument; whether to apply quoting to the name of
            the index.  Works in the same manner as that of
            :paramref:`.Column.quote`.

        :param info=None: Optional data dictionary which will be populated
            into the :attr:`.SchemaItem.info` attribute of this object.

            .. versionadded:: 1.0.0

        :param \**kw: Additional keyword arguments not mentioned above are
            dialect specific, and passed in the form
            ``<dialectname>_<argname>``. See the documentation regarding an
            individual dialect at :ref:`dialect_toplevel` for detail on
            documented arguments.

        R/R·R,N(RR=R`RºR[RRHRRIR·R,RƒRVR\(	R RR[RWR–R\RžR]R_((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\qs 			
cC@s¿tj||ƒ|jdk	rY||jk	rYtjd|j|jj|jfƒ‚n||_|jj	|ƒgt
j|j|j
ƒD]'\}}t|tƒr¬|n|^q‹|_dS(NsKIndex '%s' is against table '%s', and cannot be associated with table '%s'.(RVRªR=RRRKRRšRfRœRtzip_longestR[R–RR(R R=R\tcolexpr((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRª¤s		cC@s
|jjS(s2Return the connectable associated with this Index.(R=Rx(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRxºscC@s2|dkrt|ƒ}n|jtj|ƒ|S(sÉIssue a ``CREATE`` statement for this
        :class:`.Index`, using the given :class:`.Connectable`
        for connectivity.

        .. seealso::

            :meth:`.MetaData.create_all`.

        N(RR	R±RR²(R Rx((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR³Às
cC@s2|dkrt|ƒ}n|jtj|ƒdS(sÅIssue a ``DROP`` statement for this
        :class:`.Index`, using the given :class:`.Connectable`
        for connectivity.

        .. seealso::

            :meth:`.MetaData.drop_all`.

        N(RR	R±RR´(R Rx((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRµÏs
cC@sSddjt|jƒgg|jD]}t|ƒ^q"|jrJdgpMgƒS(Ns	Index(%s)s, sunique=True(R”R•RR[R·(R te((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.Ýs/N(R5R6R7R8R\RªR9RxRR³RµR.(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRÁ$sI	3	six_%(column_0_label)stixtMetaDatacB@s
eZdZdZdeddedd„ZdZd„Z	d„Z
d„Zd„Zd„Z
d„Zd	„Zd
„Zejdƒd„ƒZeeeƒZd
„Zd„Zed„ƒZddedeed„Zd„Zdded„Zdded„ZRS(sýA collection of :class:`.Table` objects and their associated schema
    constructs.

    Holds a collection of :class:`.Table` objects as well as
    an optional binding to an :class:`.Engine` or
    :class:`.Connection`.  If bound, the :class:`.Table` objects
    in the collection and their columns may participate in implicit SQL
    execution.

    The :class:`.Table` objects themselves are stored in the
    :attr:`.MetaData.tables` dictionary.

    :class:`.MetaData` is a thread-safe object for read operations.
    Construction of new tables within a single :class:`.MetaData` object,
    either explicitly or via reflection, may not be completely thread-safe.

    .. seealso::

        :ref:`metadata_describing` - Introduction to database metadata

    RXcC@s¨tjƒ|_t||ƒ|_||_|r<||_ntƒ|_i|_	t
jtƒ|_
||_|r¤tjdƒ|s—tjdƒ‚n|jƒndS(s¥Create a new MetaData object.

        :param bind:
          An Engine or Connection to bind to.  May also be a string or URL
          instance, these are passed to create_engine() and this MetaData will
          be bound to the resulting engine.

        :param reflect:
          Optional, automatically load all tables from the bound database.
          Defaults to False. ``bind`` is required when this option is set.

          .. deprecated:: 0.8
                Please use the :meth:`.MetaData.reflect` method.

        :param schema:
           The default schema to use for the :class:`.Table`,
           :class:`.Sequence`, and potentially other objects associated with
           this :class:`.MetaData`. Defaults to ``None``.

           When this value is set, any :class:`.Table` or :class:`.Sequence`
           which specifies ``None`` for the schema parameter will instead
           have this schema name defined.  To build a :class:`.Table`
           or :class:`.Sequence` that still has ``None`` for the schema
           even when this parameter is present, use the :attr:`.BLANK_SCHEMA`
           symbol.

           .. seealso::

                :paramref:`.Table.schema`

                :paramref:`.Sequence.schema`

        :param quote_schema:
            Sets the ``quote_schema`` flag for those :class:`.Table`,
            :class:`.Sequence`, and other objects which make usage of the
            local ``schema`` name.

        :param info: Optional data dictionary which will be populated into the
            :attr:`.SchemaItem.info` attribute of this object.

            .. versionadded:: 1.0.0

        :param naming_convention: a dictionary referring to values which
          will establish default naming conventions for :class:`.Constraint`
          and :class:`.Index` objects, for those objects which are not given
          a name explicitly.

          The keys of this dictionary may be:

          * a constraint or Index class, e.g. the :class:`.UniqueConstraint`,
            :class:`.ForeignKeyConstraint` class, the :class:`.Index` class

          * a string mnemonic for one of the known constraint classes;
            ``"fk"``, ``"pk"``, ``"ix"``, ``"ck"``, ``"uq"`` for foreign key,
            primary key, index, check, and unique constraint, respectively.

          * the string name of a user-defined "token" that can be used
            to define new naming tokens.

          The values associated with each "constraint class" or "constraint
          mnemonic" key are string naming templates, such as
          ``"uq_%(table_name)s_%(column_0_name)s"``,
          which describe how the name should be composed.  The values
          associated with user-defined "token" keys should be callables of the
          form ``fn(constraint, table)``, which accepts the constraint/index
          object and :class:`.Table` as arguments, returning a string
          result.

          The built-in names are as follows, some of which may only be
          available for certain types of constraint:

            * ``%(table_name)s`` - the name of the :class:`.Table` object
              associated with the constraint.

            * ``%(referred_table_name)s`` - the name of the :class:`.Table`
              object associated with the referencing target of a
              :class:`.ForeignKeyConstraint`.

            * ``%(column_0_name)s`` - the name of the :class:`.Column` at
              index position "0" within the constraint.

            * ``%(column_0_label)s`` - the label of the :class:`.Column` at
              index position "0", e.g. :attr:`.Column.label`

            * ``%(column_0_key)s`` - the key of the :class:`.Column` at
              index position "0", e.g. :attr:`.Column.key`

            * ``%(referred_column_0_name)s`` - the name of a :class:`.Column`
              at index position "0" referenced by a
              :class:`.ForeignKeyConstraint`.

            * ``%(constraint_name)s`` - a special key that refers to the
              existing name given to the constraint.  When this key is
              present, the :class:`.Constraint` object's existing name will be
              replaced with one that is composed from template string that
              uses this token. When this token is present, it is required that
              the :class:`.Constraint` is given an expicit name ahead of time.

            * user-defined: any additional token may be implemented by passing
              it along with a ``fn(constraint, table)`` callable to the
              naming_convention dictionary.

          .. versionadded:: 0.9.2

          .. seealso::

                :ref:`constraint_naming_conventions` - for detailed usage
                examples.

        s;reflect=True is deprecate; please use the reflect() method.s8A bind must be supplied in conjunction with reflect=TrueN(Rt
immutabledictRLRRtnaming_conventionR,Ret_schemasRFtcollectionstdefaultdictR¬RçRxRJRRKtreflect(R RxRRR[R™R,((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\
ss			
cC@sd|jS(NsMetaData(bind=%r)(Rx(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR.˜
scC@s+t|tjƒs|j}n||jkS(N(RRRÒRZRL(R ttable_or_key((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRm›
scC@sBt||ƒ}tj|j||ƒ|r>|jj|ƒndS(N(Rtdictt__setitem__RLRšRœ(R RRR=RZ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRQ 
scC@s¤t||ƒ}tj|j|dƒ}|dk	rWx!|jD]}|j|ƒq=Wn|jr tg|jj	ƒD]}|j
dk	rs|j
^qsƒ|_ndS(N(RRŸRHRLRRjRRšReRŽR(R RRRZtremovedRÞtt((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRU¦
s	cC@s@i|jd6|jd6|jd6|jd6|jd6|jd6S(NRLRtschemast	sequencestfk_memosR™(RLRRšRFRçR™(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__getstate__±
s




cC@s[|d|_|d|_|d|_d|_|d|_|d|_|d|_dS(NRLRR™R¤R£R¥(RLRR™Rt_bindRFRšRç(R tstate((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt__setstate__º
s


	

cC@s
|jdk	S(s:True if this MetaData is bound to an Engine or Connection.N(R§R(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytis_boundÃ
scC@s|jS(s	An :class:`.Engine` or :class:`.Connection` to which this
        :class:`.MetaData` is bound.

        Typically, a :class:`.Engine` is assigned to this attribute
        so that "implicit execution" may be used, or alternatively
        as a means of providing engine binding information to an
        ORM :class:`.Session` object::

            engine = create_engine("someurl://")
            metadata.bind = engine

        .. seealso::

           :ref:`dbengine_implicit` - background on "bound metadata"

        (R§(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRxÈ
sssqlalchemy.engine.urlcC@s>t|tj|jfƒr1tj|ƒ|_n	||_dS(s;Bind this MetaData to an Engine, Connection, string or URL.N(RRRÒtURLt
sqlalchemyt
create_engineR§(R turlRx((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt_bind_toÛ
scC@s.tj|jƒ|jjƒ|jjƒdS(s+Clear all Table objects from this MetaData.N(RŸtclearRLRšRç(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR°å
s
cC@s|j|j|jƒdS(s1Remove the given Table object from this MetaData.N(RURR(R R=((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR‚ì
scC@s%tjt|jjƒdd„ƒƒS(sàReturns a list of :class:`.Table` objects sorted in order of
        foreign key dependency.

        The sorting will place :class:`.Table` objects that have dependencies
        first, before the dependencies themselves, representing the
        order in which they can be created.   To get the order in which
        the tables would be dropped, use the ``reversed()`` Python built-in.

        .. warning::

            The :attr:`.sorted_tables` accessor cannot by itself accommodate
            automatic resolution of dependency cycles between tables, which
            are usually caused by mutually dependent foreign key constraints.
            To resolve these cycles, either the
            :paramref:`.ForeignKeyConstraint.use_alter` parameter may be appled
            to those constraints, or use the
            :func:`.schema.sort_tables_and_constraints` function which will break
            out foreign key constraints involved in cycles separately.

        .. seealso::

            :func:`.schema.sort_tables`

            :func:`.schema.sort_tables_and_constraints`

            :attr:`.MetaData.tables`

            :meth:`.Inspector.get_table_names`

            :meth:`.Inspector.get_sorted_table_and_fkc_names`


        RZcS@s|jS(N(RZ(R¢((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR{s(Rtsort_tablesR|RLRŽ(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt
sorted_tablesñ
s#cK@s‰|dkrt|ƒ}n|jƒ\}itd6|d6|d6|d6}	|	j|ƒ|dkrq|j}n|dk	rŠ||	d<ntj|jj	|d|ƒƒ}
|rÐ|
j|j
j||ƒƒn|dk	rtjg|
D]}d||f^qéƒ}n|
}t|j
ƒ}
|dkrigt|
|ƒD]$\}}|sZ||
kr<|^q<}nõtj|ƒrÄgt|
|ƒD]3\}}|s¦||
krˆ|||ƒrˆ|^qˆ}nšg|D]}||
krË|^qË}|r3|rÿd|pd	}tjd
|jj|dj|ƒfƒ‚ng|D]}|sR||
kr:|^q:}x|D]}t|||	qeWWdQXdS(
sL	Load all available table definitions from the database.

        Automatically creates ``Table`` entries in this ``MetaData`` for any
        table available in the database but not yet present in the
        ``MetaData``.  May be called multiple times to pick up tables recently
        added to the database, however no special action is taken if a table
        in this ``MetaData`` no longer exists in the database.

        :param bind:
          A :class:`.Connectable` used to access the database; if None, uses
          the existing bind on this ``MetaData``, if any.

        :param schema:
          Optional, query and reflect tables from an alterate schema.
          If None, the schema associated with this :class:`.MetaData`
          is used, if any.

        :param views:
          If True, also reflect views.

        :param only:
          Optional.  Load only a sub-set of available named tables.  May be
          specified as a sequence of names or a callable.

          If a sequence of names is provided, only those tables will be
          reflected.  An error is raised if a table is requested but not
          available.  Named tables already present in this ``MetaData`` are
          ignored.

          If a callable is provided, it will be used as a boolean predicate to
          filter the list of potential table names.  The callable is called
          with a table name and this ``MetaData`` instance as positional
          arguments and should return a true value for any table to reflect.

        :param extend_existing: Passed along to each :class:`.Table` as
          :paramref:`.Table.extend_existing`.

          .. versionadded:: 0.9.1

        :param autoload_replace: Passed along to each :class:`.Table` as
          :paramref:`.Table.autoload_replace`.

          .. versionadded:: 0.9.1

        :param \**dialect_kwargs: Additional keyword arguments not mentioned
         above are dialect specific, and passed in the form
         ``<dialectname>_<argname>``.  See the documentation regarding an
         individual dialect at :ref:`dialect_toplevel` for detail on
         documented arguments.

          .. versionadded:: 0.9.2 - Added
             :paramref:`.MetaData.reflect.**dialect_kwargs` to support
             dialect-level reflection options for all :class:`.Table`
             objects reflected.

        R^R]R?R_RR!s%s.%ss schema '%s'R¥sACould not reflect: requested table(s) not available in %s%s: (%s)s, N(RR	tconnectRmRIRRt
OrderedSettenginettable_namesRutget_view_namesReRLRR*RRNR®R”R<(R RxRtviewstonlyR?R_Rztconntreflect_optst	availableRtavailable_w_schematcurrenttschnametloadtmissingts((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRsT<


	&!%%
c@s6‡fd†}tj|d|jddƒ|ƒdS(s}Append a DDL event listener to this ``MetaData``.

        .. deprecated:: 0.7
            See :class:`.DDLEvents`.

        c@s$|d}ˆt||d|ƒdS(NRL(R(R¡R!RWRL(R£(sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR¤“s
R¥R¦R§N(RRnR¨(R R¢R£R¤((R£sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR©ŒscC@s>|dkrt|ƒ}n|jtj|d|d|ƒdS(syCreate all tables stored in this metadata.

        Conditional by default, will not attempt to recreate tables already
        present in the target database.

        :param bind:
          A :class:`.Connectable` used to access the
          database; if None, uses the existing bind on this ``MetaData``, if
          any.

        :param tables:
          Optional list of ``Table`` objects, which is a subset of the total
          tables in the ``MetaData`` (others are ignored).

        :param checkfirst:
          Defaults to True, don't issue CREATEs for tables already present
          in the target database.

        R°RLN(RR	R±RR²(R RxRLR°((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt
create_all™scC@s>|dkrt|ƒ}n|jtj|d|d|ƒdS(stDrop all tables stored in this metadata.

        Conditional by default, will not attempt to drop tables not present in
        the target database.

        :param bind:
          A :class:`.Connectable` used to access the
          database; if None, uses the existing bind on this ``MetaData``, if
          any.

        :param tables:
          Optional list of ``Table`` objects, which is a subset of the
          total tables in the ``MetaData`` (others are ignored).

        :param checkfirst:
          Defaults to True, only issue DROPs for tables confirmed to be
          present in the target database.

        R°RLN(RR	R±RR´(R RxRLR°((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pytdrop_all´sN(R5R6R7R8RRItDEFAULT_NAMING_CONVENTIONR\RLR.RmRQRUR¦R©RªRxRRGR¯R9R°R‚R²RmRR©RÃRÄ(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR—ës4	ƒ												%t	
tThreadLocalMetaDatacB@s_eZdZdZd„Zd„Zejdƒd„ƒZe	eeƒZd„Z
d„ZRS(sA MetaData variant that presents a different ``bind`` in every thread.

    Makes the ``bind`` property of the MetaData a thread-local value, allowing
    this collection of tables to be bound to different ``Engine``
    implementations or connections in each thread.

    The ThreadLocalMetaData starts off bound to None in each thread.  Binds
    must be made explicitly by assigning to the ``bind`` property or using
    ``connect()``.  You can also re-bind dynamically multiple times per
    thread, just like a regular ``MetaData``.

    RXcC@s2tjjƒ|_i|_tt|ƒjƒdS(s Construct a ThreadLocalMetaData.N(Rt	threadingtlocaltcontextt_ThreadLocalMetaData__enginesRdRÆR\(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR\às	cC@st|jddƒS(sêThe bound Engine or Connection for this thread.

        This property may be assigned an Engine or Connection, or assigned a
        string or URL to automatically create a basic Engine for this bind
        with ``create_engine()``.t_engineN(R—RÉR(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRxçsssqlalchemy.engine.urlcC@s¡t|tj|jfƒrry|j||j_Wqtk
rntj	|ƒ}||j|<||j_qXn+||jkr‘||j|<n||j_dS(s-Bind to a Connectable in the caller's thread.N(
RRRÒR«RÊRÉRËR‰R¬R­(R R®RxR•((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyR¯ðs

cC@s"t|jdƒo!|jjdk	S(s(True if there is a bind for this thread.RËN(RÓRÉRËR(R ((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRªscC@s:x3|jjƒD]"}t|dƒr|jƒqqWdS(s2Dispose all bound engines, in all thread contexts.tdisposeN(RÊRŽRÓRÌ(R R•((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRÌ	s(R5R6R7R8R\RxRRGR¯R9RªRÌ(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyRÆÐs				(@R7t
__future__RtinspectR¥RRRRtbaseRRRRR	R
R{RRR
RRRRRRRòRR›R¬RttypestsymbolR¸RGRt_self_inspectst	VisitableRR<RÇRîRBR!R%RÔRRÖRØRNRORTRURVRlRtR»RiR¾RÁR˜RÅR—RÆ(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/schema.pyt<module>sh"@			4ÿÿÿÿÿ8ÿÎ
!iá	2%O			X<Qî‹Â	
ÿæ