Aaron Sherber

Results 118 comments of Aaron Sherber

I think the issue is [here](https://github.com/CollaboratingPlatypus/PetaPoco/blob/ece14f470987631302a345c7b4a01514fa543c64/PetaPoco/Core/PocoData.cs#L117). When we create and cache a factory method for turning the `IDataReader` into a poco, it's keyed by the SQL statement and the field...

I don't think that using `;` to determine what to do will work -- you don't need to start with `;` in order to call a stored proc, and in...

Well, the library does look for the `;` to determine whether or not to attempt to add the `SELECT` part of the query. So right, an `EXEC` statement would need...

@Curlack Interesting, thanks!  So I think this doesn't bypass the factory cache entirely; it's just that when the generic type is `object` (or `dynamic`, which behaves the same way), the...

One problem is that `PocoData` and its factory caches live outside of the databases. If db1 has `EnableCache = true` and makes a call, then the column names will be...

I ran a few quick benchmarks, and on 10K selects of a single row with 59 columns, the difference between caching the field names or not was about 32 sec...

@pleb That's a great idea! If the selector is always an int, then there shouldn't be any issues with injection, but if it's a string you'd want to be careful.

Possible way to deal with strings: ```c# $";EXEC GetData @@selector = @selector -- {i.GetHashCode()}", new { selector = i } ``` These methods make the cache work for you, by...

`PocoData.GetFactory()` doesn't know anything about the db that's calling it -- you'd have to change the signature on this public method in order to pass in the db. I would...

I would also vote for an immutable pattern. I'm not sure why you say that memory consumption would go up, since on each assignment the old object would fall out...