diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-06-22 07:28:47 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-06-22 07:28:47 +0000 |
commit | fab8a7ddf951ed3697760093b43a612fa51a78c6 (patch) | |
tree | a50ea949cda8399b8dd5c1bec25f43d23bfdc864 /Source/CMMCPResult.m | |
parent | 859ca6771c479475ed454a4dbc61131fad30b492 (diff) | |
download | sequelpro-fab8a7ddf951ed3697760093b43a612fa51a78c6.tar.gz sequelpro-fab8a7ddf951ed3697760093b43a612fa51a78c6.tar.bz2 sequelpro-fab8a7ddf951ed3697760093b43a612fa51a78c6.zip |
• first steps to synchronize CustomQuery table and ContentTable
- CustomQuery table now allows to copy selected rows as SQL INSERT (table name is set to "<table>"
- if a field is a blob display only the first 255 bytes/chars in the CQ table for speed reasons
- blob fields in CQ does not listen to the pref setting for "LoadBlobsAsNeeded" because it could happen that no one-to-one relation to their original data will be found
Diffstat (limited to 'Source/CMMCPResult.m')
-rw-r--r-- | Source/CMMCPResult.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/CMMCPResult.m b/Source/CMMCPResult.m index ebc5c6ab..afc7c2ed 100644 --- a/Source/CMMCPResult.m +++ b/Source/CMMCPResult.m @@ -370,7 +370,7 @@ modified version for use with sequel-pro /* Div flags */ [fieldStructure setObject:[NSNumber numberWithUnsignedInt:theField[i].flags] forKey:@"flags"]; - [fieldStructure setObject:[NSNumber numberWithBool:(theField[i].flags & NOT_NULL_FLAG) ? YES : NO] forKey:@"NOT_NULL_FLAG"]; + [fieldStructure setObject:[NSNumber numberWithBool:(theField[i].flags & NOT_NULL_FLAG) ? YES : NO] forKey:@"null"]; [fieldStructure setObject:[NSNumber numberWithBool:(theField[i].flags & PRI_KEY_FLAG) ? YES : NO] forKey:@"PRI_KEY_FLAG"]; [fieldStructure setObject:[NSNumber numberWithBool:(theField[i].flags & UNIQUE_KEY_FLAG) ? YES : NO] forKey:@"UNIQUE_KEY_FLAG"]; [fieldStructure setObject:[NSNumber numberWithBool:(theField[i].flags & MULTIPLE_KEY_FLAG) ? YES : NO] forKey:@"MULTIPLE_KEY_FLAG"]; @@ -423,6 +423,7 @@ modified version for use with sequel-pro { // BOOL isUnsigned = (flags & UNSIGNED_FLAG) != 0; // BOOL isZerofill = (flags & ZEROFILL_FLAG) != 0; + switch (type) { case FIELD_TYPE_BIT: return @"BIT"; @@ -473,7 +474,14 @@ modified version for use with sequel-pro case 16777215: return isBlob? @"MEDIUMBLOB":@"MEDIUMTEXT"; case 4294967295: return isBlob? @"LONGBLOB":@"LONGTEXT"; default: - return @"UNKNOWN"; + switch (length) { + case 255: return isBlob? @"TINYBLOB":@"TINYTEXT"; + case 65535: return isBlob? @"BLOB":@"TEXT"; + case 16777215: return isBlob? @"MEDIUMBLOB":@"MEDIUMTEXT"; + case 4294967295: return isBlob? @"LONGBLOB":@"LONGTEXT"; + default: + return @"UNKNOWN"; + } } } case MYSQL_TYPE_VAR_STRING: |