Represents
Classes
Index (*columns[, unique, table]) |
Represents an index in a table in a database. |
asyncqlio.orm.schema.index.
Index
(*columns, unique=False, table=None)[source]¶Bases: object
Represents an index in a table in a database.
class MyTable(Table):
id = Column(Integer, primary_key=True)
name = Column(Text)
# make an index on the name column
# by specifying it as the column
name_index = Index(name)
New in version 0.2.0.
Parameters: |
---|
get_column_names
()[source]¶Return type: | Generator [str , None , None ] |
---|---|
Returns: | A generator that yields the names of the columns for this index. |
quoted_name
¶Gets the quoted name for this Index.
This returns the column name in “index” format.
quoted_fullname
¶Gets the full quoted name for this index.
This returns the column name in “table”.”index” format.