GithubHelp home page GithubHelp logo

linqwrapper's People

Contributors

timmartin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

roniyud

linqwrapper's Issues

Sort out repeatability of queries

I suspect that queries are being run unnecessarily in situations like the following:

Query<Foo> whatever = new Query<Foo>(...);
Foo x = whatever.ElementAt(1);
Foo y = whatever.ElementAt(2);

This needs to be tested, and if necessary fixed.

Figure out how to properly dispose of DB connections

The original state was that we created DB connections and passed them into the QueryProvider, and that never disposed of them. The problem appears to be that the standard way of doing LINQ is to have one instance (or a small number of instances) of the query provider, and hold all the query-specific stuff in the query. However, the way I've got things at the moment we need a new provider per query, and that means that providers have to be disposed of.

For the moment I've modified Query<> to be disposable and to dispose of it's provider when it is itself disposed, but this doesn't seem in keeping with how LINQ is supposed to work. This needs more thought.

Consecutive Cast() expressions fails

The Cast() expression expects to be applied to a SQL execution expression, so it fails if you do

Query<> query = ...
query.Cast<Foo>().Cast<Foo>();

Support for Cast() operator

We should support applying the Cast() operator to queries, which should not in itself cause the SQL to be executed.

Support for arbitrary select expressions

At the moment there is no support for non-trivial expressions in the select clause, which will be ignored, causing the wrong type to be returned. This ought to be fairly easy to implement, and is relatively important since it's easy to write code that compiles but crashes spectacularly when run

Need support for ANSI joins as well as Theta joins

Currently, the SQL generation assumes that all joins will be expressed in the form

SELECT foo
  FROM bar, baz
 WHERE bar.id = baz.id

To use this library in anger it will have to support

SELECT foo
  FROM bar
  JOIN baz ON baz.id = bar.id

in some way better than just putting the entire join clause in one call to AddFromClause()

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.