diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-09-16 12:09:35 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-09-16 12:09:35 +0000 |
commit | 902695800b7a760c138bc84ae982d5c5b826a437 (patch) | |
tree | 121268fec3959566785809c4e095a3b94fea8c53 /Source/SPCustomQuery.m | |
parent | 11f9f5a153ca055e4f104dc6494745e1c4f38518 (diff) | |
download | sequelpro-902695800b7a760c138bc84ae982d5c5b826a437.tar.gz sequelpro-902695800b7a760c138bc84ae982d5c5b826a437.tar.bz2 sequelpro-902695800b7a760c138bc84ae982d5c5b826a437.zip |
• BIT Field Sheet Editor now can handle NULL values
• Field Editor Sheet field name label also displays NOT NULL if set
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r-- | Source/SPCustomQuery.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index 2a805da2..ae1b01c0 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -2262,16 +2262,21 @@ NSString *fieldType = nil; NSUInteger *fieldLength = 0; NSString *fieldEncoding = nil; + BOOL allowNULL = YES; + // Retrieve the column defintion fieldType = [columnDefinition objectForKey:@"type"]; if([columnDefinition objectForKey:@"char_length"]) fieldLength = [[columnDefinition objectForKey:@"char_length"] integerValue]; if([columnDefinition objectForKey:@"charset_name"] && ![[columnDefinition objectForKey:@"charset_name"] isEqualToString:@"binary"]) fieldEncoding = [columnDefinition objectForKey:@"charset_name"]; + if([columnDefinition objectForKey:@"null"]) + allowNULL = (![[columnDefinition objectForKey:@"null"] integerValue]); [fieldEditor setTextMaxLength:fieldLength]; [fieldEditor setFieldType:(fieldType==nil) ? @"" : fieldType]; [fieldEditor setFieldEncoding:(fieldEncoding==nil) ? @"" : fieldEncoding]; + [fieldEditor setAllowNULL:allowNULL]; id originalData = [resultData cellDataAtRow:rowIndex column:[[aTableColumn identifier] integerValue]]; if ([originalData isNSNull]) originalData = [prefs objectForKey:SPNullValue]; |