Quote index name in cql string where necessary
This commit is contained in:
		| @@ -1336,14 +1336,14 @@ class IndexMetadata(object): | |||||||
|         index_target = options.pop("target") |         index_target = options.pop("target") | ||||||
|         if self.kind != "CUSTOM": |         if self.kind != "CUSTOM": | ||||||
|             return "CREATE INDEX %s ON %s.%s (%s)" % ( |             return "CREATE INDEX %s ON %s.%s (%s)" % ( | ||||||
|                 self.name,  # Cassandra doesn't like quoted index names for some reason |                 protect_name(self.name), | ||||||
|                 protect_name(self.keyspace_name), |                 protect_name(self.keyspace_name), | ||||||
|                 protect_name(self.table_name), |                 protect_name(self.table_name), | ||||||
|                 index_target) |                 index_target) | ||||||
|         else: |         else: | ||||||
|             class_name = options.pop("class_name") |             class_name = options.pop("class_name") | ||||||
|             ret = "CREATE CUSTOM INDEX %s ON %s.%s (%s) USING '%s'" % ( |             ret = "CREATE CUSTOM INDEX %s ON %s.%s (%s) USING '%s'" % ( | ||||||
|                 self.name,  # Cassandra doesn't like quoted index names for some reason |                 protect_name(self.name), | ||||||
|                 protect_name(self.keyspace_name), |                 protect_name(self.keyspace_name), | ||||||
|                 protect_name(self.table_name), |                 protect_name(self.table_name), | ||||||
|                 index_target, |                 index_target, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Sam Tunnicliffe
					Sam Tunnicliffe