Giter Club home page Giter Club logo

castiron's People

Contributors

whiteknight avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

castiron's Issues

Improve Constructor finding logic

In BestMatchConstructorFinder we should improve the matching algorithm by checking and ranking compatibility. exact type match should lead to a better score than a type match which involves boxing/unboxing, casting or conversion.

Reuse a single command or query with .Prepare()

the IDbCommand.Prepare() method should allow fast reuse of a single command with multiple parameter sets. See about adding this kind of functionality to SqlRunner and maybe SqlBatch, so we can pass in a single query to .Prepare() and multiple parameter set objects for each invocation.

Cleanup map compilation state

MapCompileOperation is a mess, and it delegates to ObjectCreatePreferences which isn't used appropriately. MapBuilder/IMapCompilerSettings also only exposes options for a single data type, when we potentially want to configure constructor/factory settings for all data types used throughout the graph.

The IMapCompilerSettings interface needs to be redesigned, possibly with changes to the IDataResults interface to support a more flexible configuration system.

Basically, we want to build a config tree where Types[]->subtypes[]->options. Then we can include this whole thing in MapCompileOperation and cache/retrieve constructor/factory information for each type as it's encountered.

SqlQuery method for stored procs

StoredProc method would allow specifying proc name and parameter names, and create an ISqlQuery with type=StoredProc and the parameters setup.

Fix recursive mapping to arbitrary depth

In several of the mappers we have a TODO note like "TODO: This Substring is going to fail if we are more than 2 levels deep". First add tests to show that this is a problem, and then implement a fix.

Table-valued parameters

See if we support this already, add tests

See if we can at least add a nice layer around it so we can pass in a list of objects and convert to a DataTable.

SqlCommand class with factory methods

Would like to add a static SqlCommand class with factory methods, similar to the SqlQuery class which creates queries, or the Materializer class which creates Materializers.

Reimplement Map Caching

As part of the MapCompiler and CompileSettings refactors, the old caching mechanism had to be removed. A new caching mechanism must be provided because map compilation to too expensive to do repeatedly for the same query.

Streaming large result sets

SqlRunner currently manages the lifetime of the connection end-to-end, so the result stream is closed when the method returns. We should have the ability to return an object representing an open stream, which can be read in a streaming fashion and disposed when completed.

SqlQuery should provide more factory methods

StoredProc method would allow specifying proc name and parameter names, and create an ISqlQuery with type=StoredProc and the parameters setup.

.FromString should provide options to setup parameters with ISqlParameterized

Merge MapCompilation into SqlRunner

We should be able to configure mappings at the runner level, or at the level of the runner factory, and not maintain a static source of mapping information. We can merge MapCompilation into SqlRunner or ExecutionContext as required.

Mark results reader as locked so concurrent reads cannot be started

In IDataResultsBase.AsEnumerableNextSeveral, it's possible that we are enumerating through multiple result sets, during which time another .AsEnumerable() call could be made. We should find a way to try and lock the result set so new concurrent reads cannot be started while existing reads are ongoing (we probably also want to do this for several other methods as well)

Make sure to keep track of state in the DataRecordMappingEnumerable (and variants), so that if the underlying reader has advanced to the next result set, we cannot continue to consume the enumerable for the previous result set.

ArrayCompiler should properly support arrays of custom objects

We can't currently loop in the ArrayCompiler because (1) we don't know how many columns the custom object compiler is going to consume and (2) we need to set the length of the array up front. Instead we should change this to loop over a List instead of T[1], add items so long as we can continue to do so meaningfully, and then call .ToArray() on the result list. We lose a bit of performance but gain a lot more power in exchange.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.