From: helge Date: Thu, 21 Apr 2005 14:29:33 +0000 (+0000) Subject: fixed makefile for MySQL 3.x, improved -describeResults: X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49aa17b97570d756fdd6721e05f9c4f551d83837;p=sope fixed makefile for MySQL 3.x, improved -describeResults: git-svn-id: http://svn.opengroupware.org/SOPE/trunk@748 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-gdl1/MySQL/ChangeLog b/sope-gdl1/MySQL/ChangeLog index 846b4f3e..8daf1b9e 100644 --- a/sope-gdl1/MySQL/ChangeLog +++ b/sope-gdl1/MySQL/ChangeLog @@ -1,3 +1,13 @@ +2005-04-21 Helge Hess + + * v4.5.9 + + * GNUmakefile.preamble: use mysql_config --cflags instead of --include, + the former is also available with MySQL 3.x + + * MySQL4Channel.m: added a -describeResults: method to allow + descriptions without beautified names + 2005-04-20 Helge Hess * MySQL4Channel.m: only warn if the character set could not be changed diff --git a/sope-gdl1/MySQL/GNUmakefile.preamble b/sope-gdl1/MySQL/GNUmakefile.preamble index cd5aae3e..d1fa4223 100644 --- a/sope-gdl1/MySQL/GNUmakefile.preamble +++ b/sope-gdl1/MySQL/GNUmakefile.preamble @@ -38,9 +38,9 @@ gdltest_TOOL_LIBS += \ # set compile flags and go -ADDITIONAL_INCLUDE_DIRS += \ - -I.. -I../.. \ - `mysql_config --include` +ADDITIONAL_CFLAGS += `mysql_config --cflags` + +ADDITIONAL_INCLUDE_DIRS += -I.. -I../.. ADDITIONAL_LIB_DIRS += \ -L../GDLAccess/$(GNUSTEP_OBJ_DIR) diff --git a/sope-gdl1/MySQL/MySQL4Channel.m b/sope-gdl1/MySQL/MySQL4Channel.m index 519c74ed..24b39f12 100644 --- a/sope-gdl1/MySQL/MySQL4Channel.m +++ b/sope-gdl1/MySQL/MySQL4Channel.m @@ -252,7 +252,7 @@ static int openConnectionCount = 0; return self->fields; } -- (NSArray *)describeResults { +- (NSArray *)describeResults:(BOOL)_beautifyNames { // TODO: make exception-less method MYSQL_FIELD *mfields; int cnt; @@ -283,7 +283,9 @@ static int openConnectionCount = 0; NSString *attrName = nil; columnName = [NSString stringWithUTF8String:mfields[cnt].name]; - attrName = [columnName _mySQL4ModelMakeInstanceVarName]; + attrName = _beautifyNames + ? [columnName _mySQL4ModelMakeInstanceVarName] + : columnName; if ([[usedNames objectForKey:attrName] boolValue]) { int cnt2 = 0; @@ -428,6 +430,9 @@ static int openConnectionCount = 0; return [result autorelease]; } +- (NSArray *)describeResults { + return [self describeResults:NO]; +} - (NSMutableDictionary *)primaryFetchAttributes:(NSArray *)_attributes withZone:(NSZone *)_zone diff --git a/sope-gdl1/MySQL/Version b/sope-gdl1/MySQL/Version index edfa2d83..b191a15e 100644 --- a/sope-gdl1/MySQL/Version +++ b/sope-gdl1/MySQL/Version @@ -1,3 +1,3 @@ # Version file -SUBMINOR_VERSION:=8 +SUBMINOR_VERSION:=9