<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>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.<BR>
 <BR>
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.<BR>
 <BR>
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.<BR>
 <BR>
Best,<BR>
/Stefan<BR><BR><BR><BR><BR>

<HR id=stopSpelling>
<BR>
> Date: Mon, 14 Jan 2008 12:07:34 -0500<BR>> From: sean@dague.net<BR>> To: opensim-dev@lists.berlios.de<BR>> Subject: Re: [Opensim-dev] further db thoughts<BR>> <BR>> On Mon, Jan 14, 2008 at 11:31:50AM +0100, Stefan Andersson wrote:<BR>> > <BR>> > <BR>> > ---<BR>> > 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 ?<BR>> > --- <BR>> > <BR>> > *doh*<BR>> > <BR>> > I'll just post the code; but beware, it doesn't work, it's just to show you how stuff would interact<BR>> > <BR>> > (Also, the code could probably be cleaner...)<BR>> > <BR>> > What to look for:<BR>> > * how the Schema is created and populated<BR>> > * how the m_keyFieldMapper (that is used to extract primary key from queries) is initialized<BR>> > * how the FromReader passes on to FillObject() - the function that will use the Schema to populate the RowMapper (and the PrimitiveBaseShape)<BR>> > * How the CRUD and CreateRowMapper functions are really just there to<BR>> > get a cleaner interface for the caller.<BR>> <BR>> I'm a bit concerned about the ability to get SQL injection through the<BR>> process (unless I missed something). We need to either put in filter<BR>> for that, or use the parametrized SQL for the base drivers to let them<BR>> filter that.<BR>> <BR>> I'm still wrapping my head around all of it, but I like much of what I'm<BR>> seeing so far. More later.<BR>> <BR>> -Sean<BR>> <BR>> -- <BR>> __________________________________________________________________<BR>> <BR>> Sean Dague Mid-Hudson Valley<BR>> sean at dague dot net Linux Users Group<BR>> http://dague.net http://mhvlug.org<BR>> <BR>> There is no silver bullet. Plus, werewolves make better neighbors<BR>> than zombies, and they tend to keep the vampire population down.<BR>> __________________________________________________________________<BR><BR></body>
</html>