A representation of the schema for a single table.
| 1182 | |
| 1183 | |
| 1184 | class TableMetadata(object): |
| 1185 | """ |
| 1186 | A representation of the schema for a single table. |
| 1187 | """ |
| 1188 | |
| 1189 | keyspace_name = None |
| 1190 | """ String name of this Table's keyspace """ |
| 1191 | |
| 1192 | name = None |
| 1193 | """ The string name of the table. """ |
| 1194 | |
| 1195 | partition_key = None |
| 1196 | """ |
| 1197 | A list of :class:`.ColumnMetadata` instances representing the columns in |
| 1198 | the partition key for this table. This will always hold at least one |
| 1199 | column. |
| 1200 | """ |
| 1201 | |
| 1202 | clustering_key = None |
| 1203 | """ |
| 1204 | A list of :class:`.ColumnMetadata` instances representing the columns |
| 1205 | in the clustering key for this table. These are all of the |
| 1206 | :attr:`.primary_key` columns that are not in the :attr:`.partition_key`. |
| 1207 | |
| 1208 | Note that a table may have no clustering keys, in which case this will |
| 1209 | be an empty list. |
| 1210 | """ |
| 1211 | |
| 1212 | @property |
| 1213 | def primary_key(self): |
| 1214 | """ |
| 1215 | A list of :class:`.ColumnMetadata` representing the components of |
| 1216 | the primary key for this table. |
| 1217 | """ |
| 1218 | return self.partition_key + self.clustering_key |
| 1219 | |
| 1220 | columns = None |
| 1221 | """ |
| 1222 | A dict mapping column names to :class:`.ColumnMetadata` instances. |
| 1223 | """ |
| 1224 | |
| 1225 | indexes = None |
| 1226 | """ |
| 1227 | A dict mapping index names to :class:`.IndexMetadata` instances. |
| 1228 | """ |
| 1229 | |
| 1230 | is_compact_storage = False |
| 1231 | |
| 1232 | options = None |
| 1233 | """ |
| 1234 | A dict mapping table option names to their specific settings for this |
| 1235 | table. |
| 1236 | """ |
| 1237 | |
| 1238 | compaction_options = { |
| 1239 | "min_compaction_threshold": "min_threshold", |
| 1240 | "max_compaction_threshold": "max_threshold", |
| 1241 | "compaction_strategy_class": "class"} |
no outgoing calls