L i  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'l#m-Z-dd(lm.Z.dd)l/m0Z0dd*l/m1Z1dd+l/m2Z2dd,l/m3Z3dd-l/m4Z4dd.l5m6Z6dd/l!m7Z7dd0l"m8Z8d1d2lm9Z9d1d3lm:Z:d1d4lm;Z;d1d5lmm?Z?d1d8l>m@Z@d1d9l>mAZAd1d:l>mBZBd1d;l>mCZCd1dmDZDe j4r~dd=lEmFZFdd>lEmGZGdd?lEmHZHdd@lEmIZIddAlEmJZJddBlEmKZKddCl#mLZLddDl#mMZMddElNmOZOddFl/mPZPddGl/mQZQddHlRmSZSddIl!mTZTddJl"mUZUd1dKlVmWZWd1dLlVmXZXd1dMlYmZZZd1dNlYm[Z[d1dOlYm\Z\d1dPl]m^Z^d1dQl_m`Z`edRdSTZaedUdVTZbedWdXTZceeede&fZeedYede4e2e fZfefZgGdZd[eZhehjZid\ejd]<ehjZkd^ejd_<ehjZld`ejda<ddbZm ddcZne;jGdddVe-ZpGdedfZqGdgdhepZrGdidXe*ere6e;jdXZtGdjdke*epe1eaZu dddldm ddnZvGdodpe*epZwer ddqZx ddrZy ddsZzn6ejdtZxejduZyejdvZzGdwdxe+epZ|Gdydze|eZ}Gd{d|e}Z~Gd}d~e}ZedZGdde}ZGddeAZGdde}ZGddZGdderee|Ze;jGddYe,ZGddeZGdde*eqepZGddZGddeeZGddeZGddeZGddeZGddeZGdde*eeqepZe eetgedfZeedefZGddeCdZeeee effZe<j&ddiZdejd<GdderZGddeepZGddeeepZy)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)SchemaVisitable)_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)_CreateDropBind)_DDLColumnArgument) _InfoType)_TextCoercedExpressionArgument)_TypeEngineArgument) ColumnSet)ReadOnlyColumnCollection) DDLCompiler) BindParameter)KeyedColumnElement)Function) TypeEngine)anon_map) Connection)Engine)_CoreMultiExecuteParams)CoreExecuteOptionsParameter)ExecutionContext)_ReflectionInfo) FromClause_Tr)bound_SI SchemaItem_TABTable FetchedValueceZdZdZ dZ dZy) SchemaConstrr1N)__name__ __module__ __qualname__ RETAIN_SCHEMA BLANK_SCHEMANULL_UNSPECIFIED[/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sqlalchemy/sql/schema.pyrZrZs%ML rcrZz)Final[Literal[SchemaConst.RETAIN_SCHEMA]]r_z(Final[Literal[SchemaConst.BLANK_SCHEMA]]r`z,Final[Literal[SchemaConst.NULL_UNSPECIFIED]]rac||S|dz|zS)N.rb)nameschemas rd_get_table_keyris ~ |d""rcc|||S|| dfd }ttttj|i|S)Nct|tr?|jur1|jjvrj|jSyN) isinstanceColumntablekeyc)elementkwfixed_source_tablefixed_target_tables rdreplacez!_copy_expression..replacesG w ' !33 1333%'' 4 4rc)rrr0rsrreturnzOptional[ExternallyTraversible])rr+rrreplacement_traverse) expression source_table target_tablervrtrus @@rd_copy_expressionr|sh |3%% & .1  (  c%%j"g> rccZeZdZdZdZdZd dZd dZejd dZ d dZ dZ y )rUz3Base 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_dispatchAttributeErrorr3 ArgumentError)selfargsrsitemspwderrs rd _init_itemszSchemaItem._init_itemsso %D%99D$$ %&++66:X?s " A AA c2tj|dgS)Ninfo) omit_kwargr5 generic_reprrs rd__repr__zSchemaItem.__repr__s  6(;;rcciS)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`. rbrs rdrzSchemaItem.infos  rccd|jvr|jj|_|jj |j|S)Nr)__dict__rcopydispatch_update)rr~s rd_schema_item_copyzSchemaItem._schema_item_copys? T]] "#yy~~/K $$T]]3rcTN)rrUrsrrwNonerwstr)rwr@)r~rTrwrT) r\r]r^__doc____visit_name__create_drop_stringify_dialectrrr5memoized_propertyrr_use_schema_maprbrcrdrUrUs@="N$-! %<    Orcc>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 rdddl_ifzHasConditionalDDL.ddl_ifsDyy)U;  rc)NNN)r Optional[str]rzOptional[ddl.DDLIfCallable]r Optional[Any]rwr:)r\r]r^rr__annotations__rrbrcrdrrsJ$(G '"&15# ##/# #  #rcrceZdZUdZded<y) HasSchemaAttrz1schema item that includes a top-level schema namerrhN)r\r]r^rrrbrcrdrr6s ; rcrceZdZUdZdZer&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)HrWaRepresent 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 rocyrlrbrs rd primary_keyzTable.primary_key]s7:rccyrlrbrs rd foreign_keyszTable.foreign_keys`s36rc#DedupeColumnCollection[Column[Any]]_columnsOptional[Column[Any]]_sentinel_columnSet[Constraint] constraintsz Set[Index]indexescyrlrbrs rdcolumnsz Table.columnssILrccyrlrbrs rdexported_columnszTable.exported_columnss:=rccyrlrbrs rdrqzTable.csCFrcc@|jr|f|jzS|fSrl) _annotations_annotations_cache_key)rrJ bindparamss rd_gen_cache_keyzTable._gen_cache_keys'   7T888 87Nrc)1.4z8Deprecated alias of :paramref:`_schema.Table.must_exist`) mustexistc&|j|i|Srl)_new)clsrrss rd__new__z Table.__new__s388T(R( (rcc.|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)Nrrr1zJTable() takes at least two positional-only arguments 'name' and 'metadata'rh 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 TypeErrorgetrhr`r3rpopritablesboolInvalidRequestError_init_existingrbefore_parent_attach _add_table__init__after_parent_attach Exceptionr5 safe_reraise _remove_table) rrrsrgmetadatarhrrmsgrrpros rdrz Table._news"B>>#& & #'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&&(9**48999 9s5F4=6G 4G  H)H<HH HHNTF)rhquote 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_generatedrf _reflect_info)rrrallow_replacements all_namesrb)superrr,rrhr`rmrrsetrrPrimaryKeyConstraintrr_extra_dependenciesrgfullnamerrrrr2listen _prefixes _extra_kwargs _autoloadr)rrgrrhrrrrrrrrrrrrrrrrrsrevtfn __class__s rdrzTable.__init__sH   T512  >"//DK | #DK'Lfc* **%fl;DK $u 5 $ # #D )E/2u ;; "'+{{DII>DM IIDM"45   DI  $ ,R T3+ ,&.2 R  $ NN%+'    .    rcc tj|}|j5} | j||||||dddy#1swYyxYw)Nrr)r4inspect_inspection_context reflect_table) rrrrexclude_columnsrrrinsp conn_insps rdrzTable._autoloadqs\!!-0  % % ' 9  # #%+ $    s AAc2t|jdS)zTReturn the set of constraints as a list, sorted by creation order. c|jSrl)_creation_order)rqs rdz+Table._sorted_constraints..s a6G6Grcrp)sortedrrs rd_sorted_constraintszTable._sorted_constraintssd&&,GHHrccl|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 rdforeign_key_constraintszTable.foreign_key_constraintss8*(( ~~) 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)NrautoloadrTrhrrrFrz,Can't change schema of existing table from 'z' to ''rr)rrz2Can't redefine 'quote' or 'quote_schema' argumentsrrrrbrr)rrhr3rrqrgrremoverrrrrrr)rrkwargsrrrrhrrrrrrqrrprrs rdrzTable._init_existingsS ?D9 ::j-t*CD!::&8$?Hd+ZZ d3  ?D9 !**%6> ?E:    f +## VF816  !**%6=  &VV ,660MM((+ ,jj5 , Cf}''H zz)T\\: "(** $"9"9# JJvtyy1  #4866":a166":":"$ NN %+  )-/1QVVQY/ /$V$$49M#;0s I Ic &|j|yrl_validate_dialect_kwargsrrs rdrzTable._extra_kwargs %%f-rccyrlrbrs rd_init_collectionszTable._init_collections rccyrlrbrs rd_reset_exportedzTable._reset_exportedrrcc.|jjSrl)r_autoincrement_columnrs rdr"zTable._autoincrement_columns555rccd}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_negativer3rIDENTITYrserver_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 rd _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??)/   $   rcc|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 rdautoincrement_columnzTable.autoincrement_column{s()))rccBt|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``. )rirgrhrs rdrpz Table.keysdii55rcc.ddjt|jgt|jgz|jDcgc] }t|c}zdDcgc]}|dtt ||c}zzScc}wcc}w)Nz Table(%s), rh=)joinreprrgrrgetattr)rxks rdrzTable.__repr__sTYY $))_ DMM"# $ $ -1tAw- .?II!T'$"234I J   .Is B !!B cBt|j|jSrl)ri descriptionrhrs rd__str__z Table.__str__sd.. < >%T47 ||  ,,   %%e,,sH )rwr)rwSet[ForeignKey]rw*ReadOnlyColumnCollection[str, Column[Any]])rJrJrzList[BindParameter[Any]]rwzTuple[Any, ...])rrrsrrwr)*rgrrrYrrUrh7Optional[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]]rrrsrrwr)rbTNN)rrYrUnion[Engine, Connection]rrrzCollection[str]rrrrrz_ReflectionInfo | Nonerwr)rwzList[Constraint])rwzSet[ForeignKeyConstraint])rrrrrwrrrrwrrwrrwzOptional[Column[int]])rwr!rrorWrwrF)rQzColumnClause[Any]rRrrwr)rzUnion[Index, Constraint]rwrrZr&rsrrwrrcr>r^rrwr) rrYrhz.Union[str, Literal[SchemaConst.RETAIN_SCHEMA]]rkz^Optional[Callable[[Table, Optional[str], ForeignKeyConstraint, Optional[str]], Optional[str]]]rgrrwrW)/r\r]r^rrrr5ro_non_memoized_propertyrrrrrrqrtypingdeprecated_paramsr classmethodrrrpropertyr rrrrr r"ro_memoized_propertyr;r=rprrJrNrTrWr[rdrh deprecatedr_rmrl __classcell__rs@rdrWrW<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 "`-`-?`- `-`- `-rcceZdZUdZdZdZded<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);rnz(Represents a column in a database table.rQTrrpzOptional[FetchedValue]r(NautoF)rgtype_ autoincrementrinsert_defaultdocrprrqrr)onupdaterr(server_onupdatersystemrinsert_sentinel_omit_from_statements_proxiesrrrqc||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_updateFrb)3listrmrr3rrhasattrr,rrrpr_insert_sentinelr_user_defined_nullablerar)rrqrrrrrrrcomputedr%r _set_typetyperNO_ARG ColumnDefaultrrrtrrX_as_for_update DefaultClauser(rrr_typing_SequencerUr5set_creation_orderrr)r_Column__name_pos_Column__type_posrgrrrrrrprrqrr)rrr(rrrrrrrrdialect_kwargsl_argscoltypeudnresolved_defaultrs rdrzColumn.__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,^,rcrWrorrrrzOptional[Computed]rzOptional[Identity]r%c^|jjs||jusJ||_t|jtr|jj ||jj j D]$}t|ts|j |&yrl)r_isnullrmr&r_variant_mappingvalues)rrimpls rdrzColumn._set_typesyy  ETYY$666 dii!2 3 II / / 5II..557 5D$ 12..t4 5rcc@tj|jSz1used by default.py -> _process_execute_defaults())r_from_column_defaultrrs rd_default_description_tuplez!Column._default_description_tuples(<$***>*>>rcc &|j|yrlrrs rdrzColumn._extra_kwargsrrcc|jy|jH|jjr&|jjdz|jzS|jS|jS)Nz (no name)rf)rgronamed_with_columnrIrs rdrJzColumn.__str__s^ 99  ZZ #zz++zz--3d6F6FFF'''## #rcc|jD]3}|jjj|js3yy)zOReturn True if this Column references the given column via foreign key.TF)rrQ proxy_set intersectionrrQfks rd referenceszColumn.referencess?## Byy""//0@0@A rcc&|j|yrlrV)rrs rdappend_foreign_keyzColumn.append_foreign_keys $$T*rccg}|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) Nrprr)rrr(rz Column(%s)r@z table=<%s>z table=NonerB)rprgrtrr)rrr(rrCrDrrrrorIrE)rkwargrFrGs rdrzColumn.__repr__s 88tyy LL     LL '}} LL $ == LL $ << LL #    LL) * << LL #dii $))_ DII $ 1 1C1Q]tAwC D!% 0 011tAw1 2 JJd*>$tzz'='==$#  ?DD!T'$"234D 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.rozColumn object 'z' already assigned to Table 'rrgrpzA 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)rqryzThe '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.)ryc&|jSrl)_set_remote_table)rros rdr z$Column._set_parent..| sr/C/CE/Jrcz4An column cannot specify both Identity and Sequence.)$rmrWrgr3r_reset_memoizationsrprErIrrPrrrrr5rsrvrorrr_replacerrrrWrzrrqUniqueConstraint_setup_on_memoized_fksr%rrr) rrZrrrsexistingr existing_col conflicts_onrros @rdr[zColumn._set_parent s%'''yy##E    " 88 yyDH4$/  HE$9##!$((,&&.&:&:%;1>     88u~~ % >>$((3Lxx499$% $ YY) #$TYY/L(>L!L  #4')22(7(4(=DHH49988= |2 G'33@B&&--b1}}(9(99))00? @ L4TYY9N II2<3C3C2DE''+yyk2$(()*,,  t,?# $))  zz**6''H+/DJJ '       & &t , XX** *##9$((D449NN3C1F  ::$**c*''C  # #$((4 +<4  [[$++s+'':  # # =  ##$JK == t||X .$--2##F 3 rccl|jj|jfdf|jj|jfdfg}|D]g\}}||jjjvs)|jjj|D]}|j |us||iy)NFT)rorprgr _fk_memos link_to_name)rrfk_keysfk_keyrrs rdrzColumn._setup_on_memoized_fks sjjnndhh ' /jjnndii ($ / %,  FL,,666**--77?B,62 rccr|j|||jytj|d|y)Nr)ror2r)rrs rd_on_table_attachzColumn._on_table_attach s+ :: ! tTZZ LL4b 9rcrz]The :meth:`_schema.Column.copy` method is deprecated and will be removed in a future release.c &|jdi|SNrbrurrss rdrz Column.copy  tzzBrcc |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. _Nrgrrprrqrrrrr(rrrrrrrb)"rrxrurrdialect_options _non_defaultsitemsr(rrmComputedIdentityrtrr&r _constructorrgrprrqrrrrrrrrrr)rr) rrsrqr column_kwargs dialect_namerdialect_option_keydialect_option_valuer(rrs rdruz Column._copy sl$(#3#3" 1==GAGGMbM" $($5$5 JqQ\\WQWW]r] J"K   00 L"22<@NNO!&&( "$)lS03EEF   ,,.. 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)rrrrupdaterrrmr&rrrrrrar)rrur[r(rXrrrrqrrrrxrr) rotherrr new_defaultnew_server_defaultnew_server_onupdate new_onupdater~ new_constrnew_fks rd_mergez Column._merge s    $E     'E,?,?6,I"&"4"4E  ;;;;EL 99 JJ  dii ( }}!3!3%!23 EJ%!23//6..557 :d$562259 :  ' '/? ?,,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&rgrr!Optional[_TypeEngineArgument[_T]]rr=rrrrrrrprrrrqrrOptional[_InfoType]r)z ?\ -@A\ -| L  !!    !   5##K$K ##L$L ??. $+ >{!{* { ! {  { {z : T__  3    D)LS*t#!$) QQQ3 Q  Q  Q"Q QQ &QrcrnT)romit_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)rgrrrr)rnr INTEGERTYPE_InsertSentinelColumnDefault)rgrrr#s rdrr s8N  &+mh""*G0L0N2 rcceZdZUdZdZded<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_keyrrZr _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. .. seealso:: :ref:`on_update_on_delete` :param ondelete: Optional string. If set, emit ON DELETE when issuing DDL for this constraint. Typical values include CASCADE, SET NULL and RESTRICT. Some dialects may allow for additional syntaxes. .. seealso:: :ref:`on_update_on_delete` :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 rmrr)rorr.r3rrrZ use_alterrgrondelete deferrable initiallyrmatchrr_unvalidated_dialect_kw)rrQr r,rgrr-r.r/rr0rrr  dialect_kws rdrzForeignKey.__init__ sB"(()D)DfM * dmmS )!%D !%D ""((4:{*C''*,0,>,>,D,DE& "     $"(  DI'1$rcc(d|jzS)NzForeignKey(%r)) _get_colspecrs rdrzForeignKey.__repr__x s$"3"3"555rcrzaThe :meth:`_schema.ForeignKey.copy` method is deprecated and will be removed in a future release.rAc *|jdd|i|S)Nrhrbr)rrhrss rdrzForeignKey.copy{ s tzz..2..rcc 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. rA) r,rgrr-r.r/rr0r) rr4r,rgrr-r.r/rr0rr1r)rrhrsrs rdruzForeignKey._copy s   V  ,  nn]]]]nn****LL  **  %%b))rcc4|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. NrfzDCan't copy ForeignKey object which refers to non-table bound Column ) r__column_tokensr`r)ror3rrprrmrr)rrh table_name_is_copy_schematnamecolnames rdr4zForeignKey._get_colspec s+$ $ . .&*&9&9 #GUG%"%"'11%+UG<< %)%8%8 "FE7%+ZAA",g66    +!!''/112262D2D1GI  --111""((11""&&  dmmS1 11== rcc |jdSNr)r8rs rdrwzForeignKey._referred_schema s""1%%rcc|j7|jjy|jjjS|j\}}}t ||Srl)r)rorpr8ri)rrhr<r=s rd _table_keyzForeignKey._table_key sZ    )!!''/))//333%)%8%8 "FE7!%0 0rcc<|j|jduS)zrReturn True if the given :class:`_schema.Table` is referenced by this :class:`_schema.ForeignKey`.N)corresponding_columnrQrMs rdrzForeignKey.references s ))$++6dBBrccL|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`. )rrCrQrMs rd get_referentzForeignKey.get_referent s}}11$++>>rccX|jjd}|"tjd|jt |dk(r|j }d}n |j }|j }t |dkDrdj|}nd}|||fS)z7parse a string-based _colspec into its component parts.rfNz*Invalid foreign key column specification: rr)r4splitr3rrlenrrC)rmr<r=rhs rdr8zForeignKey._column_tokens s     % %c * 9##k2299E ))00F!%0Hg--rcc 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) rZrprqrrrgr3NoReferencedColumnErrorr)rrLror=_columnrZrprqs rd_link_to_col_by_colstringz$ForeignKey._link_to_col_by_colstring? s ?[[F% %%**Cggkk#t,G   CWW 66W$G Cggkk'40G ?--##'==/2(--./**%.set_typem s(yy~~%%!' &rcr)rZrrrrQ)rrQrUs ` rd_set_target_columnzForeignKey._set_target_columnc sX{{&&& ;;   # #%{{DKK   - **84 rcc"|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 rdrQzForeignKey.columnu s##%%rc.r cyrlrbrr s rdrzForeignKey._resolve_column srccyrlrbrYs rdrzForeignKey._resolve_column !$rcTc ,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__)rmrrrNr rr3NoReferencedTableErrorrZrprrrRrr])rr rLrMr=rorQs rdrzForeignKey._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,rgrr-r.r/r0rr])rmrWrrvr,rgrr-r.r/r0rr1_append_elementrrrLrrrNrrrRrVr3rPrrtrr])rrQrorLrer=rrQs rdr`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)rQr?r zOptional[ForeignKeyConstraint]r,rrg_ConstraintNameArgumentrrr-rr.rr/rrrr0rrrrrr rr2rr)rhrrsrrwr)NNF)rhzROptional[Union[str, Literal[SchemaConst.RETAIN_SCHEMA, SchemaConst.BLANK_SCHEMA]]]r9rr:rrwrrwr)rwr)rorWrwr)rorQrwr)rwz(Tuple[Optional[str], str, Optional[str]])rwz Tuple[Table, str, Optional[str]])rLrWrorWr=rrwr)rQrrwr)rwr)r z Literal[True]rwr)r rrwrrrrrYrwrrQrrorWrwr) r\r]r^rrrrrr5rrrur4rrwrAtarget_fullnamerrErr8rNrRrVrrQrrr[rrfr`rbrcrdrr sg'R#N (( 7;(,"&"&%)#'"#$(!%#F2"F24F2 F2 & F2  F2 F2#F2!F2F2F2"F2F2F2F2P6T__  3 /3/  /04*J $(/! /!"/!/! /!b&&1|,OC ? &&<&.P" ")."9F" "H$  & &+.( "%$$ $$ #'$$ $L 644,-rcrcyrlrbobjs rdr-r- s!rccyrlrbros rddefault_is_clause_elementrr 03rccyrlrbros rddefault_is_scalarru rsrc 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_generatorTFrrQc||_yrlrrrs rdrzDefaultGenerator.__init__% $rcc trt|tsJ||_|jr||j_y||j_yrl)rrmrnrQrrrras rdr[zDefaultGenerator._set_parent( s; ff- -- ??#'DKK "&DKK rcctrlNotImplementedErrorrs rdruzDefaultGenerator._copy1 !##rccTtjdd|j|||S)NzoUsing the .execute() method to invoke a DefaultGenerator object is deprecated; please use the .scalar() method.z2.0)r5warn_deprecated_execute_on_scalarr connectiondistilled_paramsexecution_optionss rd_execute_on_connectionz'DefaultGenerator._execute_on_connection4 s:  $   && (*;  rcc(|j|||Srl)_execute_defaultrs rdrz#DefaultGenerator._execute_on_scalarD s ** "$5  rcNrrrrwrr)rwrz)rrKrrMrrNrwr)r\r]r^rr_is_default_generatorrv is_identityis_server_defaultrwr/rxhas_argr+rrr[rurrrbrcrdrzrz s)N KKKIGK !!%'$  2 7     2 7   rcrzceZdZUdZded<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)) rargcyrlrbrrrs rdrzColumnDefault.__new__f r[rccyrlrbrs rdrzColumnDefault.__new__k s&)rccyrlrbrs rdrzColumnDefault.__new__s sLOrcNct|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.) rmrXr3rcallableCallableColumnDefaultr)ColumnElementColumnDefaultScalarElementColumnDefaultrrrs rdrzColumnDefault.__new__v sZ: c< (##F c]'C ] +,C _,C~~c""rccN|jjd|jdS)N())rr\rrs rdrzColumnDefault.__repr__ s$..))*!DHH>..dhhmmX->->???rcNr)rrrrrwr)rwrr) r\r]r^rrwrrrrur5rpreload_modulerrbrcrdrr sw G  !     T23@4@rcrceZdZddZy)_CallableColumnDefaultProtocolcyrlrb)rcontexts rd__call__z'_CallableColumnDefaultProtocol.__call__srcN)rrOrwr)r\r]r^rrbrcrdrrs=rcrcReZdZUdZdZded<dZ d d dZd dZ d dZ y) rzQdefault generator for a callable Python function .. versionadded:: 2.0 Trrc>||_|j||_yrl)r_maybe_wrap_callablerrs rdrzCallableColumnDefault.__init__s %,,S1rccDt|j|jSr)rrrrs rdruzCallableColumnDefault._copys$dooNNrccP 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_selfcSrlrbctxrs rdr z.( "$rcr[NrcSrlrbrs rdr z..rrcrzDColumnDefault Python function takes zero or one positional arguments)r5get_callable_argspecr wrap_callablerHr3r)rrargspec defaulted positionalss ` rdrz*CallableColumnDefault._maybe_wrap_callables <//DAGAJd*>s71:C! '!*o 1 ! %%&6; ; A I##'  <%%&6; ;  "    $$   rcc@|jduxr|jdkSr?)rrs rdr&z&IdentityOptions._increment_is_negativems~~T)@dnnq.@@rc) NNNNNNNNN)r Optional[int]rrrrrrrrrrrrrrrrrwrr)r\r]r^rrrr&rbrcrdrr9s $#'"&"&%)%) $# $''!' '  ' # '#'''' 'RAArcrceZdZUdZdZdZded<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` sequenceTrrQzOptional[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)rzrrrQr,rgoptionalr`rh constructrri_key _set_metadatar/r)rrgrrrrrrrrhrrrrrrrrs rdrzSequence.__init__sn !!$:!>  !! !  e,   \ !#' 'DK&  !fn#+?? 2DK&%// EDK  "40    x (  (3DN!DNrczsqlalchemy.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. )r5r sql_functionsfunc next_valuers rdrzSequence.next_valueUs%~~++00;;DAArcc |}t|tsJt| ||j |j yrl)rmrnrr[rr`)rrZrsrQrs rdr[zSequence._set_parent^s7&&))) F#0rccbt|j|j|j|j|j |j |j|j|j|j|j|j|j|j|jS)N)rgrrrrrrrrhrrrrrr)rrgrrrrrrrrhrrrrrrrs rdruzSequence._copydsx**nn]]]]**;;****nn]]]]  rcc:|j|jyrl)rr)rrQros rdr`zSequence._set_tablews 5>>*rccX||_||jj|j<yrl)r _sequencesr)rrs rdrzSequence._set_metadatazs!  .2   +rccH|jtj||y)z&Creates this sequence in the database.r]Nr_rbs rdrdzSequence.create~s c114JOrccH|jtj||y)z&Drops this sequence from the database.r]Nrfrbs rdrhz Sequence.drops c//*Mrcc\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.)r3rrr\rs rd_not_a_column_exprzSequence._not_a_column_exprs1%%DNN++,-# #  rc)NNNNNNNNNNNFNNNF)$rgrrrrrrrrrrrrrrrrhrrrrrrz"Optional[_TypeEngineArgument[int]]rrrrrzOptional[MetaData]rrrrrwr)rwz Function[int]r)rwrrlrk)Tr)rwr)r\r]r^rrrvrrr5rrr[rur`rrdrhrrrs@rdrrrsh#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  rcrcbeZdZUdZdZdZdZdZdZde d<d ddZ ddZ ddZ dd Z dd Zdd Zy )rXaA 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` TFrrQc||_yrlrr}s rdrzFetchedValue.__init__r~rccF||jk(r|S|j|Srl)r_cloner}s rdrzFetchedValue._as_for_updates"  (K;;z* *rcc,t|jSrl)rXrrs rdruzFetchedValue._copysDOO,,rcc|jj|j}|jj|j|jj dd||_|S)NrQ)rrrrrr)rrns rdrzFetchedValue._clonesN NN " "4>> 2 $--( x&! rcc |}t|tsJ||_|jr||j_y||j_yrl)rmrnrQrrr()rrZrsrQs rdr[zFetchedValue._set_parents=&&))) ??*.DKK ')-DKK &rcc,tj|Srlrrs rdrzFetchedValue.__repr__s  &&rcNrrrrrwrX)rwrX)rrrwr:rr)r\r]r^rr reflected has_argumentrwrrrrrurr[rrbrcrdrXrXsH&ILK !!%+ -.'rccLeZdZdZdZ 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) r5assert_arg_typerr)r-rrrr)rrr _reflectedrs rdrzDefaultClause.__init__s9 S3 z"BEJ $#rccZt|j|j|jS)N)rrr)rrrrrs rdruzDefaultClause._copys"T__  rcc<d|jd|jdS)NzDefaultClause(z , for_update=rrrs rdrzDefaultClause.__repr__s59XXtOOrc)FF)rz%Union[str, ClauseElement, TextClause]rrrrrwr)rwrr) r\r]r^rrrrurrrs@rdrrsM*L ! $ 2 $ $ $  $ PrcrceZdZUdZdZded<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`. rintr rryNc ||_||_||_|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) rgr.r/r _create_rulerxr5rrr) rrgr.r/rrr rxr2s rdrzConstraint.__init__ sW\ $" DI(& % %%j1 rcc |j|j|sy|j4|jjtj||dfd|i|Sy)NFcompilerT)r r_should_executerCreateConstraint)rr rss rd_should_create_for_compilerz&Constraint._should_create_for_compilerDsj    (1B1B81L \\ %/4<<//$$T*D$AIMO rcc 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) ?)rmrZrWrr3rrs rdrozConstraint.tablePsS $++u-{{".%% A     s%> A  A c xt|ttfsJ||_|jj |yrl)rmrWrnrZrrLras rdr[zConstraint._set_parent\s1&5&/222 t$rcrzaThe :meth:`_schema.Constraint.copy` method is deprecated and will be removed in a future release.c &|jdi|Srrrs rdrzConstraint.copyarrcc trlrrs rdruzConstraint._copyirrc)NNNNNNF)rgrir.rr/rrrrrr rrxrr2rrwr)r rErsrrwrrwrWr)rsrrwr:)r\r]r^rrrrrrror[r5rrrurbrcrdrrs "N)-%)#'$(!%&*!7%7#7! 7 " 7  7$777 7r # +.       % T__  3    $rcrceZdZUdZded<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 yrlrbras rdrz/ColumnCollectionMixin._set_parent_with_dispatch~srcTN) _autoattachry_gather_expressionsc||_t|_|}|f|rJg|_t j t j|D]3\}}}}|jj||j|5n7|D cgc]&} t jt j| (c} |_|r|jr|jyyycc} wrl) ryr#rrr expect_col_expression_collectionrDDLConstraintColumnRolertr _check_attach) rrryrrprocessed_expressionsrr add_elementrQs rdrzColumnCollectionMixin.__init__s).0    ! ,- ,,$&D ! ;;--w 3%%,,[9%,,T2 3&%  !>!>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)rmrWdiscardr)rQro cols_wo_tablers rd _col_attachedz:ColumnCollectionMixin._check_attach.._col_attacheds;"%/%--f5, ..4.8 -0rcrrr@c3&K|] }d|z ywz'%s'Nrb.0rqs rd z6ColumnCollectionMixin._check_attach..s%AQfqj%Asz Column(s) z are not part of table 'rrl)rrmrnrorWr difference_cols_wo_tablerrHrr_allow_multiple_tablesrCr3rrI)rrrqcol_objs cols_w_tablehas_string_colsr%r}rrroothers other_strr$s` @rdrz#ColumnCollectionMixin._check_attachs#44N! 1f8MANN#+Jaz!''5/IJ JH 00>  AA A7  00AMj" #9'4#(8C((78#*+a!''++ v;!   * *6::< 8 [1_T%@%@AJ$$E!(EAu0DaEFE II%A&%AA ''  ,..3.?.?-@D&A_IOJ*, Fs3F'F'F,F, F1F1F6 F;F;c6|jjSrlr as_readonlyrs rdrzColumnCollectionMixin.columns}}((**rcc6|jjSrlr4rs rdrqzColumnCollectionMixin.cr6rcc 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.) rmrnrrHrrqKeyErrorr3ConstraintColumnNotFoundErrorrr\rIr)rrZrqresultr}kes rd_col_expressionsz&ColumnCollectionMixin._col_expressionss  ff %003Jq&4I3F3v;#d&;&;"<< <<M  $44&0S%9FHHSMsB3 77#DNN$;$;#<=!!'!3!3 45 ggaj\8  s5BB!B$/(BB$B$$ C=-A C88C=c t|ttfsJ|j|D] }||jj |"yrl)rmrWrnr=rrL)rrZrsr}s rdr[z!ColumnCollectionMixin._set_parentsG&5&/222((0 'C !!#& 'rcr) rr?rrryrrz.Optional[List[Union[str, ColumnElement[Any]]]]rwrr)rrrwrr)rZzUnion[Table, Column[Any]]rwzList[Optional[Column[Any]]])r\r]r^rrr-rrrrr5rrrqr=r[rbrcrdrrms21"== + 36   !" '!$'!'! '!  '! '!R.` ++ ++/ $,'rcrceZdZUdZdddddddd ddZded< dd Zdd Zejd d dd  ddZ dd  ddZ ddZ ddZ ddZy)ColumnCollectionConstraintz-A constraint that proxies a ColumnCollection.NTF)rgr.r/rrryrrcntj|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. rgr.r/r)rryN)rrr) rrgr.r/rrryrrr2s rdrz#ColumnCollectionConstraint.__init__sV@   !     &&   (3, rcrc t|ttfsJtj ||t j ||yrl)rmrnrWrr[rras rdr[z&ColumnCollectionConstraint._set_parent6s6&65/222tV,))$7rcc||jvSrl)r)rrFs rd __contains__z'ColumnCollectionConstraint.__contains__;sDMM!!rcrzqThe :meth:`_schema.ColumnCollectionConstraint.copy` method is deprecated and will be removed in a future release.r{c *|jdd|i|SNr{rbrrr{rss rdrzColumnCollectionConstraint.copy>stzz:|:r::rcc i}|jD]>}|j|j}|jD]\}}|||dz|z<@t|jt sJ|j |jDcgc]}t||j|c}|j|j|j|jd|} |j| Scc}w)Nr)rgr.r/r)rrrrmrZrWrrr|rgr.r/rr) rr{rsconstraint_kwargsrrrrrrqs rdruz ColumnCollectionConstraint._copyKs 00 L"22<@NNO!&&( "$)","47I"IJ   $++u--- DNN !MM!t{{LAnn 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 rdrMz*ColumnCollectionConstraint.contains_columnks}},,S11rcc,t|jSrl)iterrrs rd__iter__z#ColumnCollectionConstraint.__iter__vsDMM""rcc,t|jSrl)rHrrs rd__len__z"ColumnCollectionConstraint.__len__ys4==!!rc)rr?rgrir.rr/rrrrrryrrz"Optional[List[_DDLColumnArgument]]r2rrwrr)rFrrwr)r{Optional[Table]rsrrwr@)r}rrwr)rwzIterator[Column[Any]])rwr)r\r]r^rrrr[rEr5rrrurMrQrSrbrcrdr@r@s7 )-%)#'$( "BF* $* &* # * ! * " * * * @* *  * X87 8 "T__  A)-;&; ; $ ;  ;)-)&) ) $ )@ 2#"rcr@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. rQ)rgr.r/r rrxrN) rrrDDLExpressionRolerXrtraversertrrr) rrXrgr.r/rorr rrxr2rrs rdrzCheckConstraint.__init__sZ!''(?(?I %'$,,Xw~~,FG !%##      * *5 1 rcc8t|jt Srl)rmrZrWrs rdis_column_levelzCheckConstraint.is_column_levelsdkk5111rcrzfThe :meth:`_schema.CheckConstraint.copy` method is deprecated and will be removed in a future release.rFc *|jdd|i|SrHrrIs rdrzCheckConstraint.copytzz:|:r::rcc $|"t|j|j|}n |j}t||j|j |j |j||jd|j }|j|S)NF)rgr/r.r rorrrx) r|rXrorVrgr/r.r rrxr)rr{rsrXrqs rdruzCheckConstraint._copys  #'t||TZZNGllG  nn**LL(( %%a((rc)NNNNNNTF)rXz#_TextCoercedExpressionArgument[Any]rgrir.rr/rrorTrrr rrrrxrr2rrwrr)r{rTrsrrwrV)r\r]r^rr-rr(rrr]r5rrrurrs@rdrVrV}s6 "7N#.)-%)#'!%$(&* !82482&82# 82 ! 82  82"82$82828282 82  82t22T__  3 26;.;=@; ;  ; 26).)=@) )rcrVcbeZdZUdZdZ d ddZddZded< ded < edd Z edd Z edd Z dd Z eddZ eddZddZej"ddddd d dZddd d dZy)!rvaA 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)ac 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. .. seealso:: :ref:`on_update_on_delete` :param ondelete: Optional string. If set, emit ON DELETE when issuing DDL for this constraint. Typical values include CASCADE, SET NULL and RESTRICT. Some dialects may allow for additional syntaxes. .. seealso:: :ref:`on_update_on_delete` :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. )rgr.r/rrzOForeignKeyConstraint with duplicate source column references are not supported.z_ForeignKeyConstraint number of constrained columns must match the number of referenced columns.) r rgrr-r,rr0r.r/NrZ)rrrr-rr,r0rHrr3rrrgr.r/relementsrrrZr)rr refcolumnsrgrr-r.r/r,rr0rorrr2refcols rdrzForeignKeyConstraint.__init__s}z   !   !   (" s7| J /3w< CL0''4''*0%    YY..!..jj??.. %%   " &&t6g6  tX& +++  * *5 1 % s.A7E4cp|jj||jj|yrl)rrLrdrtrs rdrhz$ForeignKeyConstraint._append_elements& &! R rcrzList[ForeignKey]rdchtjt|j|jSrl)r5 OrderedDictzip column_keysrdrs rd _elementszForeignKeyConstraint._elementss&D$4$4dmm DEErcc@|jD]}|jcSyrl)rdrw)relems rdrwz%ForeignKeyConstraint._referred_schemas&MM D(( ( rccH|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)rdrQrors rdreferred_tablez#ForeignKeyConstraint.referred_tables}}Q&&,,,rcc |jDchc]}|j}}d|vrUt|dkDrFt|dd\}}t j d|j d|jd|d|yycc}w)Nrrr1zForeignKeyConstraint on rz$) refers to multiple remote tables:  and )rdrArHr r3rr_col_description)rrorn table_keyselem0elem1s rdrcz)ForeignKeyConstraint._validate_dest_tables48MMBDdoo'B 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. rZ)rrkeysrrmr+rprrNs rdrkz ForeignKeyConstraint.column_keyss_ 4 "==%%' ' 00&c=9s3xG s.A&c8dj|jS)Nr@)rCrkrs rdrsz%ForeignKeyConstraint._col_descriptionsyy))**rcc N|}t|tsJtj||tj||t |j |jD]1\}}t|dr|j|us!|j|3|j|y)NrZ) rmrWrr[r@rjrrdrrZrrc)rrZrsror}rs rdr[z ForeignKeyConstraint._set_parents%'''tU+"..tU;4==$--8 2GC2x(BIIS,@,,S1 2 !!%(rcrzkThe :meth:`_schema.ForeignKeyConstraint.copy` method is deprecated and will be removed in a future release.rpc ,|jd||d|S)Nrprbr)rrhr{rss rdrzForeignKeyConstraint.copystzzIlIbIIrcc 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)rhr9r:) rgrr-r,r.r/rr0r)rvrdrZrpr4rArorgrr-r,r.r/rr0rrjr)rrhr{rsrFrself_fkother_fks rdruzForeignKeyConstraint._copys##'== 1aQXX\\ 1 !(3LLNahhnn.@.@@%))"!  ]]]]nnnn****LL/ 2"%T]]CLL!A 0 GX  % %h / 0%%c**5 2 s EAE ) NNNNNFFNNNN)r$_typing_Sequence[_DDLColumnArgument]rerrgrirrr-rr.rr/rr,rrrr0rrorTrrrrr2rrwr)rQrrrrwr)rwz!util.OrderedDict[str, ForeignKey]rjrr)rwz_typing_Sequence[str]rr)rhrr{rTrsrrwrv)r\r]r^rrrrhrrrlrwrprcrkrsr[r5rrrurbrcrdrvrvs .N )-"&"&%)#'"#!%$(!%V25V29V2& V2  V2  V2#V2!V2V2V2V2V2"V2V2V2 !V2p!87 FF  - -$++ )T__  3!%(, JJ& J  J  J  J!%(, "+"+& "+  "+  "+rcrvceZdZdZdZdddddd 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)rgr.r/rrc<||_t||||||d|y)NrB)rrr) rrgr.r/rrrr2rs rdrzPrimaryKeyConstraint.__init__ds3$7   !    rcc  |}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'rgr(s rdr*z3PrimaryKeyConstraint._set_parent..s$HVaff_$Hc3:K|]}d|jzywr'rr(s rdr*z3PrimaryKeyConstraint._set_parent..sGAGrrz' 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)rmrWrr[rrr#rLrqrrrCr5rsrgrrar)extend) rrZrsrorq table_pks table_pk_strcol_strrs rdr[z PrimaryKeyConstraint._set_parentxso%''' E"   D (    % %e&7&7 8 $E     ! !$ ' %911==Q9 9 MMI#dmm"44 99$Hi$HHLiiGGGG II%**%9.!::AC2)> ? IaL #A 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"_resetrro)rrr}s rd_reloadzPrimaryKeyConstraint._reloadsT* #C"CO # W%2299$? &&tzz2rcctjj||jj ||j j ||yrl)rr"rrrvr'_sa_event_column_added_to_pk_constraintrNs rdrzPrimaryKeyConstraint._replaces<2299$? c" ==dCHrcc|j}|#|g|jDcgc] }||us| c}zSt|jScc}wrl)r"rr)rautoincrqs rdcolumns_autoinc_firstz*PrimaryKeyConstraint.columns_autoinc_firstsK,,  94==MaAW._validate_autoincsxx&&.j''((77((777 ++&sxxj SEB=> !s{{T$Z,BC$""."3#5#5x@$!!c&7&7@'rcrrT)rrFz=Only one Column may be marked autoincrement=True, found both rrrf)r}rrrrwr)rHrrrr3rrg)rrr}rs rdr"z*PrimaryKeyConstraint._autoincrement_columns B t}}  "t}}%a(C  D(!#t, ""'$C/ G}} &$$,%c40*!//>"xxjgll^1> #& &Nrc)rr?rgrr.rr/rrrrrr2rrwrr)rzIterable[Column[Any]]rwr)r}rrwr)rwzList[Column[Any]]r)r\r]r^rrrr[rrrrr5rr"rrs@rdrr"s=~.N #%)#'$($) $  #  !  "  "    (&,P3:I '' >>rcrceZdZdZdZy)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^rrrbrcrdrrs)NrcrceZdZUdZdZded<ded<ded<d d d d d d  dd Zdd ZdddZdddZ ddZ y )rzaA 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. rrTroz0_typing_Sequence[Union[str, ColumnElement[Any]]] expressionsz$_typing_Sequence[ColumnElement[Any]]r{FN)rqrrrrrycdx|_} 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)ryr) ror,rrgrqrrrrrr[) rrgrqrrrrryrr2ros rdrzIndex.__init__nsP"! U))$6   DI  E %%j1 &&   & $ 0 0      U # rcc |}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 % rccRt||}tj|j|d}|"|jD]}|j ||j rE|jjDchc]}|j|jc}|_yycc}wrl) ridictrrrrfrrrh)rrgrhrpremovedrts rdrzMetaData._remove_tablesT6*((4;;T2  ** /((. / =="&++"4"4"6!((:NDM s :B$ B$c|j|j|j|j|j|j dS)N)rrhschemas sequencesfk_memosr)rrhrrrrrs rd __getstate__zMetaData.__getstate__s8kkkk}}!%!7!7   rcc||d|_|d|_|d|_|d|_|d|_|d|_y)Nrrhrrrr)rrhrrrr)rrs rd __setstate__zMetaData.__setstate__sJHo Ho !&':!; ,i( z*rcctj|j|jj|jjy)z+Clear all Table objects from this MetaData.N)rclearrrrrs rdrzMetaData.clears4 4;;  rccP|j|j|jy)z1Remove the given Table object from this MetaData.N)rrgrhrMs rdrzMetaData.removes 5::u||4rccttjt|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|jSrlr )rs rdr z(MetaData.sorted_tables..3s quurcr )r sort_tablesr rrrs rd sorted_tableszMetaData.sorted_tabless-f 4;;%%'_ =  rcc yrlrb rrcrhviewsonlyrrrrs rdreflectzMetaData.reflect8rcc yrlrbrs rdrzMetaData.reflectGrrczsqlalchemy.engine.reflectionc "tj|j5} | |||td} | j || |j }||| d<t jjjj} t j| j|fi|} |rst jjjj} | j | j|fi| | j | j|fi||)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. )rrrrrNrhrfz schema '%s'rr@z7Could not reflect: requested table(s) not available in z: (r)rh filter_names availablekindscoperzSkipping table z: rb)r4rrrrrhr5rengine_reflection ObjectKindTABLE OrderedSetget_table_namesANYget_view_namesget_materialized_view_namesrrrjrrCr3rengine_get_reflection_info ObjectScoperWUnreflectableTableErrorrs)rrcrhrrrrrrr reflect_optsrrrgavailable_w_schemacurrentschnameloadmissings missing_strruerrs rdrzMetaData.reflectVsyF   % 9 9 ;U @t!%#2$4*!e !L    /~!)/ X&>>33>>DDD.2oo$$$V>~>/I~~77BBFF  !4!4!4V!N~!NO$$888"&4!;???4=>Dxq'><"&/"$++&G|*-Y8J)K%g&'*@ $*-Y8J)K%g'7'+AT4(-1JDD 4I4JJ??@iU @U @sCL"J$L9J/ 0L7J4 L'J:L KKAL&K5AL K L J,(L+J,,L LK=8L=LLLcJ|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_rrcrr^s rd create_allzMetaData.create_alls&0    *V  rccJ|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. rNrfrs rddrop_allzMetaData.drop_all,s&0    t 6  rc)NNNN) rhrrrrz Optional[_NamingSchemaParameter]rrrwrr)rzUnion[str, Table]rwr)rgrrhrrorWrwr)rgrrhrrwr)rwDict[str, Any])rrrwrrr)rwz List[Table])......)rcrLrhrrrrCUnion[_typing_Sequence[str], Callable[[str, MetaData], bool], None]rrrrrrrrrwr)rcrKrhrrrrrrrrrrrrrrwr)NFNFTT)rcrrhrrrrrrrrrrrrrrwr)NT)rcr>rz!Optional[_typing_Sequence[Table]]r^rrwr)r\r]r^rrrrrrErrrrrrrrrrr5rrrrbrcrdrYrY s0 N!%'+>B$( K K %K < K " K  K Z ('"+ &&!.&7<& &  +5 4 4 p!$  #!$             !$  #!$             T78!%  %!% w@'w@w@ w@  w@w@w@w@w@ w@9w@x59   2     >59   2     rcrYceZdZUdZdZded<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_columnrrQrXz: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 persistedrQ)rrXrs rdrzComputed.__init__fs-D!''(?(?I " rcc Ft|tsJt|jtdtfr%t|j tdtfst jd||_||_ ||j_||j_y)NzPA generated column cannot specify a server_default or a server_onupdate argument) rmrnr(rrrr3rrQrras rdr[zComputed._set_parents&&)))  ! !DJ#9 F22T$Z4JK##+  &* #%) "rcc|Srlrbr}s rdrzComputed._as_for_update rcrz_The :meth:`_schema.Computed.copy` method is deprecated and will be removed in a future release.rFc *|jdd|i|SrHrrIs rdrz Computed.copyr_rcc t|j|j|jjnd|}t ||j }|j |S)N)r)r|rXrQrorrr)rr{rsrXgs rdruzComputed._copysS# LL!%!8DKK  d   W 7%%a((rcrl)rXr?rrrwrrr)r{rTrsrrwr)r\r]r^rrrr(rr[rr5rrrurbrcrdrrIs0'N !!')HHL!)!6D! !!F *T__  3 26;.;=@; ;  ; 26 ). )=@ )  )rcrceZdZdZdZdZ 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_nullrQ) rrrrrrrrrrrrs rdrzIdentity.__init__sMv   !! !    rcc |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)rmrnr(rrrr3rrrQr%rrar)ras rdr[zIdentity._set_parents&&)))  ! !DJ#9 F22DJ?##?    5 (##&    ( (,< <#FO $rcc|Srlrbr}s rdrzIdentity._as_for_update4rrcrz_The :meth:`_schema.Identity.copy` method is deprecated and will be removed in a future release.c &|jdi|Srrrs rdrz Identity.copy7rrcc ,t|j|j|j|j|j |j |j|j|j|j|j }|j|S)N) rrrrrrrrrrr) rrrrrrrrrrrrr)rrsis rdruzIdentity._copy?sl ;;LL**nn]]]]****** %%a((rc) FNNNNNNNNNN)rrrrrrrrrrrrrrrrrrrrrrrwrrr)rsrrwr) r\r]r^rrrrr[rr5rrrurbrcrdrrs2'NK"&##'"&"&%)%) $# $II I I ! I  I I#I#IIII IV%,T__  3    )rcr)rgrrhrrwr)ryrrzrTr{rTrwrr) rgrrrrrr#rrwr)rpOptional[DefaultGenerator]rwzTypeGuard[Sequence])rprrwz%TypeGuard[ColumnElementColumnDefault])rprrwz%TypeGuard[ScalarElementColumnDefault])r __future__rabcrrenumroperatorrrrrr r r r r rrrrrrrrrrrrrrrrrbaserrr r!r"r#r$r%r&r'r(rdr)r*r+r,r-rr.r/r0r2r3r4r5r6 util.typingr7r8r9r:r;r<_typingr=r>r?r@rArBrCrDr rErFrG functionsrHrIrJrrKrLengine.interfacesrMrNrOengine.reflectionrPsql.selectablerQrRrTrVrri_ServerDefaultArgument_ServerOnUpdateArgumentrZr_rr`rarir|_self_inspectsrUrr InspectablerWrnrrr-rrru attrgetterrzrrr&rrrrrrXrrrr@rVrvrrrz_NamingSchemaCallablerrr immutabledictrrYrrrbrcrdr!s2.# / *12(84.#"#! #!+!"## +(+"7,.%',#$"#;?43+ T e<(vW%#5i#89C]3%771$F8 6  > #"!" : ***Z00fJ Y-=+z/E/Eg/NY-x$s]J R(8sn%/3/"!% / / ,/ /  /  /dw- w-t" '" "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)^s+5s+l i5iX )1 )S (*;ZS l!*e!4c!9:s$99:iu C' '( *5GD4F4F "#51 z }z zi)|Zi)XY) jY)rc