suppose there is a table A whose fields are roughly as follows:
< table > < thead > < tr > < th > column < / th > < th > index < / th > < / tr > < / thead > < tbody > < tr > < td > id < / td > < td > True < / td > < / tr > < tr > < td > name < / td > < td > True < / td > < / tr > < tr > < td > phone < / td > < td > False < / td > < / tr > < tr > < td > address < / td > < td > False < / td > < / tr > < / tbody > < / table >then I want to get what all the indexed column, should do.
-sharp
def get_index(table):
return table_index_cloumn
-sharp print [id, name]
print get_index(A)
Please help with sqlalchemy, thx
add
should be a problem with my description, so here I would like to give a detailed description of what I want to ask
-sharp mysql
-sharp sqlalchemy
-sharp model class Model: ........
model.selectable.froms[0].target_table.columns.keys()
-sharp modelcolumn
-sharp mysqlsql
-sharp google