Re: [Mysql-cocoa-users] MCPQuery
Brought to you by:
sergecohen
From: Aaron J. <aj...@ed...> - 2004-08-13 22:51:53
|
Sounds like an interesting idea. Based on your method declarations, this seems to really just be a collection of functions - there's nothing object oriented about it. I recommend making this into an actual object, and modifying the SMySQL methods to take MCPQuery objects instead of NSStrings. That might open up some more interesting possibilities. Aaron On Aug 13, 2004, at 4:39 PM, Camille GOUREAU-SUIGNARD wrote: > Hi, > > I've created (part of) a classe I called MCPQuery. > It provides me query (NSString*) when feeded with information. > Has one of you already worked on such a thing ? > Is it a non sense ? > Is there a better way to avoid re-writing the sames lines of code ? > > Here are the functions I implemented : > > + (NSString*) selectQueryWithSelect: (NSDictionary*) fields andWhere: > (NSString*) where ; > // returns a "select from xhere" string with the fields extracted > from fields and the from also > + (NSString*) fromStringWithFields: (NSDictionary*) fields ; > + (NSString*) queryEmptyInsertInTable: (NSString*) table ; > + (NSString*) queryShowColumnsFromTable: (NSString*) table ; > + (NSString*) queryUpdateFields: (NSDictionary*) fields inTable: > (NSString*) table where: (NSString*) where ; > + (NSString*) queryInsertFields: (NSDictionary*) fields inTable: > (NSString*) table ; > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users |