This project is read-only.

About JayData Project

JayData is a unified data access library for JavaScript to CRUD data from different sources like WebSQL, IndexedDB, MongoDb, WebAPI,  OData, HTML5 localStorage, Facebook or YQL. The library can be integrated with KendoUI, Knockout.js, Handlebars.js or Sencha Touch 2 and can be used on Node.js as well.

Please visit our website at , or read the release notes for the most current information about this project.

New: Groundbreaking OData V4 features in JayData 1.5.1 CTP

There is no question: our goal is to build the the best OData v4 JavaScript tool, ever. There are a lot things to improve, but we release our next Community Technology Preview to show our latest results. (read more)

Understand JayData in 7 simple steps. (read this article)

Step 1 - Scripts to reference

<!-- optional, only if you need OData -->
<script  type="text/javascript" src=""></script>
<script  type="text/javascript" src=""></script>

Step 2 - Define data model

Simple model that works online and offline as well. Define your data model:

$data.Entity.extend("Todo", {
    Id: { type: "int", key: true, computed: true },
    Task: { type: String, required: true, maxLength: 200 },
    DueDate: { type: Date },
    Completed: { type: Boolean }

$data.EntityContext.extend("TodoDatabase", {
    Todos: { type: $data.EntitySet, elementType: Todo }

Step 3 - Initialize the data storage


var todoDB = new TodoDatabase("");


var todoDB = new TodoDatabase("MyTodoDatase");


var todoDB = new TodoDatabase({ 
    provider: 'webSql', databaseName: 'MyTodoDatabase' 

Step 4 - Create data

var tasks = todoDB.Todos.addMany([
    { Task: 'Step0: Get this this list', Completed: true },
    { Task: 'Step1: Define your data model'},
    { Task: 'Step2: Initialize data storage'}
todoDB.saveChanges(function() {
    tasks.forEach( function(todo) { alert(task.Id) });

Step 5 - Working with data

Filter #1

//Filter #1
        .filter( function(todo) {
            return todo.Completed == true ||
        .forEach( function(todo) {

Filter #2

//Filter #2
        .filter("it.Completed || it.task.startsWith('Step2')")
        .forEach( function(todo) {

Step 6 - Remove

//Simple remove
//Remove in batch

Step 7 - Generate some UI with jQuery

//UI with jQuery
        .forEach(function(todo) {
                .append('<li>' + todo.Task + ',' + todo.Person.Name + '</li>');

CRUD + Query in Javascript !!

Create or modify data with an approach native to JavaScript: create objects, set properties, assign to collections. Create complex inmemory object graphs and let JayData persist it for you to one of the read/write data sources.

JayData provides JavaScript Language Query (JSLQ) as a tool to query local (in-browser and mobile) and remote data sources witha simple, unified query syntax: JavaScript itself. Much like Microsoft .NET developers can utilize Entity Framework and LINQ on server-side to perform operations on data from different databases.

The aim of JayData library is to give a similar level of abstraction with the help of the $data.Expressions API and the JavaScript language itself.

JayData is cross-platform (runs on HTML5 desktop and mobile browsers, can be hosted in PhoneGap environment on iPhone, iPad and Android) and cross-layer as it works on client-side and server-side (Node.JS).

More information about JayData

Use JayData as a server

Use your JayData skills to create data centric business apps that run on the server. Read the blogpost about How to install your own oData server with nodejs and mongoDB. You can even try it now online and get your free app at

Join our community, Like us on Facebook and Follow us on Twitter.

Visit for detailed information and documentation.

As JayData covers many technologies and open new fields of development, we encourage you to contribute to the project with new providers or features. Check out the possible ways of contributions here:

JavaScript libraries released on CodePlex can be used to develop applications, to get the structured sourcecode to develop JayData itself, visit

JayData comes with dual licensing: you can use it under MIT license if ship software software under MIT, but it should be used under GPL if you distribute your software under GPLv2.


Last edited Mar 11, 2016 at 10:06 AM by JayDataOrg, version 76