aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-09-14 11:01:25 +0000
committerBibiko <bibiko@eva.mpg.de>2010-09-14 11:01:25 +0000
commitf1b326a1f2593115fb9542b4488c3c3691220aab (patch)
treeba9ad53261477cabeb58877f7c9aee8acd865efa /Source/SPTableContent.m
parentbb49744fddd9d590b298c1d14fb62f5805edca13 (diff)
downloadsequelpro-f1b326a1f2593115fb9542b4488c3c3691220aab.tar.gz
sequelpro-f1b326a1f2593115fb9542b4488c3c3691220aab.tar.bz2
sequelpro-f1b326a1f2593115fb9542b4488c3c3691220aab.zip
• (re?)enabled BIT field editing esp. for field types like BIT(9) or BIT(63) since the old _int2bin routine didn't work because we're dealing with a char* containing bytes if BIT(>8)
- also for views and CustomQuery editing • started to clean up (VAR)BINARY editing (work in progress)
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 3285dc0f..92b9ad15 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -1420,11 +1420,14 @@
[fieldIDQueryStr appendFormat:@"%@='%@' AND ", [[field objectForKey:@"org_name"] backtickQuotedString], [mySQLConnection prepareString:aValue]];
}
}
- else if ([[field objectForKey:@"typegrouping"] isEqualToString:@"blobdata"] || [[field objectForKey:@"type"] isEqualToString:@"BINARY"]) {
+ else if ([[field objectForKey:@"typegrouping"] isEqualToString:@"blobdata"] || [[field objectForKey:@"type"] isEqualToString:@"BINARY"] || [[field objectForKey:@"type"] isEqualToString:@"VARBINARY"]) {
if(includeBlobs) {
[fieldIDQueryStr appendFormat:@"%@=X'%@' AND ", [[field objectForKey:@"org_name"] backtickQuotedString], [mySQLConnection prepareBinaryData:aValue]];
}
}
+ else if ([[field objectForKey:@"typegrouping"] isEqualToString:@"bit"]) {
+ [fieldIDQueryStr appendFormat:@"%@=b'%@' AND ", [[field objectForKey:@"org_name"] backtickQuotedString], [aValue description]];
+ }
else if ([[field objectForKey:@"typegrouping"] isEqualToString:@"integer"]) {
[fieldIDQueryStr appendFormat:@"%@=%@ AND ", [[field objectForKey:@"org_name"] backtickQuotedString], [aValue description]];
}