Giter Club home page Giter Club logo

jsinq's Introduction

-------------------------------------------------------------------------------
JSINQ - LINQ to Objects for JavaScript, Version 1.0
http://www.codeplex.com/jsinq

Copyright (c) 2010 Kai Jäger. Some rights reserved.

Use of the JSINQ source code is governed by an MIT-style license that can be 
found in the license.txt file.
-------------------------------------------------------------------------------

What is JSINQ?

JSINQ is a complete implementation of LINQ to Objects in JavaScript. LINQ 
stands for "Language Integrated Query" and it is a component of Microsoft's 
.NET framework. With LINQ, you can write SQL-like queries against in-memory
collections, relational databases, XML documents and many other data sources.
LINQ to Objects, the part of LINQ that JSINQ implements in JavaScript, deals 
with querying in-memory data structures such as arrays, lists, etc.

Release Notes for Version 1.0

* jsinq-enumerable.js renamed to jsinq.js as it now also hosts the new types
  jsinq.Dictionary and jsinq.List (see next two bullet points)
  
* New type jsinq.Dictionary, a faithful JavaScript implementation of 
  System.Collections.Generic.Dictionary. Supports both primitive and complex
  keys (complex keys are supported with limited efficiency)

* New type jsinq.List, a faithful JavaScript implementation of 
  System.Collections.Generic.List.

* New test suite for jsinq.Dictionary  

* New test suite for jsinq.List
  
* jsinq.Enumerable modified to use jsinq.Dictionary instead of specialized hash
  type that was used in previous versions.
  
* New .NET 4.0 query operator "zip" added to jsinq.Enumerable

* New method "each" for jsinq.Enumerable that simplifies enumeration

How to use JSINQ

* Copy the files jsinq.js and jsinq-query.js from the build folder
  to a location in your project folder.
  
* Embed the JavaScript files into your HTML page using the following code

  <script type="text/javascript" src="jsinq.js"></script>
  <script type="text/javascript" src="jsinq-query.js"></script>

* Use JSINQ like this:

  var data = [1, 2, 3];
  var query = new jsinq.Query('from d in $0 select d');
  query.setValue(0, new jsinq.Enumerable(data));
  var result = query.execute();
  result.each(function(element) {
    document.write(element);
  });
  
* Look at the examples in the samples folder and read the reference at
  http://www.codeplex.com/jsinq
  
* Report bugs and give feedback. Thanks!


Known issues

* The error messages generated by the query compiler are often inaccurate and
  the line numbers referred to in the error message are often not where the
  actual error is.
  
* The query compiler will fail to compile expressions that contain the new or
  typeof operator without a trailing whitespace, e.g. new(Object) will fail.

* The query parser does not currently understand regular expression literals.
  If you wish to use regular expressions in your query, use new RegExp(...)
  or define your regular expressions outside the query and pass them in via 
  placeholders (this is the preferred method).

* The test suite for jsinq.Query is inadequate and only tests a handful of
  mostly trivial queries.

jsinq's People

Stargazers

kumamotone avatar Max D avatar

Watchers

Björn Höhrmann avatar James Cloos avatar

Forkers

plugn

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.