aboutsummaryrefslogtreecommitdiffstats
path: root/Source
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
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')
-rw-r--r--Source/SPCustomQuery.m5
-rw-r--r--Source/SPTableContent.m5
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 961ae6e9..6818dd7f 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -1731,11 +1731,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]];
}
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]];
}