From 6834e418158c155bc950f2d0a85ddc440d3e6c73 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 11 Apr 2005 18:33:20 +0000 Subject: [PATCH] more renaming git-svn-id: http://svn.opengroupware.org/SOPE/trunk@720 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-gdl1/MySQL4/MySQL4Adaptor.m | 35 +++++---------------- sope-gdl1/MySQL4/MySQL4Context.m | 2 +- sope-gdl1/MySQL4/MySQL4Expression.h | 6 ++-- sope-gdl1/MySQL4/MySQL4Values.h | 6 ++-- sope-gdl1/MySQL4/MySQL4Values.m | 4 +-- sope-gdl1/MySQL4/NSCalendarDate+SQLiteVal.m | 2 +- sope-gdl1/MySQL4/NSData+SQLiteVal.m | 4 +-- sope-gdl1/MySQL4/NSNumber+SQLiteVal.m | 2 +- sope-gdl1/MySQL4/NSString+SQLiteVal.m | 2 +- sope-gdl1/MySQL4/common.h | 8 ++--- sope-gdl1/MySQL4/gdltest.m | 4 +-- 11 files changed, 27 insertions(+), 48 deletions(-) diff --git a/sope-gdl1/MySQL4/MySQL4Adaptor.m b/sope-gdl1/MySQL4/MySQL4Adaptor.m index d444574f..bc2441ae 100644 --- a/sope-gdl1/MySQL4/MySQL4Adaptor.m +++ b/sope-gdl1/MySQL4/MySQL4Adaptor.m @@ -23,36 +23,15 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#import "common.h" -#import "MySQL4Adaptor.h" -#import "MySQL4Context.h" -#import "MySQL4Channel.h" -#import "MySQL4Expression.h" -#import "MySQL4Values.h" +#include "MySQL4Adaptor.h" +#include "MySQL4Context.h" +#include "MySQL4Channel.h" +#include "MySQL4Expression.h" +#include "MySQL4Values.h" +#include "common.h" @implementation MySQL4Adaptor -- (NSDictionary *)connectionDictionaryForNSURL:(NSURL *)_url { - /* - "Database URLs" - - We use the schema: - MySQL43://localhost/dbpath/foldername - */ - NSMutableDictionary *md; - NSString *p; - - if ((p = [_url path]) == nil) - return nil; - - p = [p stringByDeletingLastPathComponent]; - if ([p length] == 0) p = [_url path]; - - md = [NSMutableDictionary dictionaryWithCapacity:8]; - [md setObject:p forKey:@"databaseName"]; - return md; -} - - (id)initWithName:(NSString *)_name { if ((self = [super initWithName:_name])) { } @@ -116,7 +95,7 @@ - (id)formatValue:(id)value forAttribute:(EOAttribute *)attribute { NSString *result; - result = [value stringValueForMySQL43Type:[attribute externalType] + result = [value stringValueForMySQL4Type:[attribute externalType] attribute:attribute]; //NSLog(@"formatting value %@ result %@", value, result); diff --git a/sope-gdl1/MySQL4/MySQL4Context.m b/sope-gdl1/MySQL4/MySQL4Context.m index da3404b8..73a41a71 100644 --- a/sope-gdl1/MySQL4/MySQL4Context.m +++ b/sope-gdl1/MySQL4/MySQL4Context.m @@ -32,7 +32,7 @@ - (void)channelDidInit:_channel { if ([channels count] > 0) { [NSException raise:@"TooManyOpenChannelsException" - format:@"MySQL43 only supports one channel per context"]; + format:@"MySQL4 only supports one channel per context"]; } [super channelDidInit:_channel]; } diff --git a/sope-gdl1/MySQL4/MySQL4Expression.h b/sope-gdl1/MySQL4/MySQL4Expression.h index 9c987c5f..355a84e8 100644 --- a/sope-gdl1/MySQL4/MySQL4Expression.h +++ b/sope-gdl1/MySQL4/MySQL4Expression.h @@ -23,8 +23,8 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef ___MySQL43_SQLExpression_H___ -#define ___MySQL43_SQLExpression_H___ +#ifndef ___MySQL4_SQLExpression_H___ +#define ___MySQL4_SQLExpression_H___ #include @@ -52,4 +52,4 @@ @end -#endif /* ___MySQL43_SQLExpression_H___ */ +#endif /* ___MySQL4_SQLExpression_H___ */ diff --git a/sope-gdl1/MySQL4/MySQL4Values.h b/sope-gdl1/MySQL4/MySQL4Values.h index e6d82667..ba884e7b 100644 --- a/sope-gdl1/MySQL4/MySQL4Values.h +++ b/sope-gdl1/MySQL4/MySQL4Values.h @@ -40,14 +40,14 @@ - (id)initWithObject:(id)_obj forAttribute:(EOAttribute *)_attr - andMySQL43Type:(NSString *)_dt + andMySQL4Type:(NSString *)_dt inChannel:(MySQL4Channel *)_channel; @end @protocol MySQL4Values -- (NSString *)stringValueForMySQL43Type:(NSString *)_type +- (NSString *)stringValueForMySQL4Type:(NSString *)_type attribute:(EOAttribute *)_attribute; @end @@ -75,7 +75,7 @@ @interface EONull(MySQL4Values) -- (NSString *)stringValueForMySQL43Type:(NSString *)_type +- (NSString *)stringValueForMySQL4Type:(NSString *)_type attribute:(EOAttribute *)_attribute; @end diff --git a/sope-gdl1/MySQL4/MySQL4Values.m b/sope-gdl1/MySQL4/MySQL4Values.m index b988d581..15a60008 100644 --- a/sope-gdl1/MySQL4/MySQL4Values.m +++ b/sope-gdl1/MySQL4/MySQL4Values.m @@ -30,7 +30,7 @@ - (id)initWithObject:(id)_obj forAttribute:(EOAttribute *)_attr - andMySQL43Type:(NSString *)_dt + andMySQL4Type:(NSString *)_dt inChannel:(MySQL4Channel *)_channel; { NSDictionary *ui; @@ -62,7 +62,7 @@ @implementation NSNull(MySQL4Values) -- (NSString *)stringValueForMySQL43Type:(NSString *)_type +- (NSString *)stringValueForMySQL4Type:(NSString *)_type attribute:(EOAttribute *)_attribute { return @"null"; diff --git a/sope-gdl1/MySQL4/NSCalendarDate+SQLiteVal.m b/sope-gdl1/MySQL4/NSCalendarDate+SQLiteVal.m index f488ec8d..3f078aed 100644 --- a/sope-gdl1/MySQL4/NSCalendarDate+SQLiteVal.m +++ b/sope-gdl1/MySQL4/NSCalendarDate+SQLiteVal.m @@ -161,7 +161,7 @@ static NSTimeZone *gmt02 = nil; /* generating value */ -- (NSString *)stringValueForMySQL43Type:(NSString *)_type +- (NSString *)stringValueForMySQL4Type:(NSString *)_type attribute:(EOAttribute *)_attribute { #if 0 diff --git a/sope-gdl1/MySQL4/NSData+SQLiteVal.m b/sope-gdl1/MySQL4/NSData+SQLiteVal.m index ab944efc..42795d26 100644 --- a/sope-gdl1/MySQL4/NSData+SQLiteVal.m +++ b/sope-gdl1/MySQL4/NSData+SQLiteVal.m @@ -43,7 +43,7 @@ return [self initWithBytes:_value length:_length]; } -- (NSString *)stringValueForMySQL43Type:(NSString *)_type +- (NSString *)stringValueForMySQL4Type:(NSString *)_type attribute:(EOAttribute *)_attribute { // TODO: UNICODE @@ -79,7 +79,7 @@ [t hasPrefix:@"varchar"] || [t hasPrefix:@"money"] || [t hasPrefix:@"text"]) { - t = [[str stringValueForMySQL43Type:_type + t = [[str stringValueForMySQL4Type:_type attribute:_attribute] retain]; [str release]; return [t autorelease]; diff --git a/sope-gdl1/MySQL4/NSNumber+SQLiteVal.m b/sope-gdl1/MySQL4/NSNumber+SQLiteVal.m index 44178592..9fdcdc87 100644 --- a/sope-gdl1/MySQL4/NSNumber+SQLiteVal.m +++ b/sope-gdl1/MySQL4/NSNumber+SQLiteVal.m @@ -53,7 +53,7 @@ return nil; } -- (NSString *)stringValueForMySQL43Type:(NSString *)_type +- (NSString *)stringValueForMySQL4Type:(NSString *)_type attribute:(EOAttribute *)_attribute { // TODO: can we avoid the lowercaseString? diff --git a/sope-gdl1/MySQL4/NSString+SQLiteVal.m b/sope-gdl1/MySQL4/NSString+SQLiteVal.m index 5ee6b089..479713f7 100644 --- a/sope-gdl1/MySQL4/NSString+SQLiteVal.m +++ b/sope-gdl1/MySQL4/NSString+SQLiteVal.m @@ -58,7 +58,7 @@ static Class EOExprClass = Nil; /* generate SQL value */ -- (NSString *)stringValueForMySQL43Type:(NSString *)_type +- (NSString *)stringValueForMySQL4Type:(NSString *)_type attribute:(EOAttribute *)_attribute { // TODO: all this looks slow ... diff --git a/sope-gdl1/MySQL4/common.h b/sope-gdl1/MySQL4/common.h index 93c6a5cd..8b088d6a 100644 --- a/sope-gdl1/MySQL4/common.h +++ b/sope-gdl1/MySQL4/common.h @@ -5,7 +5,7 @@ Author: Helge Hess (helge@mdlink.de) - This file is part of the MySQL43 Adaptor Library + This file is part of the MySQL4 Adaptor Library This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -23,8 +23,8 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef ___MySQL43_common_H___ -#define ___MySQL43_common_H___ +#ifndef ___MySQL4_common_H___ +#define ___MySQL4_common_H___ #import @@ -37,4 +37,4 @@ #include #include -#endif /* ___MySQL43_common_H___ */ +#endif /* ___MySQL4_common_H___ */ diff --git a/sope-gdl1/MySQL4/gdltest.m b/sope-gdl1/MySQL4/gdltest.m index d38ef33e..fc45df3c 100644 --- a/sope-gdl1/MySQL4/gdltest.m +++ b/sope-gdl1/MySQL4/gdltest.m @@ -170,8 +170,8 @@ static void runtest(void) { conDict = [NSDictionary dictionaryWithContentsOfFile:@"condict.plist"]; NSLog(@"condict is %@", conDict); - if ((a = [EOAdaptor adaptorWithName:@"MySQL43"]) == nil) { - NSLog(@"found no MySQL43 adaptor .."); + if ((a = [EOAdaptor adaptorWithName:@"MySQL4"]) == nil) { + NSLog(@"found no MySQL4 adaptor .."); exit(1); } -- 2.39.5