aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index e4fe9dc2..dcc56525 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -1669,9 +1669,13 @@
} else if ([[column objectForKey:@"default"] isEqualToString:@""]
&& ![[column objectForKey:@"null"] boolValue]
&& ([[column objectForKey:@"typegrouping"] isEqualToString:@"float"]
- || [[column objectForKey:@"typegrouping"] isEqualToString:@"integer"]))
+ || [[column objectForKey:@"typegrouping"] isEqualToString:@"integer"]
+ || [[column objectForKey:@"typegrouping"] isEqualToString:@"bit"]))
{
[newRow addObject:@"0"];
+ } else if ([[column objectForKey:@"typegrouping"] isEqualToString:@"bit"] && [[column objectForKey:@"default"] hasPrefix:@"b'"] && [(NSString*)[column objectForKey:@"default"] length] > 3) {
+ // remove leading b' and final '
+ [newRow addObject:[[[column objectForKey:@"default"] substringFromIndex:2] substringToIndex:[(NSString*)[column objectForKey:@"default"] length]-3]];
} else {
[newRow addObject:[column objectForKey:@"default"]];
}