g 0 UdZddlmZddlmZddlZddlmZddlZddl Z ddl m Z ddl m Z ddl m Z dd l m Z dd l mZdd l mZdd l mZdd l mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddl#m$Z$ddl#m%Z%dd l#m&Z&dd!l#m'Z'dd"l#m(Z(dd#l#m)Z)dd$l#m*Z*dd%l#m+Z+dd&l#m,Z,dd'lm-Z-dd(l.m/Z/dd)l.m0Z0dd*l.m1Z1dd+l.m2Z2dd,l.m3Z3dd-l4m5Z5dd.l!m6Z6dd/l"m7Z7d0d1lm8Z8d0d2lm9Z9d0d3lm:Z:d0d4lm;Z;d0d5l;mZ>d0d7l=m?Z?d0d8l=m@Z@d0d9l=mAZAd0d:l=mBZBd0d;l=mCZCe j4r~ddlDmGZGdd?lDmHZHdd@lDmIZIddAl#mJZJddBl#mKZKddClLmMZMddDl.mNZNddEl.mOZOddFlPmQZQddGl!mRZRddHl"mSZSd0dIlTmUZUd0dJlTmVZVd0dKlWmXZXd0dLlWmYZYd0dMlWmZZZd0dNl[m\Z\d0dOl]m^Z^d0dPl_m`Z`edQdRSZaedTdUSZbedVdWSZcedXZdeeeee&fZfedYeee3e1e fZgegZhGdZd[eZieijZjd\ekd]<eijZld^ekd_<eijZmd`ekda<ddbZn ddcZoe:jGdddUe,e"jZrGdedfZsGdgdherZtGdidWe*ete5e:jdWZvGdjdke*ere0eaZw dddldm ddnZxGdodpe*erZyer ddqZz ddrZ{ ddsZ|n6ejdtZzejduZ{ejdvZ|Gdwdxe+erZ~Gdydze~eZGd{d|eZGd}d~eZedZGddeZGdde@ZGddeZGddZGddetee~Ze:jGddYe,ZGddeZGdde*eserZGddZGddeeZGddeZGddeZGddeZGddeZGdde*eeserZe eevgeefZeeeefZGddeBdZeeee effZe;j*ddiZdekd<GddetZGddeerZGddeeerZy)a/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. ) annotations)ABCN)Enum)Any)Callable)cast) Collection)Dict)Iterable)Iterator)List)Mapping)NoReturn)Optional)overload)Sequence)Set)Tuple) TYPE_CHECKING)TypeVar)Union) coercions)ddl)roles)type_api)visitors)_DefaultDescriptionTuple)_NoArg) _NoneName)_SentinelColumnCharacterization) _SentinelDefaultCharacterization)DedupeColumnCollection) DialectKWArgs) Executable)SchemaEventTarget)_document_text_coercion) ClauseElement) ColumnClause) ColumnElement) quoted_name) TextClause) TableClause) to_instance)ExternallyTraversible)event)exc) inspection)util) HasMemoized)Final)Literal)Protocol)Self) TypedDict) TypeGuard)_AutoIncrementType)_DDLColumnArgument) _InfoType)_TextCoercedExpressionArgument)_TypeEngineArgument) ColumnSet)ReadOnlyColumnCollection) DDLCompiler) BindParameter)KeyedColumnElement)Function) TypeEngine)anon_map) Connection)Engine)_CoreMultiExecuteParams)CoreExecuteOptionsParameter)ExecutionContext)MockConnection)_ReflectionInfo) FromClause_Tr)bound_SI SchemaItem_TABTable)rJrIrN FetchedValueceZdZdZ dZ dZy) SchemaConstrr0N)__name__ __module__ __qualname__ RETAIN_SCHEMA BLANK_SCHEMANULL_UNSPECIFIEDF/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/sql/schema.pyrYrYs%ML rbrYz)Final[Literal[SchemaConst.RETAIN_SCHEMA]]r^z(Final[Literal[SchemaConst.BLANK_SCHEMA]]r_z,Final[Literal[SchemaConst.NULL_UNSPECIFIED]]r`c||S|dz|zS)N.ra)nameschemas rc_get_table_keyrhs ~ |d""rbc|||S|| dfd }ttttj|i|S)Nct|tr?|jur1|jjvrj|jSyN) isinstanceColumntablekeyc)elementkwfixed_source_tablefixed_target_tables rcreplacez!_copy_expression..replacesG w ' !33 1333%'' 4 4rb)rqr/rrrreturnzOptional[ExternallyTraversible])rr*rrreplacement_traverse) expression source_table target_tablerursrts @@rc_copy_expressionr{sh |3%% & .1  (  c%%j"g> rbcZeZdZdZdZdZd dZd dZejd dZ d dZ dZ y )rTz3Base class for items that define a database schema. schema_itemdefaultc|D]}| |j}||fi|y#t$r}tjd||d}~wwxYw)z7Initialize the list of child items for this SchemaItem.NzH'SchemaItem' object, such as a 'Column' or a 'Constraint' expected, got )_set_parent_with_dispatchAttributeErrorr2 ArgumentError)selfargsrritemspwderrs rc _init_itemszSchemaItem._init_itemssjD%99D$$&++66:X?s " A AA c2tj|dgS)Ninfo) omit_kwargr4 generic_reprrs rc__repr__zSchemaItem.__repr__s  6(;;rbciS)aZInfo 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:`_schema.Table` and :class:`_schema.Column`. rars rcrzSchemaItem.infos  rbcd|jvr|jj|_|jj |j|S)Nr)__dict__rcopydispatch_update)rr}s rc_schema_item_copyzSchemaItem._schema_item_copys? T]] "#yy~~/K $$T]]3rbTN)rrTrrrrvNonervstr)rvr>)r}rSrvrS) r[r\r]__doc____visit_name__create_drop_stringify_dialectrrr4memoized_propertyrr_use_schema_maprarbrcrTrTs@="N$-! %<    Orbc>eZdZUdZdZded< d ddZy)HasConditionalDDLzdefine a class that includes the :meth:`.HasConditionalDDL.ddl_if` method, allowing for conditional rendering of DDL. Currently applies to constraints and indexes. .. versionadded:: 2.0 NzOptional[ddl.DDLIf]_ddl_ifc>tj||||_|S)aapply a conditional DDL rule to this schema item. These rules work in a similar manner to the :meth:`.ExecutableDDLElement.execute_if` callable, with the added feature that the criteria may be checked within the DDL compilation phase for a construct such as :class:`.CreateTable`. :meth:`.HasConditionalDDL.ddl_if` currently applies towards the :class:`.Index` construct as well as all :class:`.Constraint` constructs. :param dialect: string name of a dialect, or a tuple of string names to indicate multiple dialect types. :param callable\_: a callable that is constructed using the same form as that described in :paramref:`.ExecutableDDLElement.execute_if.callable_`. :param state: any arbitrary object that will be passed to the callable, if present. .. versionadded:: 2.0 .. seealso:: :ref:`schema_ddl_ddl_if` - background and usage examples )rDDLIfr)rdialect callable_states rcddl_ifzHasConditionalDDL.ddl_ifsDyy)U;  rb)NNN)r Optional[str]rzOptional[ddl.DDLIfCallable]r Optional[Any]rvr9)r[r\r]rr__annotations__rrarbrcrrsJ$(G '"&15# ##/# #  #rbrceZdZUdZded<y) HasSchemaAttrz1schema item that includes a top-level schema namerrgN)r[r\r]rrrarbrcrr7s ; rbrceZdZUdZdZer&ejd1dZejd2dZ de d<de d<d e d < d e d < er;ejd3d Z ej d3dZ ejd3dZ d4dZej sej dd5dZed5dZddddddddddddddddd d6fdZ d7 d8dZed9dZed:dZd;dZdd!Zej< d?d"Zed>d#Z ed@d$Z!d@d%Z"d@d&Z#dAd'Z$ dB dCd(Z%dDd)Z&dEd*Z'dBdFd+Z(dBdFd,Z)ejTd-d.e+ddf dGd/Z,e+ddf dGd0Z-xZ.S)HrVaRepresent a table in a database. e.g.:: mytable = Table( "mytable", metadata, Column("mytable_id", Integer, primary_key=True), Column("value", String(50)), ) The :class:`_schema.Table` object constructs a unique instance of itself based on its name and optional schema name within the given :class:`_schema.MetaData` object. Calling the :class:`_schema.Table` constructor with the same name and same :class:`_schema.MetaData` argument a second time will return the *same* :class:`_schema.Table` object - in this way the :class:`_schema.Table` constructor acts as a registry function. .. seealso:: :ref:`metadata_describing` - Introduction to database metadata rncyrkrars rc primary_keyzTable.primary_key^s7:rbcyrkrars rc foreign_keyszTable.foreign_keysas36rb#DedupeColumnCollection[Column[Any]]_columnsOptional[Column[Any]]_sentinel_columnSet[Constraint] constraintsz Set[Index]indexescyrkrars rccolumnsz Table.columnssILrbcyrkrars rcexported_columnszTable.exported_columnss:=rbcyrkrars rcrpzTable.csCFrbc@|jr|f|jzS|fSrk) _annotations_annotations_cache_key)rrH bindparamss rc_gen_cache_keyzTable._gen_cache_keys'   7T888 87Nrb)1.4z8Deprecated alias of :paramref:`_schema.Table.must_exist`) mustexistc&|j|i|Srk)_new)clsrrrs rc__new__z Table.__new__s388T(R( (rbc.|s|stj|S |d|d|dd}}}|j dd}| |j }n |t urd}|j dd}|j dd}|r|rd }tj||jd |jd d} t||} | |jvrM|s&|s$t|rtjd | d |j| } |r| j|i|| S| rtjd | dtj|} | jj!| ||j#|||  | j$||g|ddi|| jj'| || S#t$r tdwxYw#t($r?t+j,5|j/||dddYy#1swYYyxYwwxYw)Nrrr0zJTable() takes at least two positional-only arguments 'name' and 'metadata'rg keep_existingFextend_existingz9keep_existing and extend_existing are mutually exclusive. must_existrTable 'z' is already defined for this MetaData instance. Specify 'extend_existing=True' to redefine options and columns on an existing Table object.z ' not defined_no_init)objectr IndexError TypeErrorgetrgr_r2rpoprhtablesboolInvalidRequestError_init_existingrbefore_parent_attach _add_table__init__after_parent_attach Exceptionr4 safe_reraise _remove_table) rrrrrfmetadatargrrmsgrrorns rcrz Table._newsB>>#& & #'7DGT!"XD(D$' >__F | #F6 &&!2E: _MC##C( (VVL"&&e*DE T6* (// ! T$Z--cU#--OOC(E$$$d1b1L--uM.JKKNN3'E NN / /x @   fe 4 9tXKKuKK225(C U 2  V 9&&(**48)(( 9s5F4=6G 4G  H)H<HH HHNTF)rgquote quote_schema autoload_withautoload_replacerr resolve_fksinclude_columnsimplicit_returningcommentr listenersprefixes _extend_onrcP|ryt|t||||_||j|_n5|t urd|_n%|}t |tsJt|||_d|_t|_ t|_ tdj|t|_t|_|j!|jd|j |_n|j |_| |_|j'dd}| |_|||_|!|D]\}}t-j.||||r|ng|_|j2di|||j5||| ||| |j6|| xs|xs|idy) aq6Constructor for :class:`_schema.Table`. :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:`_schema.Table` within the owning :class:`_schema.MetaData` collection. Additional calls to :class:`_schema.Table` with the same name, metadata, and schema name will return the same :class:`_schema.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:`_schema.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:`.Connection` or :class:`.Engine`. :param \*args: Additional positional arguments are used primarily to add the list of :class:`_schema.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:`_schema.ForeignKeyConstraint`. :param autoload_replace: Defaults to ``True``; when using :paramref:`_schema.Table.autoload_with` in conjunction with :paramref:`_schema.Table.extend_existing`, indicates that :class:`_schema.Column` objects present in the already-existing :class:`_schema.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:`_schema.Column` objects specified programmatically within the call to :class:`_schema.Table` that also is autoloading; those :class:`_schema.Column` objects will always replace existing columns of the same name when :paramref:`_schema.Table.extend_existing` is ``True``. .. seealso:: :paramref:`_schema.Table.autoload_with` :paramref:`_schema.Table.extend_existing` :param autoload_with: An :class:`_engine.Engine` or :class:`_engine.Connection` object, or a :class:`_reflection.Inspector` object as returned by :func:`_sa.inspect` against one, with which this :class:`_schema.Table` object will be reflected. When set to a non-None value, the autoload process will take place for this table against the given engine or connection. .. seealso:: :ref:`metadata_reflection_toplevel` :meth:`_events.DDLEvents.column_reflect` :ref:`metadata_reflection_dbagnostic_types` :param extend_existing: When ``True``, indicates that if this :class:`_schema.Table` is already present in the given :class:`_schema.MetaData`, apply further arguments within the constructor to the existing :class:`_schema.Table`. If :paramref:`_schema.Table.extend_existing` or :paramref:`_schema.Table.keep_existing` are not set, and the given name of the new :class:`_schema.Table` refers to a :class:`_schema.Table` that is already present in the target :class:`_schema.MetaData` collection, and this :class:`_schema.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:`_schema.Table` is specified that matches an existing :class:`_schema.Table`, yet specifies additional constructs. :paramref:`_schema.Table.extend_existing` will also work in conjunction with :paramref:`_schema.Table.autoload_with` to run a new reflection operation against the database, even if a :class:`_schema.Table` of the same name is already present in the target :class:`_schema.MetaData`; newly reflected :class:`_schema.Column` objects and other options will be added into the state of the :class:`_schema.Table`, potentially overwriting existing columns and options of the same name. As is always the case with :paramref:`_schema.Table.autoload_with`, :class:`_schema.Column` objects can be specified in the same :class:`_schema.Table` constructor, which will take precedence. Below, the existing table ``mytable`` will be augmented with :class:`_schema.Column` objects both reflected from the database, as well as the given :class:`_schema.Column` named "y":: Table( "mytable", metadata, Column("y", Integer), extend_existing=True, autoload_with=engine, ) .. seealso:: :paramref:`_schema.Table.autoload_with` :paramref:`_schema.Table.autoload_replace` :paramref:`_schema.Table.keep_existing` :param implicit_returning: True by default - indicates that RETURNING can be used, typically by the ORM, in order to fetch server-generated values such as primary key values and server side defaults, on those backends which support RETURNING. In modern SQLAlchemy there is generally no reason to alter this setting, except for some backend specific cases (see :ref:`mssql_triggers` in the SQL Server dialect documentation for one such example). :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 resolve_fks: Whether or not to reflect :class:`_schema.Table` objects related to this one via :class:`_schema.ForeignKey` objects, when :paramref:`_schema.Table.autoload_with` is specified. Defaults to True. Set to False to disable reflection of related tables as :class:`_schema.ForeignKey` objects are encountered; may be used either to save on SQL calls or to avoid issues with related tables that can't be accessed. Note that if a related table is already present in the :class:`_schema.MetaData` collection, or becomes present later, a :class:`_schema.ForeignKey` object associated with this :class:`_schema.Table` will resolve to that table normally. .. versionadded:: 1.3 .. seealso:: :paramref:`.MetaData.reflect.resolve_fks` :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:`_schema.MetaData`, ignore further arguments within the constructor to the existing :class:`_schema.Table`, and return the :class:`_schema.Table` object as originally created. This is to allow a function that wishes to define a new :class:`_schema.Table` on first call, but on subsequent calls will return the same :class:`_schema.Table`, without any of the declarations (particularly constraints) being applied a second time. If :paramref:`_schema.Table.extend_existing` or :paramref:`_schema.Table.keep_existing` are not set, and the given name of the new :class:`_schema.Table` refers to a :class:`_schema.Table` that is already present in the target :class:`_schema.MetaData` collection, and this :class:`_schema.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:`_schema.Table` is specified that matches an existing :class:`_schema.Table`, yet specifies additional constructs. .. seealso:: :paramref:`_schema.Table.extend_existing` :param listeners: A list of tuples of the form ``(, )`` 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:`_schema.Table` before the "autoload" process begins. Historically this has been intended for use with the :meth:`.DDLEvents.column_reflect` event, however note that this event hook may now be associated with the :class:`_schema.MetaData` object directly:: def listen_for_reflect(table, column_info): "handle the column reflection event" # ... t = Table( "sometable", autoload_with=engine, listeners=[("column_reflect", listen_for_reflect)], ) .. seealso:: :meth:`_events.DDLEvents.column_reflect` :param must_exist: When ``True``, indicates that this Table must already be present in the given :class:`_schema.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. .. note:: setting this flag to ``False`` will not provide case-insensitive behavior for table reflection; table reflection will always search for a mixed-case name in a case sensitive fashion. Case insensitive names are specified in SQLAlchemy only by stating the name with all lower case characters. :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:`_schema.MetaData` of this :class:`_schema.Table` specifies its own :paramref:`_schema.MetaData.schema` parameter, then that schema name will be applied to this :class:`_schema.Table` if the schema parameter here is set to ``None``. To set a blank schema name on a :class:`_schema.Table` that would otherwise use the schema set on the owning :class:`_schema.MetaData`, specify the special symbol :attr:`.BLANK_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 comment: Optional string that will render an SQL comment on table creation. .. versionadded:: 1.2 Added the :paramref:`_schema.Table.comment` parameter to :class:`_schema.Table`. :param \**kw: Additional keyword arguments not mentioned above are dialect specific, and passed in the form ``_``. See the documentation regarding an individual dialect at :ref:`dialect_toplevel` for detail on documented arguments. NT)_implicit_generatedre _reflect_info)rrrallow_replacements all_namesra)superrr+rrgr_rlrrsetrrPrimaryKeyConstraintrr_extra_dependenciesrffullnamerrrrr1listen _prefixes _extra_kwargs _autoloadr)rrfrrgrrrrrrrrrrrrrrrrrrrevtfn __class__s rcrzTable.__init__sH   T512  >"//DK | #DK'Lfc* **%fl;DK $u 5 $ # #D )E/2u ;; "'+{{DII>DM IIDM"45   DI  $R T3+%&.2 R  $ NN%+'    .    rbc tj|}|j5} | j||||||dddy#1swYyxYw)Nrr)r3inspect_inspection_context reflect_table) rrrrexclude_columnsrrrinsp conn_insps rcrzTable._autoloadrsS!!-0  % % '9  # #%+ $ ( ' 's AAc2t|jdS)zTReturn the set of constraints as a list, sorted by creation order. c|jSrk)_creation_order)rps rcz+Table._sorted_constraints..s a6G6Grbro)sortedrrs rc_sorted_constraintszTable._sorted_constraintssd&&,GHHrbcl|jDchc]}|j |jc}Scc}w)a:class:`_schema.ForeignKeyConstraint` objects referred to by this :class:`_schema.Table`. This list is produced from the collection of :class:`_schema.ForeignKey` objects currently associated. .. seealso:: :attr:`_schema.Table.constraints` :attr:`_schema.Table.foreign_keys` :attr:`_schema.Table.indexes` )r constraint)rfkcs rcforeign_key_constraintszTable.foreign_key_constraintss=*(( (~~) NN(   s1c |jdd}|jd|du}|jdd}|jdd}|jdd}|jdd}|jdd } |jd d } | sJ| rJ|r5||jk7r&tjd |jd |d |jdd} | ;|jD],} | j | vs|j j| .|jdd} dD]}||vstjd|jd|j|_|jd|j|_ |jd|j|_ |rJ|s$|jD cgc]} | j }} nd}|j|j|| || |||jD cic]} | j | }} |jdi||j|d|dycc} wcc} w)NrautoloadrTrgrrrFrz,Can't change schema of existing table from 'z' to ''rr)rrz2Can't redefine 'quote' or 'quote_schema' argumentsrrrrarr)rrgr2rrprfrremoverrrrrrr)rrkwargsrrrrgrrrrrrprrorrs rcrzTable._init_existingsK ?D9 ::j-t*CD!::&8$?Hd+ZZ d3  ?D9 !**%6> ?E:    f +## VF816  !**%6=  &VV660MM((+jj5 ,Cf}''H-zz)T\\: "(** $"9"9# JJvtyy1  #4866":6a1666":"$ NN %+  )-/1QVVQY /$V$$49M#;0s I Ic &|j|yrk_validate_dialect_kwargsrrs rcrzTable._extra_kwargs %%f-rbcyrkrars rc_init_collectionszTable._init_collections rbcyrkrars rc_reset_exportedzTable._reset_exportedrrbc.|jjSrk)r_autoincrement_columnrs rcr!zTable._autoincrement_columns555rbcd}d}d}|j}||f}d}|j}|r ||ur|Jd}n |||f}d}tj}|r|d}|jrI|jj r!|rt jd|rd}d}d}nOtj}n=|jB|j6|jrt jd|dtj}n|j|jjrtj}nt|jrF|jj r|rt jd|rd}d}d}tj }na|jj"rKtj$}n:|j.|rt jd|dd tj&}|w|j(rk|J|j(D]3}|j$|js|jj"r3n&t+|j(}tj$}t-||||S) adetermine a candidate column (or columns, in case of a client generated composite primary key) which can be used as an "insert sentinel" for an INSERT statement. The returned structure, :class:`_SentinelColumnCharacterization`, includes all the details needed by :class:`.Dialect` and :class:`.SQLCompiler` to determine if these column(s) can be used as an INSERT..RETURNING sentinel for a particular database dialect. .. versionadded:: 2.0.10 FNTrzQCan't use IDENTITY default with negative increment as an explicit sentinel columnzColumn z has been marked as a sentinel column with no default generation function; it at least needs to be marked nullable=False assuming user-populated sentinel values will be used.zQCan't use SEQUENCE default with negative increment as an explicit sentinel columnzn can't be a sentinel column because it uses an explicit server side default that's not the Identity() default.)rr!r"UNKNOWNidentity_increment_is_negativer2rIDENTITYr~server_defaultnullableNONE is_sentinelSENTINEL_DEFAULTdefault_is_sequenceSEQUENCE is_callable CLIENTSIDE SERVERSIDErtupler!) rsentinel_is_explicitsentinel_is_autoinc the_sentinelexplicit_sentinel_col autoinc_coldefault_characterizationthe_sentinel_zero_pkcs rc _sentinel_column_characteristicsz&Table._sentinel_column_characteristicss$ %#@D !% 5 5 ,13L#' 00 $9[$H* **"&  " *{/F'>L"& #C#K#K  ,Q  ))$--DD+!55G /*.K27/'+ 9AA-"))1%44<$--11!"3!45GG599)#**6$,,888II-)):)B)BC(00GG/"%"9"9!K# 3.2 6; 3+/L9AA-'..::8CC-#11='11!,q/!23==5??)  D$4$4& &&((&&2LL)A)A ) %T%5%56 4??)/   $   rbc|jS)aReturns the :class:`.Column` object which currently represents the "auto increment" column, if any, else returns None. This is based on the rules for :class:`.Column` as defined by the :paramref:`.Column.autoincrement` parameter, which generally means the column within a single integer column primary key constraint that is not constrained by a foreign key. If the table does not have such a primary key constraint, then there's no "autoincrement" column. A :class:`.Table` may have only one column defined as the "autoincrement" column. .. versionadded:: 2.0.4 .. seealso:: :paramref:`.Column.autoincrement` )r!rs rcautoincrement_columnzTable.autoincrement_column|s()))rbcBt|j|jS)aReturn the 'key' for this :class:`_schema.Table`. This value is used as the dictionary key within the :attr:`_schema.MetaData.tables` collection. It is typically the same as that of :attr:`_schema.Table.name` for a table with no :attr:`_schema.Table.schema` set; otherwise it is typically of the form ``schemaname.tablename``. )rhrfrgrs rcroz Table.keysdii55rbc.ddjt|jgt|jgz|jDcgc] }t|c}zdDcgc]}|dtt ||c}zzScc}wcc}w)Nz Table(%s), rg=)joinreprrfrrgetattr)rxks rcrzTable.__repr__sTYY $))_ DMM"# $ $ - 1tAw - .?IIj!T'$"234jI J   .Is B !!B cBt|j|jSrk)rh descriptionrgrs rc__str__z Table.__str__sd.. < > >%T47 > ||  ,,  "%%e,,sH )rvr)rvSet[ForeignKey]rv*ReadOnlyColumnCollection[str, Column[Any]])rHrHrzList[BindParameter[Any]]rvzTuple[Any, ...])rrrrrrvr)*rfrrrXrrTrg7Optional[Union[str, Literal[SchemaConst.BLANK_SCHEMA]]]rOptional[bool]rrrz#Optional[Union[Engine, Connection]]rrrrrrrrrOptional[Collection[str]]rrrrrzOptional[Dict[Any, Any]]rz:Optional[_typing_Sequence[Tuple[str, Callable[..., Any]]]]rzOptional[_typing_Sequence[str]]rOptional[Set[Table]]rrrrrrvr)raTNN)rrXrUnion[Engine, Connection]rrrzCollection[str]rrrrrz_ReflectionInfo | Nonervr)rvzList[Constraint])rvzSet[ForeignKeyConstraint])rrrrrvrrrrvrrvrrvzOptional[Column[int]])rvr!rrnrVrvrF)rPzColumnClause[Any]rQrrvr)rzUnion[Index, Constraint]rvrrYr&rrrrvrrb_CreateDropBindr]rrvr) rrXrgz.Union[str, Literal[SchemaConst.RETAIN_SCHEMA]]rjz^Optional[Callable[[Table, Optional[str], ForeignKeyConstraint, Optional[str]], Optional[str]]]rfrrvrV)/r[r\r]rrrr4ro_non_memoized_propertyrrrrrrprtypingdeprecated_paramsr classmethodrrrpropertyr rrrrrr!ro_memoized_propertyr:r<rorrIrMrSrVrZrcrg deprecatedr^rlrk __classcell__rs@rcrVrV=s74N & &: ': & &6 '611++  6 & &L 'L & & = 7 = ' =  & &F 'F .F         )   )4949vKO $'+=A!%# % 59#'!%)- 48+/1I I I  I H I  I %I ;I I I I I 3I !I I '!I " #I (2)I ,)-I 01I 45I 6 7I ` ,. +/0413  )   ). *II  0@ND.   ""6#6 A (A A F*** 6 6 = ,CH''';?' 'R3*! P NT__  ,BO "  ?        :BO "`-`-?`- `-`- `-rbceZdZUdZdZdZded<ded< d,ddd ejejddddde jdd dddd dd d dd  d-fdZ ded<ded<ded< d ed < d ed< ded<ded<d.dZ e jd/dZe jd/dZej$d0dZd1dZd2dZd3d Zd4d!Zd2d"Z d5d#Zd6d$Zd6d%Zej8d&d'd7d(Zd7d)Zd8d*Z d9 d:d+Z xZ!S);rmz(Represents a column in a database table.rPTrrozOptional[FetchedValue]r'NautoF)rftype_ autoincrementr~insert_defaultdocrorrprr(onupdaterr'server_onupdatersystemrinsert_sentinel_omit_from_statements_proxiesrrrpc||gt|z}~|rRt|dtr)|tjd|j d}n|d|j d|rP|d}t |dr)|tjd|j d}n|d|j d| t||}n|tjdt|%||| | n||_ ||_ ||_ ||_ | x|_}|tur||_n| |_| |_| |_||_||_||_t-|_t-|_||_d|_d|_|||_n|j;|j<|t>j@ur|}n|t>j@ur|}nd}|:t|tBtDfs tC|}||_#|jI|nd|_#|`_) * PostgreSQL, SQL Server, Oracle Database - use RETURNING or an equivalent construct when rendering an INSERT statement, and then retrieving the newly generated primary key values after execution * PostgreSQL, Oracle Database for :class:`_schema.Table` objects that set :paramref:`_schema.Table.implicit_returning` to False - for a :class:`.Sequence` only, the :class:`.Sequence` is invoked explicitly before the INSERT statement takes place so that the newly generated primary key value is available to the client * SQL Server for :class:`_schema.Table` objects that set :paramref:`_schema.Table.implicit_returning` to False - the ``SELECT scope_identity()`` construct is used after the INSERT statement is invoked to retrieve the newly generated primary key value. * Third-party dialects - consult those dialects' documentation for details on their specific behaviors. * For multiple-row :func:`_sql.insert` constructs invoked with a list of parameters (i.e. "executemany" semantics), primary-key retrieving behaviors are generally disabled, however there may be special APIs that may be used to retrieve lists of new primary key values for an "executemany", such as the psycopg2 "fast insertmany" feature. Such features are very new and may not yet be well covered in documentation. :param default: A scalar, Python callable, or :class:`_expression.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:`_schema.Column.server_default` which creates a default generator on the database side. .. seealso:: :ref:`metadata_defaults_toplevel` :param insert_default: An alias of :paramref:`.Column.default` for compatibility with :func:`_orm.mapped_column`. .. versionadded: 2.0.31 :param doc: optional String that can be used by the ORM or similar to document attributes on the Python side. This attribute does **not** render SQL comments; use the :paramref:`_schema.Column.comment` parameter for this purpose. :param key: An optional string identifier which will identify this ``Column`` object on the :class:`_schema.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 a :class:`_schema.Index` construct will be automatically generated for this :class:`_schema.Column`, which will result in a "CREATE INDEX" statement being emitted for the :class:`_schema.Table` when the DDL create operation is invoked. Using this flag is equivalent to making use of the :class:`_schema.Index` construct explicitly at the level of the :class:`_schema.Table` construct itself:: Table( "some_table", metadata, Column("x", Integer), Index("ix_some_table_x", "x"), ) To add the :paramref:`_schema.Index.unique` flag to the :class:`_schema.Index`, set both the :paramref:`_schema.Column.unique` and :paramref:`_schema.Column.index` flags to True simultaneously, which will have the effect of rendering the "CREATE UNIQUE INDEX" DDL instruction instead of "CREATE INDEX". The name of the index is generated using the :ref:`default naming convention ` which for the :class:`_schema.Index` construct is of the form ``ix__``. As this flag is intended only as a convenience for the common case of adding a single-column, default configured index to a table definition, explicit use of the :class:`_schema.Index` construct should be preferred for most use cases, including composite indexes that encompass more than one column, indexes with SQL expressions or ordering, backend-specific index configuration options, and indexes that use a specific name. .. note:: the :attr:`_schema.Column.index` attribute on :class:`_schema.Column` **does not indicate** if this column is indexed or not, only if this flag was explicitly set here. To view indexes on a column, view the :attr:`_schema.Table.indexes` collection or use :meth:`_reflection.Inspector.get_indexes`. .. seealso:: :ref:`schema_indexes` :ref:`constraint_naming_conventions` :paramref:`_schema.Column.unique` :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:`_schema.Column.primary_key` is also ``True`` or the column specifies a :class:`_sql.Identity`, in which case it defaults to ``False``. This parameter is only used when issuing CREATE TABLE statements. .. note:: When the column specifies a :class:`_sql.Identity` this parameter is in general ignored by the DDL compiler. The PostgreSQL database allows nullable identity column by setting this parameter to ``True`` explicitly. :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 will 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:`_schema.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") will render: .. sourcecode:: sql 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()")) will render: .. sourcecode:: sql y DATETIME DEFAULT NOW() Strings and text() will be converted into a :class:`.DefaultClause` object upon initialization. This parameter can also accept complex combinations of contextually valid SQLAlchemy expressions or constructs:: from sqlalchemy import create_engine from sqlalchemy import Table, Column, MetaData, ARRAY, Text from sqlalchemy.dialects.postgresql import array engine = create_engine( "postgresql+psycopg2://scott:tiger@localhost/mydatabase" ) metadata_obj = MetaData() tbl = Table( "foo", metadata_obj, Column( "bar", ARRAY(Text), server_default=array(["biz", "bang", "bash"]) ), ) metadata_obj.create_all(engine) The above results in a table created with the following SQL: .. sourcecode:: sql CREATE TABLE foo ( bar TEXT[] DEFAULT ARRAY['biz', 'bang', 'bash'] ) 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. .. warning:: This directive **does not** currently produce MySQL's "ON UPDATE CURRENT_TIMESTAMP()" clause. See :ref:`mysql_timestamp_onupdate` for background on how to produce this clause. .. 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``, and the :paramref:`_schema.Column.index` parameter is left at its default value of ``False``, indicates that a :class:`_schema.UniqueConstraint` construct will be automatically generated for this :class:`_schema.Column`, which will result in a "UNIQUE CONSTRAINT" clause referring to this column being included in the ``CREATE TABLE`` statement emitted, when the DDL create operation for the :class:`_schema.Table` object is invoked. When this flag is ``True`` while the :paramref:`_schema.Column.index` parameter is simultaneously set to ``True``, the effect instead is that a :class:`_schema.Index` construct which includes the :paramref:`_schema.Index.unique` parameter set to ``True`` is generated. See the documentation for :paramref:`_schema.Column.index` for additional detail. Using this flag is equivalent to making use of the :class:`_schema.UniqueConstraint` construct explicitly at the level of the :class:`_schema.Table` construct itself:: Table("some_table", metadata, Column("x", Integer), UniqueConstraint("x")) The :paramref:`_schema.UniqueConstraint.name` parameter of the unique constraint object is left at its default value of ``None``; in the absence of a :ref:`naming convention ` for the enclosing :class:`_schema.MetaData`, the UNIQUE CONSTRAINT construct will be emitted as unnamed, which typically invokes a database-specific naming convention to take place. As this flag is intended only as a convenience for the common case of adding a single-column, default configured unique constraint to a table definition, explicit use of the :class:`_schema.UniqueConstraint` construct should be preferred for most use cases, including composite constraints that encompass more than one column, backend-specific index configuration options, and constraints that use a specific name. .. note:: the :attr:`_schema.Column.unique` attribute on :class:`_schema.Column` **does not indicate** if this column has a unique constraint or not, only if this flag was explicitly set here. To view indexes and unique constraints that may involve this column, view the :attr:`_schema.Table.indexes` and/or :attr:`_schema.Table.constraints` collections or use :meth:`_reflection.Inspector.get_indexes` and/or :meth:`_reflection.Inspector.get_unique_constraints` .. seealso:: :ref:`schema_unique_constraint` :ref:`constraint_naming_conventions` :paramref:`_schema.Column.index` :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`. :param comment: Optional string that will render an SQL comment on table creation. .. versionadded:: 1.2 Added the :paramref:`_schema.Column.comment` parameter to :class:`_schema.Column`. :param insert_sentinel: Marks this :class:`_schema.Column` as an :term:`insert sentinel` used for optimizing the performance of the :term:`insertmanyvalues` feature for tables that don't otherwise have qualifying primary key configurations. .. versionadded:: 2.0.10 .. seealso:: :func:`_schema.insert_sentinel` - all in one helper for declaring sentinel columns :ref:`engine_insertmanyvalues` :ref:`engine_insertmanyvalues_sentinel_columns` rNz0May not pass name positionally and as a keyword. _sqla_typez1May not pass type_ positionally and as a keyword.z9Explicit 'name' is required when sending 'quote' argumentT for_updateFra)3listrlrr2rrhasattrr+rrror_insert_sentinelr_user_defined_nullabler`r(rrprrrrrrrcomputedr$r _set_typetyperNO_ARG ColumnDefaultrr~rsrrW_as_for_update DefaultClauser'rrr_typing_SequencerTr4set_creation_orderrr)r_Column__name_pos_Column__type_posrfrrr~rrrorrprr(rrr'rrrrrrrrdialect_kwargsl_argscoltypeudnresolved_defaultrs rcrzColumn.__init__sEFj)DJ6  &)S)#++Jzz!}" 1 QiGw -$++K 1 " 1  tU+D  ##K  u%/3t& /%:",44#c & &DM +ODM    1>5E     $DM NN499 %  .-  FMM )& #   '.0IJ#01A#B +DL MM* +DL  h(AB(dC$DM MM( # DM  %.,7!/!>!>u!E n-!.~!> n-,  &/<8"1"@"@"F o."/## o..$/ ;VDE %  DI,^,rbrVrnrrrrzOptional[Computed]rzOptional[Identity]r$c^|jjs||jusJ||_t|jtr|jj ||jj j D]$}t|ts|j |&yrk)r_isnullrlr&r_variant_mappingvalues)rrimpls rcrzColumn._set_types~yy  ETYY$666 dii!2 3 II / / 5II..557D$ 12..t48rbc@tj|jSz1used by default.py -> _process_execute_defaults())r_from_column_defaultr~rs rc_default_description_tuplez!Column._default_description_tuples(<$***>*>>rbc &|j|yrkrrs rcrzColumn._extra_kwargsrrbc|jy|jH|jjr&|jjdz|jzS|jS|jS)Nz (no name)re)rfrnnamed_with_columnrHrs rcrIzColumn.__str__s^ 99  ZZ #zz++zz--3d6F6FFF'''## #rbc|jD]3}|jjj|js3yy)zOReturn True if this Column references the given column via foreign key.TF)rrP proxy_set intersectionrrPfks rc referenceszColumn.referencess:##Byy""//0@0@A$rbc&|j|yrkrU)rrs rcappend_foreign_keyzColumn.append_foreign_keys $$T*rbcg}|j|jk7r|jd|jr|jd|js|jd|j r|jd|j r|jd|jr|jd|jr|jddd jt|jgt|jgz|jDcgc]}|t|c}z|jDcgc] }t|c}z|jduxrd |jjzxsd gz|Dcgc]}|d tt!||c}zzScc}wcc}wcc}w) Nrorr(rr~r'rz Column(%s)r?z table=<%s>z table=NonerA)rorfrsrr(rr~r'rrBrCrrrrnrHrD)rkwargrErFs rcrzColumn.__repr__s 88tyy LL     LL '}} LL $ == LL $ << LL #    LL) * << LL #dii $))_ DII $ 1 1C 11Q]tAw 1C D!% 0 01 01tAw 01 2 JJd*>$tzz'='==$#  ?DDe!T'$"234eD E   D1Es!F= ) F= G !G c  | t tsJ|jstjd|j |j |j|_t|dd}|4| ur0tjd|j d|jdd}d}d}|j jvr8 j|j }|j |jk(rd}n%d}n"|j|vr||j}|h}d}|||ur|sDtjd |d |dk(r |j n |jd jd |jD][} jj| | j jvs7 jj| j]|rX|V|j |jk(r=tj d |j d|jd|j d jj#|||||j< |_|j&r<|j$j(tjd||j$_|j*r j*j-|nH|j j*vr0tjd|j d j.d|j0rkt|j0t2rtjd j5t7d|j t9|j:dna|j:rUt|j:t2rtjd j5t=|j d|j? fd|j@rJt|jBtDst|jFtDrtjdyy)NzfColumn must be constructed with a non-blank name or assign a non-blank .name before adding to a Table.rnzColumn object 'z' already assigned to Table 'rrfrozA column with z 'z' is already present in table ''.z Column with user-specified key "z-" is being replaced with plain named column "z", key "zs" is being removed. If this is a reflection operation, specify autoload_replace=False to prevent this replacement.) extra_removez2a Table may have only one explicit sentinel columnz'Trying to redefine primary-key column 'z(' as a non-primary-key column on table 'zThe 'index' keyword argument on Column is boolean only. To create indexes with a specific name, create an explicit Index object external to the Table.T)rprxzThe '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.)rxc&|jSrk)_set_remote_table)rrns rcr z$Column._set_parent..} sr/C/CE/Jrbz4An column cannot specify both Identity and Sequence.)$rlrVrfr2r_reset_memoizationsrorDrHrrOrrrrr4rrrurnrrr_replacerrrrVryrrpUniqueConstraint_setup_on_memoized_fksr$r~rr) rrYrrrrexistingr existing_col conflicts_onrrns @rcrZzColumn._set_parent s%'''yy##E    " 88 yyDH4$/  HE$9##!$((,&&.&:&:%;1>     88u~~ % >>$((3Lxx499$% $ YY) #$TYY/L(>L!L  #4')22(7(4(=DHH49988= |2 G'33B&&--b1}}(9(99))00? 4 L4TYY9N II2<3C3C2DE''+yyk2$(()*,,  t,?# $))  zz**6''H+/DJJ '       & &t , XX** *##9$((D449NN3C1F  ::$**c*''C  # #$((4 +<4  [[$++s+'':  # # =  ##$JK == t||X .$--2##F 3 rbcl|jj|jfdf|jj|jfdfg}|D]g\}}||jjjvs)|jjj|D]}|j |us||iy)NFT)rnrorfr _fk_memos link_to_name)rrfk_keysfk_keyrrs rcrzColumn._setup_on_memoized_fks sjjnndhh ' /jjnndii ($ / %, FL,,666**--77?B,62@%,rbcr|j|||jytj|d|y)Nr)rnr1r)rrs rc_on_table_attachzColumn._on_table_attach s+ :: ! tTZZ LL4b 9rbrz]The :meth:`_schema.Column.copy` method is deprecated and will be removed in a future release.c &|jdi|SNrartrrrs rcrz Column.copy  tzzBrbc |jDcgc]!}|jr|jdi|#c}|jDcgc]!}|jr|jdi|#c}z}i}|j D]>}|j |j }|jD]\}}|||dz|z<@|j} |j} t| ttfr%|j| jdi|dx} } |j} t| tr| j di|} |j"|id|j$d| d|j&d|j(d|j*d|j,d |j.d |j0d |j2d | d |j4d| d|j6d|j8d|j:d|j<|}|j>|_|j@|_ |jC|Scc}wcc}w)zCreate a copy of this ``Column``, uninitialized. This is used in :meth:`_schema.Table.to_metadata` and by the ORM. _Nrfrrorrprrrr~r'rrrrrrra)"rrwrtrrdialect_options _non_defaultsitemsr'rrlComputedIdentityrsrr&r _constructorrfrorrprrrr~rrrrrr(rr) rrrrpr column_kwargs dialect_namerdialect_option_keydialect_option_valuer'rrs rcrtz Column._copy sm$(#3#3" #3a1==GAGGMbM#3" $($5$5 J$5qQ\\WQWW]r]$5 J"K   00L"22<@NNO!&&("$)lS03EEF) 1,,.. nx&: ; KK,,,2r2 3/3 3N_  e. /EJJ$$E D  $%    ((  ;;  ;;  ** ,, LL * ]] ,  LL #'"<"#> %%a((y" JsH7H7H<H<c|jrd|_|jdk7r |jdk(r|j|_|jr|j|_|jr%|jj |j|j }|j s|j j rt|tr|j}||_t|tr|j||jjD]$}t|ts|j|&|jtur4|jtur"|j|_|j|_ |j 7|j +|j j#}|j%||j&rQ|j&E|j&}t|t(r"|j#}|j%|n||_|j*r9|j*-|j*}|j#}|j%||j,r7|j,+|j,j#}|j%||j.dvr|j.|j.|_|j0dvr|j0|j0|_|j2r|j2|j2|_|j4r|j4|j4|_|j6D]0}|j8r|j#} | j%|2|j:D]0} | j<r| j#} | j%|2y)zmerge the elements of another column into this one. this is used by ORM pep-593 merge and will likely need a lot of fixes. TrN)TF)rrrrupdaterrrlr&rrrrrr`r(r~rtrZr'rWrrrrprrrrwrr) rotherrr new_defaultnew_server_defaultnew_server_onupdate new_onupdater} new_constrnew_fks rc_mergez Column._merge s    $E     'E,?,?6,I"&"4"4E  ;;;;EL 99 JJ  dii ( }}!3!3%!23 EJ%!23//6..557d$5622598  ' '/? ?,,0@@!]]EN+/+F+FE ( << # (=,,,,.K  # #E *   5#7#7#?!%!4!4 ,l;%7%=%=%?""..u5'9$   E$9$9$A"&"6"6 "5";";"=   + +E 2 ==U^^3==..0L  $ $U + :: &5;;+>**EK ;;- 'ELL,@;;EL 88 )EI < BG G+ G&&G+NN)2rz@Optional[Union[str, _TypeEngineArgument[_T], SchemaEventTarget]]rz;Optional[Union[_TypeEngineArgument[_T], SchemaEventTarget]]rr&rfrr!Optional[_TypeEngineArgument[_T]]rr<r~rrrrrrorrrrprrOptional[_InfoType]r(z ?\ -@A\ -| L  !!    !   5##K$K ##L$L ??. $+ >{!{* { ! {  { {z : T__  3    D)LS*t#!$) QQQ3 Q  Q  Q"Q QQ &QrbrmT)r~omit_from_statementsc^t||tjn|||n t|dS)aProvides a surrogate :class:`_schema.Column` that will act as a dedicated insert :term:`sentinel` column, allowing efficient bulk inserts with deterministic RETURNING sorting for tables that don't otherwise have qualifying primary key configurations. Adding this column to a :class:`.Table` object requires that a corresponding database table actually has this column present, so if adding it to an existing model, existing database tables would need to be migrated (e.g. using ALTER TABLE or similar) to include this column. For background on how this object is used, see the section :ref:`engine_insertmanyvalues_sentinel_columns` as part of the section :ref:`engine_insertmanyvalues`. The :class:`_schema.Column` returned will be a nullable integer column by default and make use of a sentinel-specific default generator used only in "insertmanyvalues" operations. .. seealso:: :func:`_orm.orm_insert_sentinel` :paramref:`_schema.Column.insert_sentinel` :ref:`engine_insertmanyvalues` :ref:`engine_insertmanyvalues_sentinel_columns` .. versionadded:: 2.0.10 T)rfrr~rr)rmr INTEGERTYPE_InsertSentinelColumnDefault)rfrr~r#s rcrr s8N  &+mh""*G0L0N2 rbceZdZUdZdZded<ded< d# d$dZd%d Zejd d dd d&d Z dd d&dZ d' d(dZ e d)dZd*dZe e Zd+dZd,dZej&d-dZd.dZ d/dZd0dZej0d1dZedd d2dZedd d3dZdd d3dZd4dZd5d Zd6d!Zd7d"Zy)8raUDefines a dependency between two columns. ``ForeignKey`` is specified as an argument to a :class:`_schema.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:`_schema.ForeignKeyConstraint` object. This object will be generated automatically when a ``ForeignKey`` is associated with a :class:`_schema.Column` which in turn is associated with a :class:`_schema.Table`. Conversely, when :class:`_schema.ForeignKeyConstraint` is applied to a :class:`_schema.Table`, ``ForeignKey`` markers are automatically generated to be present on each associated :class:`_schema.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:`_schema.ForeignKeyConstraint` object must be used, and applied to the :class:`_schema.Table`. The associated ``ForeignKey`` objects are created automatically. The ``ForeignKey`` objects associated with an individual :class:`_schema.Column` object are available in the `foreign_keys` collection of that column. Further examples of foreign key configuration are in :ref:`metadata_foreignkeys`. foreign_keyrrYr _table_columnNc :tjtj||_| |_t |jtrd|_nl|j|_t |jjtdtfs,tjd|jjz||_d|_||_||_||_||_||_||_| |_| |_| |_| r| |_||_y)a Construct a column-level FOREIGN KEY. The :class:`_schema.ForeignKey` object when constructed generates a :class:`_schema.ForeignKeyConstraint` which is associated with the parent :class:`_schema.Table` object's collection of constraints. :param column: A single target column for the key relationship. A :class:`_schema.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. :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 when issuing DDL for this constraint. Typical values include CASCADE, DELETE and RESTRICT. :param ondelete: Optional string. If set, emit ON DELETE when issuing DDL for this constraint. Typical values include CASCADE, SET NULL 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 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:`_schema.ForeignKeyConstraint` to indicate the constraint should be generated/dropped externally from the CREATE TABLE/ DROP TABLE statement. See :paramref:`_schema.ForeignKeyConstraint.use_alter` for further description. .. seealso:: :paramref:`_schema.ForeignKeyConstraint.use_alter` :ref:`use_alter` :param match: Optional string. If set, emit MATCH 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. :param comment: Optional string that will render an SQL comment on foreign key constraint creation. .. versionadded:: 2.0 :param \**dialect_kw: Additional keyword arguments are dialect specific, and passed in the form ``_``. The arguments are ultimately handled by a corresponding :class:`_schema.ForeignKeyConstraint`. See the documentation regarding an individual dialect at :ref:`dialect_toplevel` for detail on documented arguments. Nz8ForeignKey received Column not bound to a Table, got: %r)rrrDDLReferredColumnRolerr rlrr)rnrr-r2rrrY use_alterrfrondelete deferrable initiallyrmatchrr_unvalidated_dialect_kw)rrPr r,rfrr-r.r/rr0rrr  dialect_kws rcrzForeignKey.__init__ sp"(()D)DfM * dmmS )!%D !%D ""((4:{*C''*,0,>,>,D,DE& "     $"(  DI'1$rbc(d|jzS)NzForeignKey(%r)) _get_colspecrs rcrzForeignKey.__repr__p s$"3"3"555rbrzaThe :meth:`_schema.ForeignKey.copy` method is deprecated and will be removed in a future release.r@c *|jdd|i|S)Nrgrar)rrgrrs rcrzForeignKey.copys s tzz..2..rbc 8t|j|f|j|j|j|j |j |j|j|j|jd |j}|j|S)aProduce a copy of this :class:`_schema.ForeignKey` object. The new :class:`_schema.ForeignKey` will not be bound to any :class:`_schema.Column`. This method is usually used by the internal copy procedures of :class:`_schema.Column`, :class:`_schema.Table`, and :class:`_schema.MetaData`. :param schema: The returned :class:`_schema.ForeignKey` will reference the original table and column name, qualified by the given string schema name. r@) r,rfrr-r.r/rr0r) rr4r,rfrr-r.r/rr0rr1r)rrgrrrs rcrtzForeignKey._copy{ s   V  ,  nn]]]]nn****LL  **  %%b))rbc4|dtfvr-|j\}}}||}|tur|d|S|d|d|S|r#|j\}}}|r |d|d|S|d|S|j|jj:|r"t j d|j|jjS|jjjd|jjSt|jtsJ|jS)zReturn a string based 'column specification' for this :class:`_schema.ForeignKey`. This is usually the equivalent of the string-based "tablename.colname" argument first passed to the object's constructor. NrezDCan't copy ForeignKey object which refers to non-table bound Column ) r^_column_tokensr_r)rnr2rrorrlrr)rrg table_name_is_copy_schematnamecolnames rcr4zForeignKey._get_colspec s+$ $ . .&*&9&9 #GUG%"%"'11%+UG<< %)%8%8 "FE7%+ZAA",g66    +!!''/112262D2D1GI  --111""((11""&&  dmmS1 11== rbc |jdSNr)r8rs rcrvzForeignKey._referred_schema s""1%%rbc|j7|jjy|jjjS|j\}}}t ||Srk)r)rnror8rh)rrgr<r=s rc _table_keyzForeignKey._table_key sZ    )!!''/))//333%)%8%8 "FE7!%0 0rbc<|j|jduS)zrReturn True if the given :class:`_schema.Table` is referenced by this :class:`_schema.ForeignKey`.N)corresponding_columnrPrLs rcrzForeignKey.references s ))$++6dBBrbcL|jj|jS)a-Return the :class:`_schema.Column` in the given :class:`_schema.Table` (or any :class:`.FromClause`) referenced by this :class:`_schema.ForeignKey`. Returns None if this :class:`_schema.ForeignKey` does not reference the given :class:`_schema.Table`. )rrCrPrLs rc get_referentzForeignKey.get_referent s}}11$++>>rbcX|jjd}|"tjd|jt |dk(r|j }d}n |j }|j }t |dkDrdj|}nd}|||fS)z7parse a string-based _colspec into its component parts.reNz*Invalid foreign key column specification: rr)r4splitr2rrlenrrB)rmr<r=rgs rcr8zForeignKey._column_tokens s     % %c * 9##k2299E ))00F!%0Hg--rbc d}|9|j}|J|j}|jj|d}nP|jr&|}|jD]}|j |k(s|}n|}|jj|d}|Lt jd|jd|j d|j d|d |j ||S)Nz3Could not initialize target column for ForeignKey 'z ' on table 'z ': table 'z' has no column named 'r) rYrorprrrfr2NoReferencedColumnErrorr)rrLrnr=_columnrYrorps rc_link_to_col_by_colstringz$ForeignKey._link_to_col_by_colstring7 s ?[[F% %%**Cggkk#t,G   CWW66W$GCggkk'40G ?--##'==/2(--./**%.set_typee s(yy~~%%!' &rbr)rYrrrrP)rrPrUs ` rc_set_target_columnzForeignKey._set_target_column[ sX{{&&& ;;   # #%{{DKK   - **84 rbc"|jS)zReturn the target :class:`_schema.Column` referenced by this :class:`_schema.ForeignKey`. If no target column has been established, an exception is raised. )rrs rcrPzForeignKey.columnm s##%%rb.r cyrkrarr s rcrzForeignKey._resolve_columny srbcyrkrarYs rcrzForeignKey._resolve_column~ !$rbTc ,t|jtr|j\}}}|js||j vr-|syt jd|jd|d|d||j|j vr|syt jd|d|j j|}|j|||St|jdr|jj}|S|j}|S)Nz$Foreign key associated with column 'z' could not find table 'z9' with which to generate a foreign key to target column 'rzTable z1 is no longer associated with its parent MetaData__clause_element__)rlrrrNr rr2NoReferencedTableErrorrYrorrrRrr])rr rLrMr=rnrQs rcrzForeignKey._resolve_column s+ dmmS )-1-E-E-G *K7!!X[5I5I%I00 }%&Z(55|j(j*|} |j-|||}|j/||j(j4|j7|yt9|j"dr,|j"j;}|j/|y|j"}|j/|y#t0j2$rYwxYw)N)r,rfrr-r.r/r0rr])rlrVrrur,rfrr-r.r/r0rr1_append_elementrrrKrrrNrrrRrVr2rPrrsrr])rrPrnrLrer=rrQs rcr`zForeignKey._set_table s%''' ?? "2 ..YY??..jj  .. DO OO + +FD 9 OO 5 5e < t$ dmmS ).2.F.F.H +KG)FK00777#,,33I>5"<<#UGG++G4  * *6 2 9 9$ ? T]]$8 9mm668G  # #G ,mmG  # #G ,22s G77H  H ) NFNNNNNFNNNF)rPr=r zOptional[ForeignKeyConstraint]r,rrf_ConstraintNameArgumentrrr-rr.rr/rrrr0rrrrrr rr2rr)rgrrrrrvr)NNF)rgzROptional[Union[str, Literal[SchemaConst.RETAIN_SCHEMA, SchemaConst.BLANK_SCHEMA]]]r9rr:rrvrrvr)rvr)rnrVrvr)rnrPrvr)rvz(Tuple[Optional[str], str, Optional[str]])rvz Tuple[Table, str, Optional[str]])rLrVrnrVr=rrvr)rPrrvr)rvr)r z Literal[True]rvr)r rrvrrrrrXrvrrPrrnrVrvr) r[r\r]rrrrrr4rrrtr4rrvrAtarget_fullnamerrErr8rNrRrVrrPrrrZrrfr`rarbrcrr sg'R#N (( 7;(,"&"&%)#'"#$(!%#}2"}24}2 }2 & }2  }2 }2#}2!}2}2}2"}2}2}2}2~6T__  3 /3/  /04*J $(/! /!"/!/! /!b&&1|,OC ? &&<&.P" ")."9F" "H$  & &+.( "%$$ $$ #'$$ $L 644,-rbrcyrkraobjs rcr,r, s!rbcyrkraros rcdefault_is_clause_elementrr 03rbcyrkraros rcdefault_is_scalarru rsrb is_sequenceis_clause_element is_scalarceZdZUdZdZdZdZdZdZdZ dZ dZ dZ dZ ded<d ddZddZdd Z dd Z dd Zy )DefaultGeneratorzBase class for column *default* values. This object is only present on column.default or column.onupdate. It's not valid as a server default. default_generatorTFrrPc||_yrkrrrs rcrzDefaultGenerator.__init__ $rbc trt|tsJ||_|jr||j_y||j_yrk)rrlrmrPrrr~ras rcrZzDefaultGenerator._set_parent s; ff- -- ??#'DKK "&DKK rbctrkNotImplementedErrorrs rcrtzDefaultGenerator._copy) !##rbcTtjdd|j|||S)NzoUsing the .execute() method to invoke a DefaultGenerator object is deprecated; please use the .scalar() method.z2.0)r4warn_deprecated_execute_on_scalarr connectiondistilled_paramsexecution_optionss rc_execute_on_connectionz'DefaultGenerator._execute_on_connection, s:  $   && (*;  rbc(|j|||Srk)_execute_defaultrs rcrz#DefaultGenerator._execute_on_scalar< s ** "$5  rbNrrrrvrr)rvrz)rrIrrKrrLrvr)r[r\r]rr_is_default_generatorrv is_identityis_server_defaultrwr.rxhas_argr*rrrZrtrrrarbrcrzrz s)N KKKIGK !!%'$  2 7     2 7   rbrzceZdZUdZded<e d d dZe d d dZed d dZ d ddZdd Zy)raA 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:`_schema.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)) rargcyrkrarrrs rcrzColumnDefault.__new__^ r[rbcyrkrars rcrzColumnDefault.__new__c s&)rbcyrkrars rcrzColumnDefault.__new__k sLOrbNct|trtjdt |rt }nt|t rt}n|t}tj|S)a{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:`_expression.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:`_engine.Connection` in use as well as the current statement and parameters. z4ColumnDefault may not be a server-side default type.) rlrWr2rcallableCallableColumnDefaultr(ColumnElementColumnDefaultScalarElementColumnDefaultrrrs rcrzColumnDefault.__new__n sZ: c< (##F c]'C ] +,C _,C~~c""rbcN|jjd|jdS)N())rr[rrs rcrzColumnDefault.__repr__ s$..))*!DHH>..dhhmmX->->???rbNr)rrrrrvr)rvrr) r[r\r]rrwrrrrtr4rpreload_modulerrarbrcrr sw G  !     T23@4@rbrceZdZddZy)_CallableColumnDefaultProtocolcyrkra)rcontexts rc__call__z'_CallableColumnDefaultProtocol.__call__ s#rbN)rrMrvr)r[r\r]rrarbrcrr s=rbrcReZdZUdZdZded<dZ d d dZd dZ d dZ y) rzQdefault generator for a callable Python function .. versionadded:: 2.0 Trrc>||_|j||_yrk)r_maybe_wrap_callablerrs rcrzCallableColumnDefault.__init__s %,,S1rbcDt|j|jSr)rrrrs rcrtzCallableColumnDefault._copys$dooNNrbcP tjd}|dduxrt |dxsd}t |d|z }|dk(rtjfdS|dk(rSt j d #t$rtjfdcYSwxYw) zWrap 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. T)no_selfcSrkractxrs rcr z. "$rbrZNrcSrkrars rcr z.&rrbrzDColumnDefault Python function takes zero or one positional arguments)r4get_callable_argspecr wrap_callablerHr2r)rrargspec defaulted positionalss ` rcrz*CallableColumnDefault._maybe_wrap_callables <//DAGAJd*>s71:C! '!*o 1 ! %%&6; ; A I##'  <%%&6; ;  "    $$   rbc@|jduxr|jdkSr?)rrs rcr%z&IdentityOptions._increment_is_negativees~~T)@dnnq.@@rb) NNNNNNNNN)r Optional[int]rrrrrrrrrrrrrrrrrvrr)r[r\r]rrrr%rarbrcrr1s $#'"&"&%)%) $# $''!' '  ' # '#'''' 'RAArbrceZdZUdZdZdZded<ded< d ddZejd dd Z dfd Z dd Z dd Z ddZdddZdddZddZxZS)racRepresents 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.Engine` or :class:`_engine.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", start=1), primary_key=True, ), ) When CREATE TABLE is emitted for the above :class:`_schema.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:: :ref:`defaults_sequences` :class:`.CreateSequence` :class:`.DropSequence` sequenceTrrPzOptional[TypeEngine[int]] data_typec tj||tj||||||||| |  d|_t |||_| |_| tur dx|_} n?|"| |jr|jx|_} nt j| ||_||_ t|| |_ |r|j|| t| |_yd|_y)aConstruct 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. .. versionchanged:: 2.0 The :paramref:`.Sequence.start` parameter is required in order to have DDL emit "START WITH". This is a reversal of a change made in version 1.4 which would implicitly render "START WITH 1" if the :paramref:`.Sequence.start` were not included. See :ref:`change_7211` for more detail. :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. :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. :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. :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. :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. :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:`_schema.MetaData` is also present are the same as that of :paramref:`_schema.Table.schema`. :param cache: optional integer value; number of future values in the sequence which are calculated in advance. Renders the CACHE keyword understood by Oracle Database and PostgreSQL. :param order: optional boolean value; if ``True``, renders the ORDER keyword, understood by Oracle Database, indicating the sequence is definitively ordered. May be necessary to provide deterministic ordering using Oracle RAC. :param data_type: The type to be returned by the sequence, for dialects that allow us to choose between INTEGER, BIGINT, etc. (e.g., mssql). .. versionadded:: 1.4.0 :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 :paramref:`_schema.Sequence.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:`_schema.MetaData` object which this :class:`.Sequence` will be associated with. A :class:`.Sequence` that is associated with a :class:`_schema.MetaData` gains the following capabilities: * The :class:`.Sequence` will inherit the :paramref:`_schema.MetaData.schema` parameter specified to the target :class:`_schema.MetaData`, which affects the production of CREATE / DROP DDL, if any. * The :meth:`.Sequence.create` and :meth:`.Sequence.drop` methods automatically use the engine bound to the :class:`_schema.MetaData` object, if any. * The :meth:`_schema.MetaData.create_all` and :meth:`_schema.MetaData.drop_all` methods will emit CREATE / DROP for this :class:`.Sequence`, even if the :class:`.Sequence` is not associated with any :class:`_schema.Table` / :class:`_schema.Column` that's a member of this :class:`_schema.MetaData`. The above behaviors can only occur if the :class:`.Sequence` is explicitly associated with the :class:`_schema.MetaData` via this parameter. .. seealso:: :ref:`sequence_metadata` - full discussion of the :paramref:`.Sequence.metadata` parameter. :param for_update: Indicates this :class:`.Sequence`, when associated with a :class:`_schema.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. rrN)rzrrrPr+rfoptionalr_rg constructrrh_key _set_metadatar.r)rrfrrrrrrrrgrrrrrrrrs rcrzSequence.__init__sn !!$:!>  !! !  e,   \ !#' 'DK&  !fn#+?? 2DK&%// EDK  "40    x (  (3DN!DNrbzsqlalchemy.sql.functionschtjjjj |S)zReturn a :class:`.next_value` function element which will render the appropriate increment function for this :class:`.Sequence` within any SQL expression. )r4r sql_functionsfunc next_valuers rcrzSequence.next_valueMs%~~++00;;DAArbc |}t|tsJt| ||j |j yrk)rlrmrrZrr`)rrYrrrPrs rcrZzSequence._set_parentVs7&&))) F#0rbcbt|j|j|j|j|j |j |j|j|j|j|j|j|j|j|jS)N)rfrrrrrrrrgrrrrrr)rrfrrrrrrrrgrrrrrrrs rcrtzSequence._copy\sx**nn]]]]**;;****nn]]]]  rbc:|j|jyrk)rr)rrPrns rcr`zSequence._set_tableos 5>>*rbcX||_||jj|j<yrk)r _sequencesr)rrs rcrzSequence._set_metadatars!  .2   +rbcH|jtj||y)z&Creates this sequence in the database.r\Nr^ras rcrczSequence.createvs c114JOrbcH|jtj||y)z&Drops this sequence from the database.r\Nreras rcrgz Sequence.drop{s c//*Mrbc\tjd|jjd)NzThis z 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.)r2rrr[rs rc_not_a_column_exprzSequence._not_a_column_exprs1%%DNN++,-# #  rb)NNNNNNNNNNNFNNNF)$rfrrrrrrrrrrrrrrrrgrrrrrrz"Optional[_TypeEngineArgument[int]]rrrrrzOptional[MetaData]rrrrrvr)rvz Function[int]r)rvrrlrk)Tr)rvr)r[r\r]rrrvrrr4rrrZrtr`rrcrgrrrs@rcrrjsh#J NK !!(( $#'"&"&%)%) $JN# $8< $'+'+ %t"t"t"! t"  t"  t"#t"#t"t"Ht"t"t"6t"t"t" %!t""%#t"$%t"& 't"lT34B5B1  &+3P N  rbrcbeZdZUdZdZdZdZdZdZde d<d ddZ ddZ ddZ dd Z dd Zdd Zy )rWaA 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` TFrrPc||_yrkrr}s rcrzFetchedValue.__init__r~rbcF||jk(r|S|j|Srk)r_cloner}s rcrzFetchedValue._as_for_updates"  (K;;z* *rbc,t|jSrk)rWrrs rcrtzFetchedValue._copysDOO,,rbc|jj|j}|jj|j|jj dd||_|S)NrP)rrrrrr)rrns rcrzFetchedValue._clonesN NN " "4>> 2 $--( x&! rbc |}t|tsJ||_|jr||j_y||j_yrk)rlrmrPrrr')rrYrrrPs rcrZzFetchedValue._set_parents=&&))) ??*.DKK ')-DKK &rbc,tj|Srkrrs rcrzFetchedValue.__repr__s  &&rbNrrrrrvrW)rvrW)rrrvr9rr)r[r\r]rr reflected has_argumentrwrrrrrtrrZrrarbrcrWrWsH&ILK !!%+ -.'rbcLeZdZdZdZ d dfd ZddZd dZxZS) ra>A 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:`_schema.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")) Tctj|tttfdt ||||_||_y)Nr) r4assert_arg_typerr(r,rrrr)rrr _reflectedrs rcrzDefaultClause.__init__s9 S3 z"BEJ $#rbcZt|j|j|jS)N)rrr)rrrrrs rcrtzDefaultClause._copys"T__  rbc<d|jd|jdS)NzDefaultClause(z , for_update=rrrs rcrzDefaultClause.__repr__s59XXtOOrb)FF)rz%Union[str, ClauseElement, TextClause]rrrrrvr)rvrr) r[r\r]rrrrtrrrs@rcrrsM*L ! $ 2 $ $ $  $ PrbrceZdZUdZdZded<ded< d ddZ dd Zedd Z dd Z e jd d ddZ ddZy) ConstraintarA table-level SQL constraint. :class:`_schema.Constraint` serves as the base class for the series of constraint objects that can be associated with :class:`_schema.Table` objects, including :class:`_schema.PrimaryKeyConstraint`, :class:`_schema.ForeignKeyConstraint` :class:`_schema.UniqueConstraint`, and :class:`_schema.CheckConstraint`. rintrrrxNc ||_||_||_|r||_||_||_t j||j|||_ y)aCreate 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 when issuing DDL for this constraint. :param info: Optional data dictionary which will be populated into the :attr:`.SchemaItem.info` attribute of this object. :param comment: Optional string that will render an SQL comment on foreign key constraint creation. .. versionadded:: 2.0 :param \**dialect_kw: Additional keyword arguments are dialect specific, and passed in the form ``_``. See the documentation regarding an individual dialect at :ref:`dialect_toplevel` for detail on documented arguments. :param _create_rule: used internally by some datatypes that also create constraints. :param _type_bound: used internally to indicate that this constraint is associated with a specific datatype. N) rfr.r/r _create_rulerwr4rrr) rrfr.r/rrr rwr2s rcrzConstraint.__init__sW\ $" DI(& % %%j1 rbc |j|j|sy|j4|jjtj||dfd|i|Sy)NFcompilerT)r r_should_executerCreateConstraint)rr rrs rc_should_create_for_compilerz&Constraint._should_create_for_compiler<sj    (1B1B81L \\ %/4<<//$$T*D$AIMO rbc t|jtr |jS t j d#t$rY wxYw)NzdThis constraint is not bound to a table. Did you mean to call table.append_constraint(constraint) ?)rlrYrVrr2rrs rcrnzConstraint.tableHsS $++u-{{".%% A     s%> A  A c xt|ttfsJ||_|jj |yrk)rlrVrmrYrrKras rcrZzConstraint._set_parentTs1&5&/222 t$rbrzaThe :meth:`_schema.Constraint.copy` method is deprecated and will be removed in a future release.c &|jdi|Srrrs rcrzConstraint.copyYrrbc trkrrs rcrtzConstraint._copyarrb)NNNNNNF)rfrir.rr/rrrrrr rrwrr2rrvr)r rCrrrrvrrvrVr)rrrrvr9)r[r\r]rrrrrrrnrZr4rrrtrarbrcrrs "N)-%)#'$(!%&*!7%7#7! 7 " 7  7$777 7r # +.       % T__  3    $rbrceZdZUdZded<dZded<er ddZddd d  dd Zddd Z e jdd Z e jddZ ddZddZy )ColumnCollectionMixinzA :class:`_expression.ColumnCollection` of :class:`_schema.Column` objects. This collection represents the columns which are referred to by this object. rrFz'List[Optional[Union[str, Column[Any]]]]_pending_colargsc yrkraras rcrz/ColumnCollectionMixin._set_parent_with_dispatchvsrbTN) _autoattachrx_gather_expressionsc||_t|_|}|f|rJg|_t j t j|D]3\}}}}|jj||j|5n7|D cgc]&} t jt j| (c} |_|r|jr|jyyycc} wrk) rxr#rrr expect_col_expression_collectionrDDLConstraintColumnRolersr _check_attach) rrrxrrprocessed_expressionsrr add_elementrPs rcrzColumnCollectionMixin.__init__zs).0    ! ,- ,,$&D ! ;;--w %%,,[9%,,T2 &%%F  !>!>G%%D ! 400    1; %s+Cc jDcgc]}t|ts|}}|Dcgc]}t|jts|!}}t |j | r^|rJdjDchc]}|| c}j |}|s'd fd } _ D]}|j|y|}|Dchc]}|j} }t| dk(r j| jyt| dkDr~jsq|dj} |ddDcgc]}|j| us|} }| r>djd| D} tjd| d| j d yyycc}wcc}wcc}wcc}wcc}w) Nz#Should not reach here on event callctt|tr'j|sjdyyy)NT)r)rlrVdiscardr)rPrn cols_wo_tablers rc _col_attachedz:ColumnCollectionMixin._check_attach.._col_attacheds;"%/%--f5, ..4.8 -0rbrrr?c3&K|] }d|z ywz'%s'Nra.0rps rc z6ColumnCollectionMixin._check_attach..s%A&Qfqj&sz Column(s) z are not part of table 'rrl)rrlrmrnrVr difference_cols_wo_tablerrHrr_allow_multiple_tablesrBr2rrH)rrrpcol_objs cols_w_tablehas_string_colsr%r|rrrnothers other_strr$s` @rcrz#ColumnCollectionMixin._check_attachs#44N4! 1f8MA4N#+J8az!''5/I8 JH 00>  AA A7  000aAM0j" #9'4#(C((7)#*+7a!''7+ v;!   * *6::< 8 [1_T%@%@AJ$$E!(EAu0DaFE II%A&%AA ''  ,..3.?.?-@D&A_IOJ*, Fs3F'F'F,F, F1F1F6 F;F;c6|jjSrkr as_readonlyrs rcrzColumnCollectionMixin.columns}}((**rbc6|jjSrkr4rs rcrpzColumnCollectionMixin.cr6rbc t|trO|jDcgc]}t|ts|}}t|t|jk(sJ|S |jDcgc]#}t|tr|j |n|%c}Scc}wcc}w#t $rP}tjd|jjd|jd|jdd|d}~wwxYw)Nz Can't create z on table 'z': no column named 'rz ' is present.) rlrmrrHrrpKeyErrorr2ConstraintColumnNotFoundErrorrr[rHr)rrYrpresultr|kes rc_col_expressionsz&ColumnCollectionMixin._col_expressionss ff %0030aJq&4I0 3v;#d&;&;"<< <<M  $444&0S%9FHHSMsB43 77#DNN$;$;#<=!!'!3!3 45 ggaj\8  s5BB!B$/(BB$B$$ C=-A C88C=c t|ttfsJ|j|D] }||jj |"yrk)rlrVrmr=rrK)rrYrrr|s rcrZz!ColumnCollectionMixin._set_parentsB&5&/222((0C !!#&1rbr) rr=rrrxrrz.Optional[List[Union[str, ColumnElement[Any]]]]rvrr)rrrvrr)rYzUnion[Table, Column[Any]]rvzList[Optional[Column[Any]]])r[r\r]rrr-rrrrr4rrrpr=rZrarbrcrres21"== + 36   !" '!$'!'! '!  '! '!R.` ++ ++/ $,'rbrceZdZUdZdddddddd ddZded< dd Zdd Zejd d dd  ddZ dd  ddZ ddZ ddZ ddZy)ColumnCollectionConstraintz-A constraint that proxies a ColumnCollection.NTF)rfr.r/rrrxrrcntj|f||||d| tj|g|||dy)al :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 when issuing DDL for this constraint. :param \**dialect_kw: other keyword arguments including dialect-specific arguments are propagated to the :class:`.Constraint` superclass. rfr.r/r)rrxN)rrr) rrfr.r/rrrxrrr2s rcrz#ColumnCollectionConstraint.__init__sV@   !     &&   (3, rbrc t|ttfsJtj ||t j ||yrk)rlrmrVrrZrras rcrZz&ColumnCollectionConstraint._set_parent.s6&65/222tV,))$7rbc||jvSrk)r)rrEs rc __contains__z'ColumnCollectionConstraint.__contains__3sDMM!!rbrzqThe :meth:`_schema.ColumnCollectionConstraint.copy` method is deprecated and will be removed in a future release.rzc *|jdd|i|SNrzrarrrzrrs rcrzColumnCollectionConstraint.copy6stzz:|:r::rbc i}|jD]>}|j|j}|jD]\}}|||dz|z<@t|jt sJ|j |jDcgc]}t||j|c}|j|j|j|jd|} |j| Scc}w)Nr)rfr.r/r)rrrrlrYrVrrr{rfr.r/rr) rrzrrconstraint_kwargsrrrrrrps rcrtz ColumnCollectionConstraint._copyCs 00L"22<@NNO!&&("$)","47I"IJ) 1$++u--- DNN !MM)D!t{{LA)nn LL   %%a((sC)c8|jj|S)zReturn True if this constraint contains the given column. Note that this object also contains an attribute ``.columns`` which is a :class:`_expression.ColumnCollection` of :class:`_schema.Column` objects. )rcontains_columnrr|s rcrMz*ColumnCollectionConstraint.contains_columncs}},,S11rbc,t|jSrk)iterrrs rc__iter__z#ColumnCollectionConstraint.__iter__nsDMM""rbc,t|jSrk)rHrrs rc__len__z"ColumnCollectionConstraint.__len__qs4==!!rb)rr=rfrir.rr/rrrrrrxrrz"Optional[List[_DDLColumnArgument]]r2rrvrr)rErrvr)rzOptional[Table]rrrrvr@)r|rrvr)rvzIterator[Column[Any]])rvr)r[r\r]rrrrZrEr4rrrtrMrQrSrarbrcr@r@s7 )-%)#'$( "BF* $* &* # * ! * " * * * @* *  * X87 8 "T__  A)-;&; ; $ ;  ;)-)&) ) $ )@ 2#"rbr@ceZdZdZdZdZeddd d dfd Zedd Z e jd d dd  dd Z dd  ddZ xZS)CheckConstraintzlA table- or column-level CHECK constraint. Can be included in the definition of a Table or Column. T table_or_column_check_constraintsqltextz:class:`.CheckConstraint`z$:paramref:`.CheckConstraint.sqltext`Nc  tjtj||_g} t j |jid| jit |$| |||||| |d| ||j|yy)aConstruct 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 :func:`_expression.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 when issuing DDL for this constraint. :param info: Optional data dictionary which will be populated into the :attr:`.SchemaItem.info` attribute of this object. rP)rfr.r/r rrwrN) rrrDDLExpressionRolerXrtraversersrrr) rrXrfr.r/rnrr rrwr2rrs rcrzCheckConstraint.__init__sZ!''(?(?I %'$,,Xw~~,FG !%##      * *5 1 rbc8t|jt Srk)rlrYrVrs rcis_column_levelzCheckConstraint.is_column_levelsdkk5111rbrzfThe :meth:`_schema.CheckConstraint.copy` method is deprecated and will be removed in a future release.rFc *|jdd|i|SrHrrIs rcrzCheckConstraint.copytzz:|:r::rbc $|"t|j|j|}n |j}t||j|j |j |j||jd|j }|j|S)NF)rfr/r.r rnrrrw) r{rXrnrVrfr/r.r rrwr)rrzrrrXrps rcrtzCheckConstraint._copys  #'t||TZZNGllG  nn**LL(( %%a((rb)NNNNNNTF)rXz#_TextCoercedExpressionArgument[Any]rfrir.rr/rrnrTrrr rrrrwrr2rrvrr)rzrTrrrrvrV)r[r\r]rr-rr'rrr]r4rrrtrrs@rcrVrVus6 "7N#.)-%)#'!%$(&* !82482&82# 82 ! 82  82"82$82828282 82  82t22T__  3 26;.;=@; ;  ; 26).)=@) )rbrVcbeZdZUdZdZ d ddZddZded< ded < edd Z edd Z edd Z dd Z eddZ eddZddZej"ddddd d dZddd d dZy)!ruaA 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:`_schema.ForeignKey` to the definition of a :class:`_schema.Column` is a shorthand equivalent for an unnamed, single column :class:`_schema.ForeignKeyConstraint`. Examples of foreign key configuration are in :ref:`metadata_foreignkeys`. foreign_key_constraintNrc tj|f|||| | d|||_||_| |_||_| |_tt|t|k7rJtt|t|k7rtjdtjd|Dcgc]r}t|f||j|j|j|j |j|j |j|jd |jtc}|_t#j|g|| .t%|dr| |j&usJ|j)| yycc}w)a 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 when issuing DDL for this constraint. Typical values include CASCADE, DELETE and RESTRICT. :param ondelete: Optional string. If set, emit ON DELETE when issuing DDL for this constraint. Typical values include CASCADE, SET NULL 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 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:`_schema.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:`_schema.MetaData.create_all` and :meth:`_schema.MetaData.drop_all` methods will perform this resolution automatically, so the flag is normally not needed. .. seealso:: :ref:`use_alter` :param match: Optional string. If set, emit MATCH 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. :param comment: Optional string that will render an SQL comment on foreign key constraint creation. .. versionadded:: 2.0 :param \**dialect_kw: Additional keyword arguments are dialect specific, and passed in the form ``_``. See the documentation regarding an individual dialect at :ref:`dialect_toplevel` for detail on documented arguments. )rfr.r/rrzOForeignKeyConstraint with duplicate source column references are not supported.z_ForeignKeyConstraint number of constrained columns must match the number of referenced columns.) r rfrr-r,rr0r.r/NrY)rrrr-rr,r0rHrr2rrrfr.r/relementsrrrYr)rr refcolumnsrfrr-r.r/r,rr0rnrrr2refcols rcrzForeignKeyConstraint.__init__sh   !   !   (" s7| J /3w< CL0''4''*0% %   YY..!..jj??.. %% %  " &&t6g6  tX& +++  * *5 1 % s.A7E4cp|jj||jj|yrk)rrKrdrsrs rcrhz$ForeignKeyConstraint._append_elements& &! R rbrzList[ForeignKey]rdchtjt|j|jSrk)r4 OrderedDictzip column_keysrdrs rc _elementszForeignKeyConstraint._elementss&D$4$4dmm DEErbc@|jD]}|jcSyrk)rdrv)relems rcrvz%ForeignKeyConstraint._referred_schemas!MMD(( ("rbcH|jdjjS)aKThe :class:`_schema.Table` object to which this :class:`_schema.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. r)rdrPrnrs rcreferred_tablez#ForeignKeyConstraint.referred_tables}}Q&&,,,rbc |jDchc]}|j}}d|vrUt|dkDrFt|dd\}}t j d|j d|jd|d|yycc}w)Nrrr0zForeignKeyConstraint on rz$) refers to multiple remote tables:  and )rdrArHr r2rr_col_description)rrnrn table_keyselem0elem1s rcrcz)ForeignKeyConstraint._validate_dest_tables48MMBMDdoo'M B z !c*o&9!*-a2LE5##*>>"!D$9$9#:;++0'ug? ': !CsBct|dr|jjS|jDcgc])}t |t r |j n t|+c}Scc}w)aReturn a list of string keys representing the local columns in this :class:`_schema.ForeignKeyConstraint`. This list is either the original string arguments sent to the constructor of the :class:`_schema.ForeignKeyConstraint`, or if the constraint has been initialized with :class:`_schema.Column` objects, is the string ``.key`` of each element. rY)rrkeysrrlr*rorrNs rcrkz ForeignKeyConstraint.column_keyssd 4 "==%%' ' 000C&c=9s3xG0 s.A&c8dj|jS)Nr?)rBrkrs rcrsz%ForeignKeyConstraint._col_descriptionsyy))**rbc N|}t|tsJtj||tj||t |j |jD]1\}}t|dr|j|us!|j|3|j|y)NrY) rlrVrrZr@rjrrdrrYrrc)rrYrrrnr|rs rcrZz ForeignKeyConstraint._set_parents%'''tU+"..tU;4==$--8GC2x(BIIS,@,,S19 !!%(rbrzkThe :meth:`_schema.ForeignKeyConstraint.copy` method is deprecated and will be removed in a future release.roc ,|jd||d|S)Nrorar)rrgrzrrs rcrzForeignKeyConstraint.copystzzIlIbIIrbc t|jDcgc]}|jjc}|jDcgc]U}|j ||=|j |jj jk(r |jnddWc}|j|j|j|j|j|j|j|j|j }t!|j|jD]\}}|j#||j#|Scc}wcc}w)NT)rgr9r:) rfrr-r,r.r/rr0r)rurdrYror4rArnrfrr-r,r.r/rr0rrjr)rrgrzrrrErself_fkother_fks rcrtzForeignKeyConstraint._copys&##'== 1=aQXX\\= 1 'A!(3LLNahhnn.@.@@%))"! ' ]]]]nnnn****LL/ 2"%T]]CLL!A GX  % %h /"B%%c**5 2 s EAE ) NNNNNFFNNNN)r$_typing_Sequence[_DDLColumnArgument]rerrfrirrr-rr.rr/rr,rrrr0rrnrTrrrrr2rrvr)rPrrrrvr)rvz!util.OrderedDict[str, ForeignKey]rjrr)rvz_typing_Sequence[str]rr)rgrrzrTrrrrvru)r[r\r]rrrrhrrrlrvrprcrkrsrZr4rrrtrarbrcrurus .N )-"&"&%)#'"#!%$(!%M25M29M2& M2  M2  M2#M2!M2M2M2M2M2"M2M2M2 !M2^!87 FF  - -$++ )T__  3!%(, JJ& J  J  J  J!%(, "+"+& "+  "+  "+rbruceZdZdZdZdddddd d fdZd fd ZddZdd Ze dd Z e jdd Z xZS)ra7 A table-level PRIMARY KEY constraint. The :class:`.PrimaryKeyConstraint` object is present automatically on any :class:`_schema.Table` object; it is assigned a set of :class:`_schema.Column` objects corresponding to those marked with the :paramref:`_schema.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=, primary_key=True, nullable=False), Column('version_id', Integer(), table=, primary_key=True, nullable=False) ) The primary key of a :class:`_schema.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. 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:`_schema.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), ) primary_key_constraintNF)rfr.r/rrc<||_t||||||d|y)NrB)rrr) rrfr.r/rrrr2rs rcrzPrimaryKeyConstraint.__init__Ss3$7   !    rbc  |}t|tsJt| ||j|urG|j j |j||_|j j||jDcgc]}|js|}}|jr|rt|t|jk7rkdjd|D}djd|jD}tjd|jd|d|d|d g|dd|jD]#}d |_|jt usd |_%|r|jj%|yycc}w) Nr?c3:K|]}d|jzywr'rfr(s rcr*z3PrimaryKeyConstraint._set_parent..xs$HiVaff_ic3:K|]}d|jzywr'rr(s rcr*z3PrimaryKeyConstraint._set_parent..ysGArrz' specifies columns z= as primary_key=True, not matching locally specified columns z-; setting the current primary key columns to z:. This warning may become an exception in a future releaseTF)rlrVrrZrrr#rKrprrrBr4rrrfrr`r(extend) rrYrrrnrp table_pks table_pk_strcol_strrs rcrZz PrimaryKeyConstraint._set_parentgsk%''' E"   D (    % %e&7&7 8 $E     ! !$ ' %911==Q 9 MMI#dmm"44 99$Hi$HHLiiGGGG II%**%9.!::AC2)> ? IaLA AM''+;;"   MM  + 7:s F F c|D] }d|_ |jj|tjj ||j |jy)aKrepopulate 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:`_schema.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. TN)rrrrr!_resetrrn)rrr|s rc_reloadzPrimaryKeyConstraint._reloadsO*C"CO W%2299$? &&tzz2rbctjj||jj ||j j ||yrk)rr!rrrur'_sa_event_column_added_to_pk_constraintrNs rcrzPrimaryKeyConstraint._replaces<2299$? c" ==dCHrbc|j}|#|g|jDcgc] }||us| c}zSt|jScc}wrk)r!rr)rautoincrps rccolumns_autoinc_firstz*PrimaryKeyConstraint.columns_autoinc_firstsO,,  94==M=aAW._validate_autoincsxx&&.j''((77((777 ++&sxxj SEB=> !s{{T$Z,BC$""."3#5#5x@$!!c&7&7@'rbrrT)rrFz=Only one Column may be marked autoincrement=True, found both rrre)r|rrrrvr)rHrrrr2rrf)rrr|rs rcr!z*PrimaryKeyConstraint._autoincrement_columns B t}}  "t}}%a(C  D(!#t, ""'$C/ G}}$$,%c40*!//>"xxjgll^1> #&%Nrb)rr=rfrr.rr/rrrrrr2rrvrr)rzIterable[Column[Any]]rvr)r|rrvr)rvzList[Column[Any]]r)r[r\r]rrrrZrrrrr4rr!rrs@rcrrs=~.N #%)#'$($) $  #  !  "  "    (&,P3:I '' >>rbrceZdZdZdZy)raA 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. unique_constraintN)r[r\r]rrrarbrcrrs)NrbrceZdZUdZdZded<ded<ded<d d d d d d  dd Zdd ZdddZdddZ ddZ y )ryaA 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:`_schema.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:`_schema.Column` objects:: Index("some_index", func.lower(sometable.c.name)) An :class:`.Index` can also be manually associated with a :class:`_schema.Table`, either through inline declaration or using :meth:`_schema.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:`_expression.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)")), ) .. 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. rrTrnz0_typing_Sequence[Union[str, ColumnElement[Any]]] expressionsz$_typing_Sequence[ColumnElement[Any]]rzFN)rprrrqrxcdx|_} tj|||_||_|||_||} |j |g|_tj|g|||jd| |j| yy)avConstruct 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:`_schema.Column`, but may also be arbitrary SQL expressions which ultimately refer to a :class:`_schema.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:`_schema.Column.quote`. :param info=None: Optional data dictionary which will be populated into the :attr:`.SchemaItem.info` attribute of this object. :param \**dialect_kw: Additional keyword arguments not mentioned above are dialect specific, and passed in the form ``_``. See the documentation regarding an individual dialect at :ref:`dialect_toplevel` for detail on documented arguments. N)rxr) rnr+rrfrprrrrrrZ) rrfrprrrqrxrr2rns rcrzIndex.__init__]sP"! U))$6   DI  E %%j1 &&   & $ 0 0      U # rbc |}t|tsJtj|||jU||jurGt j d|jd|jjd|jd||_|jj||j}|j|}t|t|k(sJg}t||D]<\}}t|tr|j!|(||j!|MD'$ . T"$ W%u ?T6*   e,  MM  f % rbcRt||}tj|j|d}|"|jD]}|j ||j rE|jjDchc]}|j|jc}|_yycc}wrk) rhdictrrrrfrrrg)rrfrgroremovedrts rcrzMetaData._remove_tablesT6*((4;;T2  **((.+ =="&++"4"4"6"6Q!((:N"6DM s :B$ B$c|j|j|j|j|j|j dS)N)rrgschemas sequencesfk_memosr)rrgrrrrrs rc __getstate__zMetaData.__getstate__s8kkkk}}!%!7!7   rbc||d|_|d|_|d|_|d|_|d|_|d|_y)Nrrgrrrr)rrgrrrr)rrs rc __setstate__zMetaData.__setstate__sJHo Ho !&':!; ,i( z*rbctj|j|jj|jjy)z+Clear all Table objects from this MetaData.N)rclearrrrrs rcrzMetaData.clears4 4;;  rbcP|j|j|jy)z1Remove the given Table object from this MetaData.N)rrfrgrLs rcrzMetaData.removes 5::u||4rbcttjt|jj dS)aReturns a list of :class:`_schema.Table` objects sorted in order of foreign key dependency. The sorting will place :class:`_schema.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:`.MetaData.sorted_tables` attribute cannot by itself accommodate automatic resolution of dependency cycles between tables, which are usually caused by mutually dependent foreign key constraints. When these cycles are detected, the foreign keys of these tables are omitted from consideration in the sort. A warning is emitted when this condition occurs, which will be an exception raise in a future release. Tables which are not part of the cycle will still be returned in dependency order. To resolve these cycles, the :paramref:`_schema.ForeignKeyConstraint.use_alter` parameter may be applied to those constraints which create a cycle. Alternatively, the :func:`_schema.sort_tables_and_constraints` function will automatically return foreign key constraints in a separate collection when cycles are detected so that they may be applied to a schema separately. .. versionchanged:: 1.3.17 - a warning is emitted when :attr:`.MetaData.sorted_tables` cannot perform a proper sort due to cyclical dependencies. This will be an exception in a future release. Additionally, the sort will continue to return other tables not involved in the cycle in dependency order which was not the case previously. .. seealso:: :func:`_schema.sort_tables` :func:`_schema.sort_tables_and_constraints` :attr:`_schema.MetaData.tables` :meth:`_reflection.Inspector.get_table_names` :meth:`_reflection.Inspector.get_sorted_table_and_fkc_names` c|jSrkr )rs rcr z(MetaData.sorted_tables.."squurbr )r sort_tablesr rrrs rc sorted_tableszMetaData.sorted_tabless-f 4;;%%'_ =  rbc yrkra rrbrgviewsonlyrrrrs rcreflectzMetaData.reflect'rbc yrkrars rcrzMetaData.reflect6rrbzsqlalchemy.engine.reflectionc tj|j5} | |||td} | j || |j }||| d<t jjjj} t j| j|} |rot jjjj} | j | j| | j | j||)t j| D cgc] } |d|  c} }n| }t|j"}|%t%| |D cgc] \} }|s||vr| }} }nt'|r.t%| |D cgc]\} }|s||vr || |r| }} }nq|D cgc] } | | vs|  }} |rF|xrd|zxsd}dj)|}t+j,d|j.|d |d |D cgc] } |s| |vr|  }} | j0d||| | t jjj2jd |}|| d <|D]} t5| |fi|  dddy#t $rYwxYwcc} wcc}} wcc}} wcc} wcc} w#t*j6$r%}t j8d | d|Yd}~{d}~wwxYw#1swYyxYw)a.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:`.Connection` or :class:`.Engine` used to access the database. :param schema: Optional, query and reflect tables from an alternate schema. If None, the schema associated with this :class:`_schema.MetaData` is used, if any. :param views: If True, also reflect views (materialized and plain). :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:`_schema.Table` as :paramref:`_schema.Table.extend_existing`. :param autoload_replace: Passed along to each :class:`_schema.Table` as :paramref:`_schema.Table.autoload_replace`. :param resolve_fks: if True, reflect :class:`_schema.Table` objects linked to :class:`_schema.ForeignKey` objects located in each :class:`_schema.Table`. For :meth:`_schema.MetaData.reflect`, this has the effect of reflecting related tables that might otherwise not be in the list of tables being reflected, for example if the referenced table is in a different schema or is omitted via the :paramref:`.MetaData.reflect.only` parameter. When False, :class:`_schema.ForeignKey` objects are not followed to the :class:`_schema.Table` in which they link, however if the related table is also part of the list of tables that would be reflected in any case, the :class:`_schema.ForeignKey` object will still resolve to its related :class:`_schema.Table` after the :meth:`_schema.MetaData.reflect` operation is complete. Defaults to True. .. versionadded:: 1.3.0 .. seealso:: :paramref:`_schema.Table.resolve_fks` :param \**dialect_kwargs: Additional keyword arguments not mentioned above are dialect specific, and passed in the form ``_``. See the documentation regarding an individual dialect at :ref:`dialect_toplevel` for detail on documented arguments. .. seealso:: :ref:`metadata_reflection_toplevel` :meth:`_events.DDLEvents.column_reflect` - Event used to customize the reflected columns. Usually used to generalize the types using :meth:`_types.TypeEngine.as_generic` :ref:`metadata_reflection_dbagnostic_types` - describes how to reflect tables using general types. )rrrrrNrgrez schema '%s'rr?z7Could not reflect: requested table(s) not available in z: (r)rg filter_names availablekindscoperzSkipping table z: ra)r3rrrrrgr4rengine_reflection ObjectKindTABLE OrderedSetget_table_namesANYget_view_namesget_materialized_view_namesrrrjrrBr2rengine_get_reflection_info ObjectScoperVUnreflectableTableErrorrr)rrbrgrrrrrrr reflect_optsrrrfavailable_w_schemacurrentschnameloadmissings missing_strruerrs rcrzMetaData.reflectEsNF   % 9 9 ;t!%#2$4*!e !L    /~!)/ X&>>33>>DDD.2oo$$V,/I~~77BBFF  !4!4V!<=$$T%E%Ef%MN!;???4=>IDxq'I><"&/"$++&G|*-Y8J)K)K g&'*@)K $*-Y8J)K)K g'7'+AT4()K-1JDDD 4I4DJ??@a< ;sCK?> JK?3J) 0K?1J.K?!J4<K? J:J:AK? J?/AK? K K? J&"K?%J&&K?K<K72K?7K<<K??LcJ|jtj|||y)aDCreate 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:`.Connection` or :class:`.Engine` used to access the database. :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]rNr^rrbrr]s rc create_allzMetaData.create_alls&0    *V  rbcJ|jtj|||y)a?Drop 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:`.Connection` or :class:`.Engine` used to access the database. :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. rNrers rcdrop_allzMetaData.drop_alls&0    t 6  rb)NNNN) rgrrrrz Optional[_NamingSchemaParameter]rrrvrr)rzUnion[str, Table]rvr)rfrrgrrnrVrvr)rfrrgrrvr)rvDict[str, Any])rrrvrrr)rvz List[Table])......)rbrJrgrrrrCUnion[_typing_Sequence[str], Callable[[str, MetaData], bool], None]rrrrrrrrrvr)rbrIrgrrrrrrrrrrrrrrvr)NFNFTT)rbrrgrrrrrrrrrrrrrrvr)NT)rbrrz!Optional[_typing_Sequence[Table]]r]rrvr)r[r\r]rrrrrrErrrrrrrrrrr4rrrrarbrcrXrXs0 N!%'+>B$( K K %K < K " K  K Z ('"+ &&!.&7<& &  +5 4 4 p!$  #!$             !$  #!$             T78!%  %!% s@'s@s@ s@  s@s@s@s@s@ s@9s@p59   2     >59   2     rbrXceZdZUdZdZded<eddd d dd Zdd Zdd Z e jd d dd ddZ dd ddZ y)ra3Defines a generated column, i.e. "GENERATED ALWAYS AS" syntax. The :class:`.Computed` construct is an inline construct added to the argument list of a :class:`_schema.Column` object:: from sqlalchemy import Computed Table( "square", metadata_obj, Column("side", Float, nullable=False), Column("area", Float, Computed("side * side")), ) See the linked documentation below for complete details. .. versionadded:: 1.3.11 .. seealso:: :ref:`computed_ddl` computed_columnrrPrXz:class:`.Computed`z:paramref:`.Computed.sqltext`Ncrtjtj||_||_d|_y)a Construct a GENERATED ALWAYS AS DDL construct to accompany a :class:`_schema.Column`. :param sqltext: A string containing the column generation expression, which will be used verbatim, or a SQL expression construct, such as a :func:`_expression.text` object. If given as a string, the object is converted to a :func:`_expression.text` object. :param persisted: Optional, controls how this column should be persisted by the database. Possible values are: * ``None``, the default, it will use the default persistence defined by the database. * ``True``, will render ``GENERATED ALWAYS AS ... STORED``, or the equivalent for the target database if supported. * ``False``, will render ``GENERATED ALWAYS AS ... VIRTUAL``, or the equivalent for the target database if supported. Specifying ``True`` or ``False`` may raise an error when the DDL is emitted to the target database if the database does not support that persistence option. Leaving this parameter at its default of ``None`` is guaranteed to succeed for all databases that support ``GENERATED ALWAYS AS``. N)rrrrZrX persistedrP)rrXrs rcrzComputed.__init__Qs-D!''(?(?I " rbc Ft|tsJt|jtdtfr%t|j tdtfst jd||_||_ ||j_||j_y)NzPA generated column cannot specify a server_default or a server_onupdate argument) rlrmr'rrrr2rrPrras rcrZzComputed._set_parentws&&)))  ! !DJ#9 F22T$Z4JK##+  &* #%) "rbc|Srkrar}s rcrzComputed._as_for_update rbrz_The :meth:`_schema.Computed.copy` method is deprecated and will be removed in a future release.rFc *|jdd|i|SrHrrIs rcrz Computed.copyr_rbc t|j|j|jjnd|}t ||j }|j |S)N)r)r{rXrPrnrrr)rrzrrrXgs rcrtzComputed._copysS# LL!%!8DKK  d   W 7%%a((rbrk)rXr=rrrvrrr)rzrTrrrrvr)r[r\r]rrrr'rrZrr4rrrtrarbrcrr4s0'N !!')HHL!)!6D! !!F *T__  3 26;.;=@; ;  ; 26 ). )=@ )  )rbrceZdZdZdZdZ d d dZddZddZe jdd dd Z dd Z y)ra4Defines an identity column, i.e. "GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY" syntax. The :class:`.Identity` construct is an inline construct added to the argument list of a :class:`_schema.Column` object:: from sqlalchemy import Identity Table( "foo", metadata_obj, Column("id", Integer, Identity()), Column("description", Text), ) See the linked documentation below for complete details. .. versionadded:: 1.4 .. seealso:: :ref:`identity_ddl` identity_columnTNc ltj|||||||| | |  ||_||_d|_y)aqConstruct a GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY DDL construct to accompany a :class:`_schema.Column`. See the :class:`.Sequence` documentation for a complete description of most parameters. .. note:: MSSQL supports this construct as the preferred alternative to generate an IDENTITY on a column, but it uses non standard syntax that only support :paramref:`_schema.Identity.start` and :paramref:`_schema.Identity.increment`. All other parameters are ignored. :param always: A boolean, that indicates the type of identity column. If ``False`` is specified, the default, then the user-specified value takes precedence. If ``True`` is specified, a user-specified value is not accepted ( on some backends, like PostgreSQL, OVERRIDING SYSTEM VALUE, or similar, may be specified in an INSERT to override the sequence value). Some backends also have a default value for this parameter, ``None`` can be used to omit rendering this part in the DDL. It will be treated as ``False`` if a backend does not have a default value. :param on_null: Set to ``True`` to specify ON NULL in conjunction with a ``always=False`` identity column. This option is only supported on some backends, like Oracle Database. :param start: the starting index of the sequence. :param increment: the increment value of the sequence. :param minvalue: the minimum value of the sequence. :param maxvalue: the maximum value of the sequence. :param nominvalue: no minimum value of the sequence. :param nomaxvalue: no maximum value of the sequence. :param cycle: allows the sequence to wrap around when the maxvalue or minvalue has been reached. :param cache: optional integer value; number of future values in the sequence which are calculated in advance. :param order: optional boolean value; if true, renders the ORDER keyword. rN)rralwayson_nullrP) rrrrrrrrrrrrs rcrzIdentity.__init__sMv   !! !    rbc |t|tsJt|jtdtfrt|j tdst jd|jdurt jd||_ ||_ |jturd|_ ||_y)Nz^A column with an Identity object cannot specify a server_default or a server_onupdate argumentFzCA column with an Identity object cannot specify autoincrement=False)rlrmr'rrrr2rrrPr$rr`r(ras rcrZzIdentity._set_parent s&&)))  ! !DJ#9 F22DJ?##?    5 (##&    ( (,< <#FO $rbc|Srkrar}s rcrzIdentity._as_for_updaterrbrz_The :meth:`_schema.Identity.copy` method is deprecated and will be removed in a future release.c &|jdi|Srrrs rcrz Identity.copy"rrbc ,t|j|j|j|j|j |j |j|j|j|j|j }|j|S)N) rrrrrrrrrrr) rrrrrrrrrrrrr)rrris rcrtzIdentity._copy*sl ;;LL**nn]]]]****** %%a((rb) FNNNNNNNNNN)rrrrrrrrrrrrrrrrrrrrrrrvrrr)rrrrvr) r[r\r]rrrrrZrr4rrrtrarbrcrrs2'NK"&##'"&"&%)%) $# $II I I ! I  I I#I#IIII IV%,T__  3    )rbr)rfrrgrrvr)rxrryrTrzrTrvrr) rfrrrr~rr#rrvr)rpOptional[DefaultGenerator]rvzTypeGuard[Sequence])rprrvz%TypeGuard[ColumnElementColumnDefault])rprrvz%TypeGuard[ScalarElementColumnDefault])r __future__rabcrrenumroperatorrrrrr r r r r rrrrrrrrrrrrrrrrrbaserrr r!r"r#r$r%r&r'rdr(r)r*r+r,rr-r.r/r1r2r3r4r5 util.typingr6r7r8r9r:r;_typingr<r=r>r?r@rArBr rCrDrE functionsrFrGrHrrIrJengine.interfacesrKrLrM engine.mockrNengine.reflectionrOsql.selectablerPrQrSrUrrri_ServerDefaultArgument_ServerOnUpdateArgumentrYr^rr_r`rhr{_self_inspects VisitablerTrr InspectablerVrmrrr,rrru attrgetterrzrrr&rrrrrrWrrrr@rVrurrry_NamingSchemaCallablerrr immutabledictrrXrrrarbrcr#sC.# / *12(8.#"#! #!+!"## ++"7,.%',#$"#;?4,3+ T e<(vW%@A"5i#89C]3%771$F8 6  > #"!" : *"H$6$6**Z00fJ Y-=+z/E/Eg/NY-x$s]J R(8sn%/3/"!% / / ,/ /  /  /dn- n-b" '" "4 '4 .44 '4 .4 .(--m< 3 3 34G H+++K8< z:< ~R:$cR:j  (#.=#.L:;@@@>X>1M1h6A6Ar\ }o/?\ ~ 9'$9'9'x)PL)PXp$ 1:p$fQ'Q'hy"!6 y"xl)0l)^j+5j+Z i5iX )1 )S (*;ZS l!*e!4c!9:s$99:iu C' '( *5GD4F4F "#51 v }v ri)|Zi)XY) jY)rb