[Opensim-dev] further db thoughts

Stefan Andersson stefan at tribalmedia.se
Mon Jan 14 21:30:16 UTC 2008


Yes, as I said at the start, how things play together might take a while to get used to. The lib is supposed to create parameterized dynamic sql, so that bit should be injection-aversive.
 
And, by all means, feel free to find other ways to slice the cake; I put it there for us to extend and modify, in the hope that it could function as a help also for people who want to extend our db definitons with their own need for light-weight persistence.
 
I know my code sample was stenographic at best, but I hope to deliver some working code (ideally, shape, part and group) at the end of this week - I have it on my hard disk, just have to 'clean' it from context-specifics.
 
Best,
/Stefan



> Date: Mon, 14 Jan 2008 12:07:34 -0500> From: sean at dague.net> To: opensim-dev at lists.berlios.de> Subject: Re: [Opensim-dev] further db thoughts> > On Mon, Jan 14, 2008 at 11:31:50AM +0100, Stefan Andersson wrote:> > > > > > ---> > Stefan, It would be motivating if you could provide a sample about how the TribalMedia data framework should work. Could that be done by implementing the very simple asset server as an example ? I propose we would make it work, make tests, comment and try to improve it, then it may serve as a baseline for the other db stuff ?> > --- > > > > *doh*> > > > I'll just post the code; but beware, it doesn't work, it's just to show you how stuff would interact> > > > (Also, the code could probably be cleaner...)> > > > What to look for:> > * how the Schema is created and populated> > * how the m_keyFieldMapper (that is used to extract primary key from queries) is initialized> > * how the FromReader passes on to FillObject() - the function that will use the Schema to populate the RowMapper (and the PrimitiveBaseShape)> > * How the CRUD and CreateRowMapper functions are really just there to> > get a cleaner interface for the caller.> > I'm a bit concerned about the ability to get SQL injection through the> process (unless I missed something). We need to either put in filter> for that, or use the parametrized SQL for the base drivers to let them> filter that.> > I'm still wrapping my head around all of it, but I like much of what I'm> seeing so far. More later.> > -Sean> > -- > __________________________________________________________________> > Sean Dague Mid-Hudson Valley> sean at dague dot net Linux Users Group> http://dague.net http://mhvlug.org> > There is no silver bullet. Plus, werewolves make better neighbors> than zombies, and they tend to keep the vampire population down.> __________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080114/18a46f67/attachment-0001.html>


More information about the Opensim-dev mailing list