diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-09-14 11:01:25 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-09-14 11:01:25 +0000 |
commit | f1b326a1f2593115fb9542b4488c3c3691220aab (patch) | |
tree | ba9ad53261477cabeb58877f7c9aee8acd865efa /Source | |
parent | bb49744fddd9d590b298c1d14fb62f5805edca13 (diff) | |
download | sequelpro-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.m | 5 | ||||
-rw-r--r-- | Source/SPTableContent.m | 5 |
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]]; } |