(cls, formatted, clustering_key, options_map, is_compact_storage=False)
| 1398 | |
| 1399 | @classmethod |
| 1400 | def _property_string(cls, formatted, clustering_key, options_map, is_compact_storage=False): |
| 1401 | properties = [] |
| 1402 | if is_compact_storage: |
| 1403 | properties.append("COMPACT STORAGE") |
| 1404 | |
| 1405 | if clustering_key: |
| 1406 | cluster_str = "CLUSTERING ORDER BY " |
| 1407 | |
| 1408 | inner = [] |
| 1409 | for col in clustering_key: |
| 1410 | ordering = "DESC" if col.is_reversed else "ASC" |
| 1411 | inner.append("%s %s" % (protect_name(col.name), ordering)) |
| 1412 | |
| 1413 | cluster_str += "(%s)" % ", ".join(inner) |
| 1414 | properties.append(cluster_str) |
| 1415 | |
| 1416 | properties.extend(cls._make_option_strings(options_map)) |
| 1417 | |
| 1418 | join_str = "\n AND " if formatted else " AND " |
| 1419 | return join_str.join(properties) |
| 1420 | |
| 1421 | @classmethod |
| 1422 | def _make_option_strings(cls, options_map): |
no test coverage detected