Re: [Mysql-cocoa-users] (no subject)
Brought to you by:
sergecohen
From: Bertrand M. <bma...@wa...> - 2002-05-28 11:51:18
|
le 28/05/02 13:26, Serge Cohen =E0 co...@em... a =E9crit=A0: > Hi; >=20 >=20 >=20 > Indeed I'm sorry to answer that late to both Bertrand and you. >=20 > I definetly agrees with the maintenance problem of having two method > doing nearly the same things. In the mean time I'm coming from C, C++ > and I think typing object is really important to have readable code, so > I'd like to think a bit of all the pros and cons for the propositions > you've made, and give a definitive answer in a couple of days. Take your time, there's no hurry. :-) > About the "Fast query methods". I agree that they can be of great use > for fast programming, in the mean time the idea of an object is to have > the "proper" interface: not to small, but not clutered by a lot of > redundant method. Maybee we can put these in a category, so that the > class interface by itself is limited to the functionalyties of the C API > we rely on. > What do you think of this choice? A category would be fine for me. > For the method returning every things as string, the point is that you > might want a special format from one user to the other, so how would you > pass this kind of arguments to the function? > The solution I think about would something like a Dictionary (or Array) > containing the format for each column, but then again do you gain much? This looks a bit difficult and I don't know if it will be used a lot. I see there is a stringValue method in NSNumber and an intValue in NSString= . Most of the time, you know what your field type is, and if not, you can always check with fetchTypesAsDictionary of SMySQLResult. It isn't complex to convert from int to NSString on a per field basis but it will probably require a lot of test to create a general translation method. Don't you think ? Anyway, feel free to add it if you really need it. > Serge. >=20 >=20 >=20 > NB: I'm very happy to get new ideas and comments for the SMySQL > framework here. I might be a bit slow to answer from time to time; this > is only due to the limited amount of time I can spend on this project > (I'm writing my PhD in Biology for the moment). So PLEASE, don't be > discouraged by my delayed answer. No worries. Take care, Bertrand Mansion Mamasam PS : I don't know why, but I always receive you messages with 2 newlines instead of just one as usual. This makes reading them uncomfortable. It probably comes from the settings of your mail client ? Just to let you know... |