diff options
author | rowanbeentje <rowan@beent.je> | 2009-07-09 23:43:50 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-07-09 23:43:50 +0000 |
commit | 8b79c6ae1d19532932aace89d58bf9e0bc326029 (patch) | |
tree | 89dbdfa724c18465cb662ca79b5659aa55850e68 | |
parent | 98cbee9825fc5711fcb228b4ab24a3729b409358 (diff) | |
download | sequelpro-8b79c6ae1d19532932aace89d58bf9e0bc326029.tar.gz sequelpro-8b79c6ae1d19532932aace89d58bf9e0bc326029.tar.bz2 sequelpro-8b79c6ae1d19532932aace89d58bf9e0bc326029.zip |
- Add support for the function "NOW()" to resolve Issue #300
-rw-r--r-- | Source/TableContent.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m index 11c09525..61499351 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1540,6 +1540,9 @@ [rowValue setString:@"CURRENT_TIMESTAMP"]; } else if ([[NSArrayObjectAtIndex(theColumns, i) objectForKey:@"typegrouping"] isEqualToString:@"bit"]) { [rowValue setString:((![[rowObject description] length] || [[rowObject description] isEqualToString:@"0"])?@"0":@"1")]; + } else if ([[NSArrayObjectAtIndex(theColumns, i) objectForKey:@"typegrouping"] isEqualToString:@"date"] + && [[rowObject description] isEqualToString:@"NOW()"]) { + [rowValue setString:@"NOW()"]; } else { [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:[rowObject description]]]]; } |