From 869e355e7f4856dee3171520f549e32855f68dc5 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sat, 9 Oct 2010 00:24:33 +0000 Subject: =?UTF-8?q?=E2=80=A2=20display=20SPA=20in=20the=20Key=20column=20i?= =?UTF-8?q?f=20a=20field=20has=20a=20spatial=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Question: Is it possible to assign an index to a geometry field other than SPATIAL? --- Source/SPTableStructure.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 51f2e458..a51fa12e 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -209,7 +209,10 @@ if([[theIndex objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"]) [field setObject:@"PRI" forKey:@"Key"]; else - [field setObject:(([[theIndex objectForKey:@"Non_unique"] isEqualToString:@"1"]) ? @"MUL" : @"UNI") forKey:@"Key"]; + if([[field objectForKey:@"typegrouping"] isEqualToString:@"geometry"]) + [field setObject:@"SPA" forKey:@"Key"]; + else + [field setObject:(([[theIndex objectForKey:@"Non_unique"] isEqualToString:@"1"]) ? @"MUL" : @"UNI") forKey:@"Key"]; break; } } -- cgit v1.2.3