|
Re: Automatic Object Storage To MySQL: msg#00222lang.smalltalk.squeak.seaside
On 25-Jan-06, at 4:16 PM, Avi Bryant wrote:
I appear to have the same goals as restore. It would also be interesting (to me, anyway) to see if there was some natural integration possible between this and ROE. Though I guess this is focused on MySQL (for now? How specific is it?), whereas ROE is focused on PostgreSQL. In some ways MySQL can be though of as the lest common denominator (this has changed in the past couple years but it's hard to teach an old dog new tricks). I don't see any reason (in fact I think it would be a good thing) to be able to use any SQL database for storage. I looked at ROE some time ago and thought it's method for querying was very nice. Something ROE like for querying results might make a good companion. My only hesitation would be how that might effect different implementation done in different languages. I planed on having IOSPersistent libraries for multiple languages and would like to keep the API similar for all implementations. That being said... I do not want to sacrifice usability and simplicity. If other languages don't have the power of smalltalk this library should not suffer.
Sure .... A simple example... Create a new class like so IOSPersistent subclass: #IOSPageInfo instanceVariableNames: 'user date fileId page' classVariableNames: '' poolDictionaries: '' category: 'IOS-FLHSPMerge' IOSPersistent implements automatic getter/setter methods this may or may not be a good idea but so far I like it. Because of this you can use this class with no further actions (but you normally would) . pObject := IOSPageInfo new. pObject user: (AUser newWithName: 'aname'). "AUser is a child of IOSPersistent" pObject date: (Date today). pObject fileId: 1. pObject page: 5. To save the object pass it an instance on a JdmConnection and call #save pObject pxxDbConnection:db; save. IOSPersistent will create the table if needed and decide to either UPDATE or INSERT. It will also save any i-vars that contain an IOSPersistent object that have never been saved. It needs to to get the objects ID. IOSPersistent object are resolved using a lookup table.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Seaside 2.6 Example?: 00222, Todd Blanchard |
|---|---|
| Next by Date: | Re: Automatic Object Storage To MySQL: 00222, Dane Jensen |
| Previous by Thread: | Re: Automatic Object Storage To MySQLi: 00222, Avi Bryant |
| Next by Thread: | Re: Automatic Object Storage To MySQL: 00222, Lukas Renggli |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |