mysql-cocoa-users Mailing List for MySQL Objective C API for Cocoa (Page 13)
Brought to you by:
sergecohen
You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
|
Mar
(14) |
Apr
(5) |
May
(23) |
Jun
(8) |
Jul
(13) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(11) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(9) |
Feb
(6) |
Mar
(13) |
Apr
(2) |
May
(3) |
Jun
|
Jul
(5) |
Aug
(11) |
Sep
(18) |
Oct
(1) |
Nov
(15) |
Dec
(2) |
2004 |
Jan
(3) |
Feb
(3) |
Mar
(8) |
Apr
(1) |
May
(2) |
Jun
(3) |
Jul
(15) |
Aug
(36) |
Sep
(5) |
Oct
|
Nov
(6) |
Dec
(2) |
2005 |
Jan
(1) |
Feb
(11) |
Mar
(1) |
Apr
(6) |
May
|
Jun
(7) |
Jul
(3) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
(9) |
Feb
(5) |
Mar
(2) |
Apr
(1) |
May
(9) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
2007 |
Jan
(23) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bertrand M. <bma...@wa...> - 2002-06-04 10:26:22
|
le 3/06/02 17:26, Serge Cohen =E0 co...@em... a =E9crit=A0: > As I'm spending more and more time on the development of the framework > and I still have to do my every day work; I don't manage to keep the > website up to date any more. >=20 > I'd be glade if any body volounteer to maintain the web site. >=20 > The site is under CVS. It might need a better design (which I don't > think so, but I would not be against if you want so). > If any body feel like he can do it, let me know (and again, I will > definitly give all the help needed for you to get started and keep you > inform about the general things to add). Hi Serge, I will have a look at it but I am also very very busy. Could you tell me where I can find the sources of the site. Thanks. I did not have time to check the version 2 but I will as soon as I can. Bertrand Mansion Mamasam |
From: Serge C. <co...@em...> - 2002-06-04 09:49:53
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Mario;=0D =0D First of all, Yes I still support the SMySQL framework, indeed it still =0D= under fast development (whatever fast can mean when there is only one =0D= part time developer), and I encourage you to check for new updates =0D regularly.=0D =0D The point here is what you really want to have. If you need the =0D framework to work from within an application bundle, you then don't have = =0D to follow the instruction from the TO_INSTALL file. These instruction =0D= are reserved for if you want to install the framework in a "global" way =0D= (in your ~/Library/Frameworks folder), interesting for foundation tools =0D= mainly.=0D =0D Again, if you are developing Cocoa (application bundle), just make the =0D= SMySQL_fully_embeded target with one of the Emb... buildstyle. Then you =0D= should add a copy phase in your applicaiton target which will copy the =0D= framework to the application bundle Frameworks folder.=0D =0D The problem for the moment is that the installation documentation is =0D largely outdated.=0D =0D Hope thi will help.=0D =0D Serge.=0D =0D PS: I'll forward this mail to the user list, it can be of interest to =0D= some one else (and even some one may have a better answer -at least =0D explanation-)=0D PPS: If you want the framework in your ~/Library/Frameworks folder, and =0D= you still have this problem, tell me exactly which commands you = issued...=0D =0D Le mardi 4 juin 2002, =C3=A0 12:24 AM, Mario Scarpa a =C3=A9crit :=0D =0D > Hi Serge,=0D >=0D > was looking for a Framework around the MySQL C API and got your name=0D= > and your SMySQL. I followed the instructions to buil MySQL libs and it = =0D > all=0D > went fine but trying to install the Framework as reported by the =0D > TOINSTALL=0D > file, got this error (which, BTW, you seem to have had too ;-)):=0D >=0D > ld: common symbols not allowed with MH_DYLIB output format=0D > /usr/local/lib/mysql/libmysqlclient.a(my_error.o) definition of common = =0D > _errbuff (size 512)=0D > /usr/bin/libtool: internal link edit command failed=0D > ...failed DynamicLibrary.LinkUsingFileList =0D > /Users/mario/Desktop/SMySQL/build/SMySQL.framework/Versions/A/SMySQL = ...=0D > ** BUILD FAILED **=0D >=0D > Did you find a way around it ? It SMySQL still supported or you = suggest =0D > something=0D > else ?=0D >=0D > Thanks for your work and for your answer.=0D >=0D > Cheers.=0D > Mario.=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE8/I3zMygj1Wmx00YRAsCIAJ41N0fBDjCJY+UAh0Kyigkm12AhPACfXjAz zaXujMq+M+n85RRqkZ1MLuw=3D =3DAfaT -----END PGP SIGNATURE----- |
From: Serge C. <co...@em...> - 2002-06-03 15:23:55
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi again; As I'm spending more and more time on the development of the framework and I still have to do my every day work; I don't manage to keep the website up to date any more. I'd be glade if any body volounteer to maintain the web site. The site is under CVS. It might need a better design (which I don't think so, but I would not be against if you want so). If any body feel like he can do it, let me know (and again, I will definitly give all the help needed for you to get started and keep you inform about the general things to add). Thanks to any volounter. Serge. PS: On top of every things, this would enhance greatly the quality of the English used on the site. PPS: The difference between maintainer and manager is up to candidates, I will adapt. - ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 - ---------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE8+4rCMygj1Wmx00YRApU8AKCHJOZKXYS7W4ayDgXg66dADwsTOQCfQVNh lj1VhWdLjmb0sH2Ka2miObI= =WouM -----END PGP SIGNATURE----- |
From: Serge C. <co...@em...> - 2002-06-03 14:52:27
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear Users; I've just made a branch on CVS, it's called version-2 and contains a lot of new features, mainly the one which have been proposed and discussed onthis list. There is no downloadable packages yet (only CVS), because I did not have time to test it (except the SMySQL_Test tool, which does not test most of the new features). The new features are mainly (describe in TO_DO of the version-2 project): ++++++++++ 1. The prefix has been changed to the shorter MCP (for MySQL Cocoa Project). 2. Handling NULL fields: - - Create a "MCPNSNull" category for NSObject with only one method : isNSNull (Being able to check if any object returned by SMySQL is a NSNull) 3. MCPResult: Centralising the field type recognition and filling of proper objects: - - A single method doing the work : fetchRowAsType:(MCPReturnType) aType; - - Wrapper for getting rows as Dictionnary or Array. - - Again with fetchTypesAsType: (MCPReturnType) aType; + wrappers 4.Making a category for additional (optional) methods (MCPResultPlus): - - Getting a single column: - (NSArray *) fetchColAtIndex:(unsigned int) aCol; - (NSArray *) fetchColWithName:(NSString *) aColName; (Wrapping the previous one) - - Adding bidimensional array data retrieval (in a Category?) 5.MCPConnection Making a category to add some useful (but not mandatory) features (MCPFastQueries): - - (id) getFirstFieldFromQuery:(NSString *) query; (Frist column of first row of the result) - - (id) getFirstRowFromQuery:(NSString *) query asType:(MCPReturnType) aType; (obvious) - - (NSArray *) getAllRowsFromQuery:(NSString *) query asType:(MCPReturnType) aType; (using 2D possibility of MCPResult) - - (NSArray *) getQuery:(NSString *) query colWithIndex:(unsigned int) aCol; (Getting a single column form the query) - - (NSArray *) getQuery:(NSString *) query colWithName:(NSString *) aColName; ++++++++++ It would be great if some of you can test it (even better modify SMySQL_Test coming with it to do these tests) and give me feed back about the way the framework works. Once this is done, I'll do a release, most likely 2.0.0 In the mean time I'm jst going to correct the version 0.7.0 to take of the NULL Field bug. I will then pomote it to version 1.0.0 Looking forward to read many comments. Serge. - ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 - ---------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE8+4NQMygj1Wmx00YRAi0rAJ9SMtnePd/gJZB7R1mg49AHiGx4xQCeJ6KE LK9d0yeilNmAGGna7yzDSow= =TZap -----END PGP SIGNATURE----- |
From: Bertrand M. <bma...@wa...> - 2002-06-03 08:59:10
|
le 28/05/02 13:37, Serge Cohen =E0 co...@em... a =E9crit=A0: > Hi; >=20 > We just solved the problem from Jerome Rabas: It comes from the fact > that the result he is having contain some field which are NULL. > Obviously the framework doesn't support that because it then make a nil > object and tries to add it to the returned NSArray or NSDictionary which > is returned for every row. >=20 > As you might now this collections object (array, dictionary...) does not > support nil pointers as object. One easy solution would be for me to > replace that par an empty string, or null number... but that CHANGES the > information contained in the DB, for which NULL is not the same as empty > string (for example); so using solution would remove the difference. >=20 > The only solution I can think of so far is to make a NULL object, only a > child of NSObject which doesn't have any instance variables, and only a > - -description method (returning @"NULL"). I'm not sure that's a good > solution. >=20 > Any one have a better idea? Hi Serge, Hope you had a nice weekend. I thought about the null thing and there might be another solution if you use [NSNull null]. See: http://developer.apple.com/techpubs/macosx/Cocoa/Reference/Foundation/ObjC_= c lassic/Classes/NSNull.html Tell me how it goes. Bertrand Mansion Mamasam |
From: Bertrand M. <bma...@wa...> - 2002-05-28 12:14:35
|
le 28/05/02 13:37, Serge Cohen =E0 co...@em... a =E9crit=A0: > Hi; >=20 > We just solved the problem from Jerome Rabas: It comes from the fact > that the result he is having contain some field which are NULL. > Obviously the framework doesn't support that because it then make a nil > object and tries to add it to the returned NSArray or NSDictionary which > is returned for every row. >=20 > As you might now this collections object (array, dictionary...) does not > support nil pointers as object. One easy solution would be for me to > replace that par an empty string, or null number... but that CHANGES the > information contained in the DB, for which NULL is not the same as empty > string (for example); so using solution would remove the difference. >=20 > The only solution I can think of so far is to make a NULL object, only a > child of NSObject which doesn't have any instance variables, and only a > - -description method (returning @"NULL"). I'm not sure that's a good > solution. >=20 > Any one have a better idea? Not me, IMHO this is the best solution but I am not 100% sure. Bertrand Mansion Mamasam |
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... |
From: Serge C. <co...@em...> - 2002-05-28 11:35:01
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi; We just solved the problem from Jerome Rabas: It comes from the fact that the result he is having contain some field which are NULL. Obviously the framework doesn't support that because it then make a nil object and tries to add it to the returned NSArray or NSDictionary which is returned for every row. As you might now this collections object (array, dictionary...) does not support nil pointers as object. One easy solution would be for me to replace that par an empty string, or null number... but that CHANGES the information contained in the DB, for which NULL is not the same as empty string (for example); so using solution would remove the difference. The only solution I can think of so far is to make a NULL object, only a child of NSObject which doesn't have any instance variables, and only a - -description method (returning @"NULL"). I'm not sure that's a good solution. Any one have a better idea? Thanks in advance. Serge. PS: And thanks to Jerome for the first Bug report on the framework. - ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 - ---------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE882v8Mygj1Wmx00YRAkNtAKCmif1cGR/DEUROjhsr/U0fhCi2TACeLLMy gc7qkoMZQP0vvJdFQgFMtcc= =axno -----END PGP SIGNATURE----- |
From: Serge C. <co...@em...> - 2002-05-28 11:24:05
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi;=0D =0D Indeed I'm sorry to answer that late to both Bertrand and you.=0D =0D I definetly agrees with the maintenance problem of having two method =0D doing nearly the same things. In the mean time I'm coming from C, C++ =0D= and I think typing object is really important to have readable code, so =0D= I'd like to think a bit of all the pros and cons for the propositions =0D= you've made, and give a definitive answer in a couple of days.=0D =0D About the "Fast query methods". I agree that they can be of great use =0D= for fast programming, in the mean time the idea of an object is to have =0D= the "proper" interface: not to small, but not clutered by a lot of =0D redundant method. Maybee we can put these in a category, so that the =0D class interface by itself is limited to the functionalyties of the C API = =0D we rely on.=0D What do you think of this choice?=0D =0D For the method returning every things as string, the point is that you =0D= might want a special format from one user to the other, so how would you = =0D pass this kind of arguments to the function?=0D The solution I think about would something like a Dictionary (or Array) =0D= containing the format for each column, but then again do you gain much?=0D= =0D =0D Serge.=0D =0D NB: I'm very happy to get new ideas and comments for the SMySQL =0D framework here. I might be a bit slow to answer from time to time; this =0D= is only due to the limited amount of time I can spend on this project =0D= (I'm writing my PhD in Biology for the moment). So PLEASE, don't be =0D discouraged by my delayed answer.=0D =0D Le lundi 27 mai 2002, =C3=A0 09:36 , John Guy a =C3=A9crit :=0D =0D > I'd like to add my comments as support to those of Bertrand,=0D >=0D > His proposal to make a single piece of code seems sensible, HOWEVER I =0D= > would add that I think it may make sense to keep the original methods =0D= > and wrap them around the new calls, this would be a benefit to a = novice =0D > user, but would keep compatability with existing C API's.=0D >=0D > I know it is quite simple to add a fetchmode command, but it does tend = =0D > to make code slightly less readable, also in addition I prefer to use =0D= > wrapper classes that return a specified object (NSArray, OR =0D > NSDictionary etc.) so that the compiler can issue warnings that makes =0D= > debugging easier than relying on (id) types - ALTHOUGH I would support = =0D > this wholeheartedly for the generic function.=0D >=0D > I also like the quick queries proposed, and have actually implemented =0D= > something similar within my code to make programming quicker - ie. =0D > simpleQuery() which queries, grabs all and returns.=0D >=0D > I have a possible new request to throw into the pot following some =0D= > work I did last week. I am working on a lightweight content management = =0D > system and have been producing queries that in turn produce additional = =0D > queries. What would be useful for me is to return all my results as = the =0D > strings that are returned in the SQL. For example:=0D >=0D > "SELECT PAGEID, TITLE FROM PAGES" where PAGEID is an INT and TITLE is = a =0D > string. What would be useful is if I can return an NSDictionary object = =0D > that has string objects for both PAGEID and TITLE, since I am simply =0D= > passing the PAGEID back into and SQL query at some point in the = future. =0D > I was browsing the library code and this looks like a case of simply =0D= > skipping the typing process. So maybe this is something else that = could =0D > be built into a generic version of the query code with an extra Fetch =0D= > mode flag (maybe RETURN_MODE)=0D >=0D > anyway just some feedback=0D >=0D > JOhn=0D >=0D > On Friday, May 24, 2002, at 04:19 PM, Bertrand Mansion wrote:=0D >=0D >> Hi serge,=0D >>=0D >> I've had a look at the implementation of fetchRowAsDictionary and=0D >> fetchRowAsArray : they look quite similar and are both quite long due = =0D >> to the=0D >> typing process. This means they are a pain to maintain. I believe = there=0D >> could be some code reuse.=0D >>=0D >> So I suggest a different approach. In PEAR DB, we use a generic = method =0D >> to do=0D >> the fetch work, the result is set according to a specified fetch = mode. =0D >> For=0D >> instance it could be:=0D >>=0D >> fetchRowWithMode:(unsigned int)mode=0D >>=0D >> with constants like:=0D >> DB_FETCHMODE_ORDERED (for array) =3D 0=0D >> DB_FETCHMODE_ASSOC (for dictionary) =3D 1=0D >> DB_FETCHMODE_OBJECT (column data as object properties) =3D 2=0D >> DB_FETCHMODE_FLIPPED (multidimensional array: column name =3D> all =0D= >> rows) =3D 3=0D >> ...=0D >>=0D >> which would give us:=0D >>=0D >> [result fetchRowWithMode:DB_FETCHMODE_ASSOC];=0D >> instead of [result fetchRowAsDictionary];=0D >>=0D >> Tell me what you think about that.=0D >>=0D >>=0D >> Next, I think we could implement a few methods that are very handy =0D= >> when it=0D >> comes to quickly programming. They are:=0D >>=0D >> - (id) getOne:(NSString *) query;=0D >>=0D >> getOne takes a query string as parameter and returns the first field =0D= >> from=0D >> the first row. It initialises and dealloc the SMySQLResult itself so =0D= >> the=0D >> developer does not need to take care of that. Ex:=0D >> [mConnection getOne:@"select password from users where =0D >> username=3D'user1'"];=0D >> It should return nil if no result is found.=0D >>=0D >> - (id) getRow:(NSString *) query withMode:(unsigned int) mode;=0D >>=0D >> getRow will return an NSArray or a NSDictionary containing the first =0D= >> row of=0D >> the result according to what mode it is given. Ex:=0D >> [mConnection getRow:@"select * from users where username=3D'user1'"=0D= >> withMode:];=0D >> It should return nil if no result is found.=0D >>=0D >> - (id) getAll:(NSString *) query withMode:(unsigned int) mode;=0D >>=0D >> Same as getRow but will fill a multidimensional NSArray with all the =0D= >> rows.=0D >> [mConnection getAll:@"select * from users" =0D >> withMode:DB_FETCHMODE_ASSOC];=0D >> It should return nil if no result is found.=0D >>=0D >> - (id) getCol:(NSString *) query withColIndex:(unsigned int) col;=0D >>=0D >> Will fetch a column (by its colunm index starting from 0) from a =0D >> result set=0D >> and return it as an NSArray. Ex:=0D >> [mConnection getCol:@"select * from users" withColIndex:0];=0D >> It should return nil if no result is found.=0D >>=0D >> Tell me what you think of that too. I don't think it will be too =0D >> difficult=0D >> to code.=0D >>=0D >> Take care,=0D >>=0D >> Bertrand Mansion=0D >> Mamasam=0D >>=0D >>=0D >>=0D >>=0D >>=0D >>=0D >> _______________________________________________________________=0D >>=0D >> Don't miss the 2002 Sprint PCS Application Developer's Conference=0D >> August 25-28 in Las Vegas -- = http://devcon.sprintpcs.com/adp/index.cfm=0D >>=0D >> _______________________________________________=0D >> Mysql-cocoa-users mailing list=0D >> Mys...@li...=0D >> https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >>=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE882lpMygj1Wmx00YRApZ8AJwNh3EfAWEyb4Jxi4Js4Vx6Q+xJswCgpLJh cKctum4VQLqAk7pfSiwHtog=3D =3DD3+o -----END PGP SIGNATURE----- |
From: Serge C. <co...@em...> - 2002-05-28 09:43:21
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bonjour Pierre;=0D =0D En fait au tout d=C3=A9but, le framework ne pouvait marcher que sur les =0D= machines ayant la librairie libmysqlclient en version dynamic =0D (libmysqlclient.dylib). A ce moment il =C3=A9tait inutile d'avoir le =0D framework sans cette librairie... Ce n'est plus le cas, en tout cas pour = =0D ce qui concerne mes application Cocoa (c'est encore le cas pour les =0D application en ligne de commande "Foundation").=0D =0D Si tu veux utiliser le framework pour une applications Cocoa, le plus =0D= simple est de r=C3=A9cup=C3=A9rer le binaire de "MySQL Dislpay" sur le = site (ne =0D pas utiliser stuffit, mais gunzip: pb de taille de nom de fichier), de =0D= monter l'image disque et enfin de copier la version du framework qui est = =0D dans le bundle de l'application (ligne de commande):=0D =0D =0D >gunzip MySQL_Display_0.1.3_F0.7.0.dmg.gz=0D >open MySQL_Display_0.1.3_F0.7.0.dmg=0D >cp -r /Volumes/MySQL\ Display/MySQL\ =0D Display.app/Contents/Frameworks/SMySQL.framework .=0D =0D Tu as alors un dossier SMySQL.framework dans ton repertoire courant, ce =0D= framework doit =C3=AAtre inclus dans le repertoire Frameworks de =0D l'application qui veut l'utiliser.=0D =0D Rem: Si tu veux compiler cette version du Framework, tu devrait pouvoir =0D= le faire directement avec les sources disponibles, il y a peut-=C3=AAtre = une =0D erreur sur les fichiers d'ent=C3=AAte que j'ai inclus dans la cible : =0D= SMySQL_fully_embeded. Je crois que j'ai corrig=C3=A9 cette erreur dans = la =0D version disponible en CVS.=0D =0D =0D J'esp=C3=A8re que cela r=C3=A9pond =C3=A0 ta question.=0D =0D Serge.=0D =0D PS: Si tu as besoin d'une version du framework qui est utilisable par =0D= une application en ligne de commande ("Foundation Application"), je peux = =0D t'envoyer la libraire en binaire.=0D =0D Le jeudi 23 mai 2002, =C3=A0 04:25 , Pierre Vettier a =C3=A9crit :=0D =0D > Bonjour,=0D >=0D > Serge et Bertrand =C3=A9tant 2 pr=C3=A9noms assez typiquement = fran=C3=A7ais, je tente =0D > donc=0D > ce premier contact dans cette langue ;-) Corrigez-moi si j'ai tout =0D= > faux.=0D >=0D > J'ai d=C3=A9couvert avec plaisir votre framework Cocoa pour MySQL.=0D >=0D > Jusque l=C3=A0, j'utilisais le driver java MM.Mysql mais le bridge = java =0D > d'apple=0D > me semble encore un peu trop fragile, j'ai une consommation m=C3=A9moire= =0D > anormale=0D > en faisant appel =C3=A0 ce bridge et =C3=A7a devient vite d=C3=A9sastreu= x quand on =0D > ram=C3=A8ne=0D > des milliers de lignes depuis MySQL.=0D >=0D > Directement en C, je ne devrais plus trop rencontrer de probl=C3=A8mes, = me=0D > suis-je dit.=0D >=0D > Mais voil=C3=A0, j'en suis bloqu=C3=A9 =C3=A0 la simple installation = de votre framework=0D > :-))=0D >=0D > Sur ma machine de d=C3=A9v, j'avais d=C3=A9j=C3=A0 install=C3=A9 MySQL = depuis une distrib=0D > binaire pour MacOS X dispo sur entropy.ch et je n'ai donc pas eu =C3=A0 = =0D > compiler=0D > tout =C3=A7a. D'o=C3=B9 mon d=C3=A9sarroi devant vos explications = n=C3=A9cessitant quelques=0D > fichiers des sources de MySQL.=0D >=0D > Que puis-je faire? Comment installer votre framework sans r=C3=A9install= er ou=0D > recompiler MySQL?=0D >=0D > A moins que j'aille jusqu'au "make" de vos explications "How to build=0D= > Mysql"?=0D >=0D > Je n'ai pas encore pig=C3=A9 tout =C3=A0 fait pourquoi cette = n=C3=A9cessit=C3=A9 de lier le=0D > framework ainsi =C3=A0 MySQL, mais je suis impatient d'essayer tout = =C3=A7a...=0D >=0D > En esp=C3=A9rant un d=C3=A9but de r=C3=A9ponse, je vous remercie = d'avance,=0D >=0D > Pierre Vettier=0D > Lyon - France=0D >=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE88q85Mygj1Wmx00YRAu05AJ957H6gVNhw5lqAHFDADiiUDiB1FwCeKdGN R4C07BAF7dz9C0znOYUXk08=3D =3Dg99H -----END PGP SIGNATURE----- |
From: John G. <jo...@jl...> - 2002-05-27 18:36:33
|
I'd like to add my comments as support to those of Bertrand, His proposal to make a single piece of code seems sensible, HOWEVER I would add that I think it may make sense to keep the original methods and wrap them around the new calls, this would be a benefit to a novice user, but would keep compatability with existing C API's. I know it is quite simple to add a fetchmode command, but it does tend to make code slightly less readable, also in addition I prefer to use wrapper classes that return a specified object (NSArray, OR NSDictionary etc.) so that the compiler can issue warnings that makes debugging easier than relying on (id) types - ALTHOUGH I would support this wholeheartedly for the generic function. I also like the quick queries proposed, and have actually implemented something similar within my code to make programming quicker - ie. simpleQuery() which queries, grabs all and returns. I have a possible new request to throw into the pot following some work I did last week. I am working on a lightweight content management system and have been producing queries that in turn produce additional queries. What would be useful for me is to return all my results as the strings that are returned in the SQL. For example: "SELECT PAGEID, TITLE FROM PAGES" where PAGEID is an INT and TITLE is a string. What would be useful is if I can return an NSDictionary object that has string objects for both PAGEID and TITLE, since I am simply passing the PAGEID back into and SQL query at some point in the future. I was browsing the library code and this looks like a case of simply skipping the typing process. So maybe this is something else that could be built into a generic version of the query code with an extra Fetch mode flag (maybe RETURN_MODE) anyway just some feedback JOhn On Friday, May 24, 2002, at 04:19 PM, Bertrand Mansion wrote: > Hi serge, > > I've had a look at the implementation of fetchRowAsDictionary and > fetchRowAsArray : they look quite similar and are both quite long due > to the > typing process. This means they are a pain to maintain. I believe there > could be some code reuse. > > So I suggest a different approach. In PEAR DB, we use a generic method > to do > the fetch work, the result is set according to a specified fetch mode. > For > instance it could be: > > fetchRowWithMode:(unsigned int)mode > > with constants like: > DB_FETCHMODE_ORDERED (for array) = 0 > DB_FETCHMODE_ASSOC (for dictionary) = 1 > DB_FETCHMODE_OBJECT (column data as object properties) = 2 > DB_FETCHMODE_FLIPPED (multidimensional array: column name => all > rows) = 3 > ... > > which would give us: > > [result fetchRowWithMode:DB_FETCHMODE_ASSOC]; > instead of [result fetchRowAsDictionary]; > > Tell me what you think about that. > > > Next, I think we could implement a few methods that are very handy when > it > comes to quickly programming. They are: > > - (id) getOne:(NSString *) query; > > getOne takes a query string as parameter and returns the first field > from > the first row. It initialises and dealloc the SMySQLResult itself so the > developer does not need to take care of that. Ex: > [mConnection getOne:@"select password from users where > username='user1'"]; > It should return nil if no result is found. > > - (id) getRow:(NSString *) query withMode:(unsigned int) mode; > > getRow will return an NSArray or a NSDictionary containing the first > row of > the result according to what mode it is given. Ex: > [mConnection getRow:@"select * from users where username='user1'" > withMode:]; > It should return nil if no result is found. > > - (id) getAll:(NSString *) query withMode:(unsigned int) mode; > > Same as getRow but will fill a multidimensional NSArray with all the > rows. > [mConnection getAll:@"select * from users" withMode:DB_FETCHMODE_ASSOC]; > It should return nil if no result is found. > > - (id) getCol:(NSString *) query withColIndex:(unsigned int) col; > > Will fetch a column (by its colunm index starting from 0) from a result > set > and return it as an NSArray. Ex: > [mConnection getCol:@"select * from users" withColIndex:0]; > It should return nil if no result is found. > > Tell me what you think of that too. I don't think it will be too > difficult > to code. > > Take care, > > Bertrand Mansion > Mamasam > > > > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users > |
From: Jerome R. <jer...@fn...> - 2002-05-27 14:28:29
|
Hello, I'm trying to use the framework, but it seems that I have a problem=20 with the size of my results. Here is the source I use (taken from the=20 test example). ---------- NSAutoreleasePool *pool =3D [[NSAutoreleasePool alloc] init]; SMySQLConnection *connection; SMySQLResult *result; NSArray *names, *types; NSDictionary *row; unsigned int count, i;=09 unsigned int compteur;=09 connection =3D [[SMySQLConnection alloc] initToHost:@"localhost"=20 withLogin:@"root" password:@"Typhon00" usingPort:0]; [connection selectDB:@"mysql"]; result =3D [connection queryString:@"select * from PERSONNE where=20= NOM=3D\"RABAS\" and PRENOM=3D\"GILLES\""]; count =3D [result numOfFields]; names =3D [result fetchFieldsName]; types =3D [result fetchTypesAsArray]; for (i=3D0; i<count; i++) { NSLog(@" Column : %d of type : %@ has for name : %@\n", (i+1),=20= [types objectAtIndex:i], [names objectAtIndex:i]); } compteur =3D [result numOfRows]; NSLog (@"Number of rows : %d", compteur); while (row =3D [result fetchRowAsDictionary]) { for (i=3D0; i<count; i++) { NSString *name =3D [names objectAtIndex:i]; NSLog(@"%@ : %@\n", name, [row objectForKey:name]); if ([result isBlobAtIndex:i]) { NSString *theString =3D [result = stringWithCString:[[row=20 objectForKey:name] bytes]]; NSLog(@" as string : %@\n",theString); } } } ---------- If I use this select statement, names of fields are correctly displayed,=20= the number of rows is 4820 and there are not displayed. Instead I have=20= the following error: *** -[NSCFDictionary setObject:forKey:]: attempt to insert nil = value If I modify the select statement by adding where NOM=3D\"RABAS\" and=20 PRENOM=3D\"GILLES\", there is only 2 rows and everything is correctly=20 displayed (names of field, number of rows, content of rows). Does anybody get the same problem? Thanks. J=E9r=F4me Rabas. |
From: Bertrand M. <bma...@wa...> - 2002-05-24 16:17:30
|
Hi serge, I've had a look at the implementation of fetchRowAsDictionary and fetchRowAsArray : they look quite similar and are both quite long due to the typing process. This means they are a pain to maintain. I believe there could be some code reuse. So I suggest a different approach. In PEAR DB, we use a generic method to do the fetch work, the result is set according to a specified fetch mode. For instance it could be: fetchRowWithMode:(unsigned int)mode with constants like: DB_FETCHMODE_ORDERED (for array) = 0 DB_FETCHMODE_ASSOC (for dictionary) = 1 DB_FETCHMODE_OBJECT (column data as object properties) = 2 DB_FETCHMODE_FLIPPED (multidimensional array: column name => all rows) = 3 ... which would give us: [result fetchRowWithMode:DB_FETCHMODE_ASSOC]; instead of [result fetchRowAsDictionary]; Tell me what you think about that. Next, I think we could implement a few methods that are very handy when it comes to quickly programming. They are: - (id) getOne:(NSString *) query; getOne takes a query string as parameter and returns the first field from the first row. It initialises and dealloc the SMySQLResult itself so the developer does not need to take care of that. Ex: [mConnection getOne:@"select password from users where username='user1'"]; It should return nil if no result is found. - (id) getRow:(NSString *) query withMode:(unsigned int) mode; getRow will return an NSArray or a NSDictionary containing the first row of the result according to what mode it is given. Ex: [mConnection getRow:@"select * from users where username='user1'" withMode:]; It should return nil if no result is found. - (id) getAll:(NSString *) query withMode:(unsigned int) mode; Same as getRow but will fill a multidimensional NSArray with all the rows. [mConnection getAll:@"select * from users" withMode:DB_FETCHMODE_ASSOC]; It should return nil if no result is found. - (id) getCol:(NSString *) query withColIndex:(unsigned int) col; Will fetch a column (by its colunm index starting from 0) from a result set and return it as an NSArray. Ex: [mConnection getCol:@"select * from users" withColIndex:0]; It should return nil if no result is found. Tell me what you think of that too. I don't think it will be too difficult to code. Take care, Bertrand Mansion Mamasam |
From: Serge C. <co...@em...> - 2002-05-23 09:52:23
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Camille;=0D =0D I guess the problem comes from the type of the result of [result =0D numOfRows] is my_ulonglong where as %d in the string waits for an int. =0D= Try :=0D NSLog (@"numOfRows : %d", (int)[result numOfRows])=0D =0D (that's a guess, don't take it for sure, and by the way I'd be =0D interested in the issue).=0D =0D just one remark:=0D in the line : NSLog (@"query : %@",chaine) ; chaine is obviously of type = =0D NSString*=0D in the line : chaine =3D [result fetchRowAsDictionary] ; chaine is now = of =0D type NSDictionary*=0D =0D I guess you have decalred chaine as type id, which fits both object =0D pointers, but you'd better of having different names still.=0D =0D =0D Serge.=0D =0D Le mercredi 22 mai 2002, =C3=A0 10:25 PM, Famille GOUREAU-SUIGNARD a = =C3=A9crit :=0D =0D > Hi,=0D >=0D > does anybody wish to solve a new problem ? (many thanks to Serge for =0D= > previous one :) )=0D >=0D > Here is the software :=0D >=0D > NSLog (@"query : %@",chaine) ; = // present the query=0D > result =3D [connection queryString: chaine]; = // send the query=0D > NSLog (@"numOfRows : %d", [result numOfRows]) ; // should give = the =0D > number of rows matching the query=0D > while (chaine =3D [result fetchRowAsDictionary]) // This = loop =0D > will test for every row in the query up to the last one=0D > {=0D > NSLog(@"descriptif : %@\n", [chaine objectForKey: @"descriptif"]);=0D= > compteurI++ ;=0D > }=0D > NSLog (@"nombre d'enreg correspondants : %d", compteurI) ; //How = many =0D > rows are in the response=0D > NSLog(@"descriptif : %@\n", [chaine objectForKey: @"descriptif"]);=0D >=0D > And here is the result :=0D >=0D > 2002-05-22 22:19:17.860 Gestionnaire stock[989] query : select =0D > descriptif, fournisseur from stock where reference like 'M07%' and =0D > fournisseur =3D 'ABC' ;=0D > 2002-05-22 22:19:17.909 Gestionnaire stock[989] numOfRows : 0=0D > 2002-05-22 22:19:17.910 Gestionnaire stock[989] descriptif : =0D > Marionnette chat gri=0D > 2002-05-22 22:19:17.910 Gestionnaire stock[989] descriptif : =0D > Marionnette chat noi=0D > 2002-05-22 22:19:17.910 Gestionnaire stock[989] nombre d'enreg =0D > correspondants : 2=0D > 2002-05-22 22:19:17.911 Gestionnaire stock[989] descriptif : (null)=0D >=0D > The problem is that a result contain X rows (attested by "nombre =0D > d'enreg correspondants : 2" and by a manual test under unix terminal) =0D= > and that the numOfRows function always reply by a 0.=0D >=0D > An idea ?=0D >=0D > Thanks.=0D >=0D > Camille=0D >=0D >=0D > _______________________________________________________________=0D >=0D > Don't miss the 2002 Sprint PCS Application Developer's Conference=0D > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm=0D= >=0D > _______________________________________________=0D > Mysql-cocoa-users mailing list=0D > Mys...@li...=0D > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE87Lx5Mygj1Wmx00YRAtFtAKCNKJb6ErX7GqdvOtL6gtUrXKo2yQCeJzZg 1aWeS1wj/5rpVdWKHTebjq8=3D =3DUOxY -----END PGP SIGNATURE----- |
From: Famille GOUREAU-S. <sui...@wa...> - 2002-05-22 20:27:24
|
Hi, does anybody wish to solve a new problem ? (many thanks to Serge for previous one :) ) Here is the software : NSLog (@"query : %@",chaine) ; // present the query result = [connection queryString: chaine]; // send the query NSLog (@"numOfRows : %d", [result numOfRows]) ; // should give the number of rows matching the query while (chaine = [result fetchRowAsDictionary]) // This loop will test for every row in the query up to the last one { NSLog(@"descriptif : %@\n", [chaine objectForKey: @"descriptif"]); compteurI++ ; } NSLog (@"nombre d'enreg correspondants : %d", compteurI) ; //How many rows are in the response NSLog(@"descriptif : %@\n", [chaine objectForKey: @"descriptif"]); And here is the result : 2002-05-22 22:19:17.860 Gestionnaire stock[989] query : select descriptif, fournisseur from stock where reference like 'M07%' and fournisseur = 'ABC' ; 2002-05-22 22:19:17.909 Gestionnaire stock[989] numOfRows : 0 2002-05-22 22:19:17.910 Gestionnaire stock[989] descriptif : Marionnette chat gri 2002-05-22 22:19:17.910 Gestionnaire stock[989] descriptif : Marionnette chat noi 2002-05-22 22:19:17.910 Gestionnaire stock[989] nombre d'enreg correspondants : 2 2002-05-22 22:19:17.911 Gestionnaire stock[989] descriptif : (null) The problem is that a result contain X rows (attested by "nombre d'enreg correspondants : 2" and by a manual test under unix terminal) and that the numOfRows function always reply by a 0. An idea ? Thanks. Camille |
From: Serge C. <co...@em...> - 2002-05-22 08:17:13
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi;=0D =0D indeed in C, C++, ObjC and many other language a =3D is a function which = =0D returns the assigned object.=0D Here the test is that fetchRowAsDictionnary returns nil if there is no =0D= more row to fetch:=0D then row =3D nil, and (row =3D ...) =3D nil (equivalent to NO or false).=0D= =0D It is then equivalent to :=0D while ((row =3D [result fetchRowAsDictionary]) !=3D nil)=0D =0D I guess this is the answer to your question.=0D =0D =0D Serge.=0D =0D Le mercredi 22 mai 2002, =C3=A0 06:37 AM, Famille GOUREAU-SUIGNARD a = =C3=A9crit :=0D =0D > Hi,=0D >=0D > I've got a problem with the following bunch of source file. It is used = =0D > (and works perfectly) in SMySQL_Test, the software that tests SMySQL =0D= > functions.=0D >=0D > SMySQLResult *result;=0D > NSDictionary *row;=0D > unsigned int count, i; =0D >=0D > result =3D [connection queryString:@"select * from test"];=0D > count =3D [result numOfFields];=0D >=0D > while (row =3D [result fetchRowAsDictionary]) {=0D > for (i=3D0; i<count; i++) {=0D > NSString *name =3D [names objectAtIndex:i];=0D > NSLog(@"%@ : %@\n", name, [row objectForKey:name]);=0D > }=0D > }=0D >=0D > My problem lies in the line : while (row =3D [result =0D > fetchRowAsDictionary]) {=0D > I'm quite new with C, C++ or ObjC, but I thought that between =0D > the "(...)" of a while there should be a test. The "=3D" instruction = is =0D > not a test...=0D >=0D > Does anybody have an idea to explain this syntax that is perfectly =0D > understood by PB (if not by me) ?=0D >=0D > Thanks.=0D >=0D > Camille=0D >=0D >=0D > _______________________________________________________________=0D >=0D > Don't miss the 2002 Sprint PCS Application Developer's Conference=0D > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm=0D= >=0D > _______________________________________________=0D > Mysql-cocoa-users mailing list=0D > Mys...@li...=0D > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE861SoMygj1Wmx00YRAlIeAJsHd5eCqVp8IG6CvhgF95pfs+jPCQCfVOx2 X9fqycbaR16/PpjX8IoTjt0=3D =3Dh3oj -----END PGP SIGNATURE----- |
From: Famille GOUREAU-S. <sui...@wa...> - 2002-05-22 04:38:03
|
Hi, I've got a problem with the following bunch of source file. It is used (and works perfectly) in SMySQL_Test, the software that tests SMySQL functions. SMySQLResult *result; NSDictionary *row; unsigned int count, i; result = [connection queryString:@"select * from test"]; count = [result numOfFields]; while (row = [result fetchRowAsDictionary]) { for (i=0; i<count; i++) { NSString *name = [names objectAtIndex:i]; NSLog(@"%@ : %@\n", name, [row objectForKey:name]); } } My problem lies in the line : while (row = [result fetchRowAsDictionary]) { I'm quite new with C, C++ or ObjC, but I thought that between the "(...)" of a while there should be a test. The "=" instruction is not a test... Does anybody have an idea to explain this syntax that is perfectly understood by PB (if not by me) ? Thanks. Camille |
From: Serge C. <co...@em...> - 2002-05-21 15:22:28
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Laurent=0D =0D Indeed it looks from the printout you gave from the trouble that there =0D= might be two problem:=0D =0D 1. You want to have the SMySQL target installed, that is in a place =0D where it can be found by the dynamic linker. For that you have to follow = =0D the instruction in the TO_INSTALL file in the SMySQL directory.=0D =0D 2. Once the previous point is done, yo should have a version of the =0D framework installed in ~/Library/Frameworks/. You want to make sure that = =0D the SMySQL_test application is linked with this framework (and not the =0D= one in the SMySQL/build/ directory), and that the path is absolute.=0D =0D 3. Then you can check which version (and path) are used for the =0D framework and application:=0D > cd ~/Library/Frameworks/SMySQL.framework=0D > otool -L SMySQL=0D This should give the result: (with some obvious substitution)=0D SMySQL:=0D =0D /Users/..../Library/Frameworks/SMySQL.framework/Versions/A/SMySQL =0D (compatibility version 1.0.0, current version 0.7.0)=0D /usr/local/lib/mysql/libmysqlclient.dylib (compatibility = version =0D 0.0.0, current version 0.0.0)=0D =0D /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation =0D= (compatibility version 300.0.0, current version 425.0.0)=0D /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, = current =0D version 55.0.0)=0D =0D 4. Idem in the build/ dir of SMySQL_test:=0D > cd ~/......./SMySQL_test/build=0D > otool -L SMySQL_test=0D SMySQL_test:=0D =0D /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation =0D= (compatibility version 300.0.0, current version 425.0.0)=0D =0D /Users/...../Library/Frameworks/SMySQL.framework/Versions/A/SMySQL =0D (compatibility version 1.0.0, current version 0.7.0)=0D /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, = current =0D version 55.0.0)=0D =0D Path (in application and framework) referencing the library (framework =0D= indeed) should be the same.=0D =0D =0D Hope that helps.=0D =0D Serge.=0D =0D Le vendredi 17 mai 2002, =C3=A0 05:25 PM, Laurent Domenech-Cabaud a = =C3=A9crit :=0D =0D > Hello,=0D >=0D > I'm having trouble running the sample character-mode client =0D > (SMySQL_test) on my machine.=0D >=0D > I have compiled the framework (SMySQL target) and the SMySQL_test =0D > builds fine, except I'm getting this error at runtime. Obviously, it =0D= > doesn't find the framework when trying to dynamically load it?=0D >=0D > dyld: /Users/laurent/Documents/Dvt/SMySQL_test/build/SMySQL_test can't = =0D > open library: =0D > @executable_path/../Frameworks/SMySQL.framework/Versions/A/SMySQL (No = =0D > such file or directory, errno =3D 2)=0D >=0D > Any idea where the dyld is done and if the path it tries to load it =0D= > from can be altered?=0D >=0D > Thanks in advance,=0D > Laurent=0D >=0D >=0D > _______________________________________________________________=0D >=0D > Have big pipes? SourceForge.net is looking for download mirrors. We =0D= > supply=0D > the hardware. You get the recognition. Email Us: =0D > ban...@so...=0D > _______________________________________________=0D > Mysql-cocoa-users mailing list=0D > Mys...@li...=0D > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE86ma6Mygj1Wmx00YRAmruAKCh5nJHNe6pAUn/aSQTavCd35VdXwCfZt0V VDgtgzvK8IfU5wKyNZf7hmg=3D =3Dd9eN -----END PGP SIGNATURE----- |
From: Laurent D. <la...@op...> - 2002-05-20 11:33:03
|
http://www.mysql.com/doc/I/N/INSERT.html or you dial my number... Regards, Laurent > Message: 1 > Date: Sat, 18 May 2002 08:06:57 +0200 > From: Famille GOUREAU-SUIGNARD <sui...@wa...> > To: mys...@li... > Subject: [Mysql-cocoa-users] How to insert > > Hi, > > I did not found in the doc how to insert a record in a table. > I need my application to insert records in a mysql table like : insert > test (name,number) values ('truc', 12); > Please, what is the procedure ? > > Thanks. > > Camille > > |
From: Famille GOUREAU-S. <sui...@wa...> - 2002-05-18 06:07:09
|
Hi, I did not found in the doc how to insert a record in a table. I need my application to insert records in a mysql table like : insert test (name,number) values ('truc', 12); Please, what is the procedure ? Thanks. Camille |
From: Laurent Domenech-C. <la...@op...> - 2002-05-17 15:25:51
|
Hello, I'm having trouble running the sample character-mode client (SMySQL_test) on my machine. I have compiled the framework (SMySQL target) and the SMySQL_test builds fine, except I'm getting this error at runtime. Obviously, it doesn't find the framework when trying to dynamically load it? dyld: /Users/laurent/Documents/Dvt/SMySQL_test/build/SMySQL_test can't open library: @executable_path/../Frameworks/SMySQL.framework/Versions/A/SMySQL (No such file or directory, errno = 2) Any idea where the dyld is done and if the path it tries to load it from can be altered? Thanks in advance, Laurent |
From: Serge C. <co...@em...> - 2002-05-15 13:22:45
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there; A short eMail to announce the release of the new version of the framework (0.7.0) (With help of Bertrand Mansion). 0.6.0 did not last a long time. The new version features: - - Better character set encoding (as v0.6.0). - - list methods (listDBs ...), which changed syntax to look more like the SQL SHOW statments. - - Only one connectWithLogin:... method (easier maintenance, closer to C, Perl and PHP API). The old two ones have been removed. - - Correction of few comments. The web page should be up to date. You are much welcome to update the version you are using, and report any bug. Read you soon. Serge. - ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 - ---------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE84mGvMygj1Wmx00YRAp1uAJsFl1eNSIBx/JhXcQdy4GM3Kd6RtwCfRXQE EXo9BWtQZXqdvtM3e64wsPQ= =F1s3 -----END PGP SIGNATURE----- |
From: Serge C. <co...@em...> - 2002-05-06 11:38:44
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bertrand;=0D =0D There was an error in the listFields method, it's corrected now (in CVS =0D= tree). In the mean time I've finished the implementation of character =0D= set encoding. Everything should be Ok even with non 7bits characters.=0D =0D Serge.=0D =0D Le lundi 6 mai 2002, =C3=A0 11:10 , Bertrand Mansion a =C3=A9crit :=0D =0D > Hi Serge,=0D >=0D > Thanks for the new methods, I have tested listDBs and listTables and =0D= > they=0D > work fine. Did not test listFields yet.=0D > I have thought about a listTables:forDB: method where you can specify = a =0D > DB=0D > instead of doing a selectDB yourself before calling listTables:. I can=0D= > implement it.=0D >=0D > I will have some time to play with the framework this week (holidays = in =0D > the=0D > belle-famille...).=0D >=0D > Take care,=0D >=0D > Bertrand=0D >=0D >=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE81mrqMygj1Wmx00YRAr7uAKCAKmR1qXkTvp1Flax8nwmAmqWKRgCfRqDr OIbmht+ESy+8M+G+kAR7GJM=3D =3Dt7d8 -----END PGP SIGNATURE----- |
From: Bertrand M. <bma...@wa...> - 2002-05-06 09:08:40
|
> Hi Bertrand; > > I've worked yesterday on this. > Now I've added a couple of methods: listDBs:(NSString *), > listTables:(NSString *), listFields:(NSString *) fromTable:(NSSTring *). > On top of that I added a method description to SMySQLResult (for NSLog > purpous, and string formating). > > Finally I've tried to use properly the encoding information I have in > the object. I still have a strange bug (Bus error), problem in > SMySQL_Test application, when testing mehtod listFields:... . > > The new version is on CVS (both framework and SMySQL_test app). > Serge. Hi Serge, Thanks for the new methods, I have tested listDBs and listTables and they work fine. Did not test listFields yet. I have thought about a listTables:forDB: method where you can specify a DB instead of doing a selectDB yourself before calling listTables:. I can implement it. I will have some time to play with the framework this week (holidays in the belle-famille...). Take care, Bertrand |
From: Serge C. <co...@em...> - 2002-05-03 09:46:49
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bertrand;=0D =0D I've worked yesterday on this.=0D Now I've added a couple of methods: listDBs:(NSString *), =0D listTables:(NSString *), listFields:(NSString *) fromTable:(NSSTring *).=0D= =0D On top of that I added a method description to SMySQLResult (for NSLog =0D= purpous, and string formating).=0D =0D Finally I've tried to use properly the encoding information I have in =0D= the object. I still have a strange bug (Bus error), problem in =0D SMySQL_Test application, when testing mehtod listFields:... .=0D =0D The new version is on CVS (both framework and SMySQL_test app).=0D =0D =0D Serge.=0D =0D NB: To compile SMySQL_Test, one have to compile the SMySQL framework in =0D= NON embeded target (it should be in ~/Library/Frameworks), NSFoundation =0D= app cannot have embeded frameworks.=0D =0D Any help on that is welcomed.=0D =0D =0D Le jeudi 2 mai 2002, =C3=A0 12:41 , Bertrand Mansion a =C3=A9crit :=0D =0D >=0D > Yes, a MySQLResult is fine. I have checked LucidSQL and they return a=0D= > NSArray which is not really appropriate I think. One would expect a =0D= > wrapper=0D > method to return the same kind of object as the original API does, =0D > otherwise=0D > it can become confusing. The mysql_list_dbs method return a MYSQL_RES=0D= > originally. This is more compatible with the Model-View-Controller =0D > paradigm.=0D >=0D >=0D - ----------------------------------------------------=0D Serge Cohen=0D =0D GPG Key ID: 1024D/69B1D346=0D - ----------------------------------------------------=0D -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE80lz7Mygj1Wmx00YRAkxoAJ0TIm+k9Yk7gJBtGOWwUw5jvmOnQQCggTEv srvWrDzGL+G4BmmjoVAn4s8=3D =3DVVSB -----END PGP SIGNATURE----- |