Questions tagged [jsdata]

JSData is a framework-agnostic, storage-agnostic, in-memory data store.

Inspired by Ember Data, JSData is a framework-agnostic, storage-agnostic, in-memory data store.

The official website of JSData is js-data.io. The source can be found on GitHub.

JSData's adapters handle communication with various storage layers, such as localStorage, Firebase, RethinkDB, or your RESTful backend.

JSData runs in the browser, communicating with storage layers such as localStorage, Firebase, your RESTful backend (HTTP adapter), etc.

JSData also runs in NodeJS, where adapters for MongoDB, Redis, RethinkDB, MySql/Postgres/SQLite, etc. are available.

JSData presents a uniform API for executing your typical CRUD operations against any storage layer for which an adapter is available. You can easily combine adapters for more complicated data management.

Useful links:

58 questions
0
votes
1 answer

Defining relations on nested objects

Can js-data create relations on nested objects? Here is an example: GET /card/2 { "id": 2, "name": "foo", "action": { // <-- nested object "typeId": 1, // foreign key to actionType.id "param0": 20 } } GET /action-types [{ …
Vlad-HC
  • 4,359
  • 2
  • 20
  • 25
0
votes
1 answer

How to populate multiple js-data resources in one request

I have an AngularJS app that I am converting to use js-data. If I have a REST interface that returns a JSON object in this format { data: { id: 1, name: Test, dept: 2 }, related: { DeptList: [ { Id: 1, Name: Dept1 }, …
0
votes
1 answer

js-data-sql DSSqlAdapter create left join for hasOne Relationships

We are using js-data-sql DSSqlAdapter in our backend nodejs service. Our model definition has a hasOne Relationship defined as follows: module.exports = { name: 'covariance_predictions', idAttribute: 'id', relations: { belongsTo:…
Jérémie
  • 557
  • 4
  • 15
0
votes
1 answer

Does [js-data] support no primary key?

I have log data that I wish to manage with js-data (http://www.js-data.io/docs/dsdefaults#idattribute) that has no primary key. Do I need to generate a key or can js-data be configured to allow access to the data without a pk? Can I get js-data to…
tarik
  • 312
  • 1
  • 9
0
votes
1 answer

js-data: What is the difference between "none" and "inject" for DS "reapAction" configuration option?

I have the following definitions: "none" - do nothing "inject" - re-inject the items back into the data store The above definition is taken from the official documentation. I don't understand what's the point of re-injecting items back into the…
tamakisquare
  • 16,659
  • 26
  • 88
  • 129
0
votes
1 answer

JSData: Sometimes resources are accessed nested under parent resource, and other times not. How is this determined?

I am integrating with an api that exposes child resources nested under parent resources. This seems to work fine when I am finding or creating resources from JSData, however, updates and deletes seem to want to access the resource directly. GET &…
Apie
  • 6,371
  • 7
  • 27
  • 25
0
votes
1 answer

Resources not referencing the same related resource

I've defined two resources - Foo and Bar - where Foo contains one Bar. However, when inserting some basic data in this format, if multiple Foo's reference the same Bar, then only the most recently loaded Foo is given a reference to it. Previous…
The DIMM Reaper
  • 3,558
  • 3
  • 28
  • 46
0
votes
1 answer

JSData object property causing an infinite loop

I have a data property that needs to be represented on the backend like this YYYY-MM-DD However angular material date picker needs a date object. So I figure that I'll just use a property. However when I do create a property it causes an infinite…
user133688
  • 6,864
  • 3
  • 20
  • 36
0
votes
1 answer

How to search js-data resources with Lunr on angular?

In my angular (1.3) app, I'm using JSData (2.0.0), and I'd like to add full text search capabilities to those resources using Lunr, without Ajax. Any tips?
Yossi Shasho
  • 3,632
  • 31
  • 47
0
votes
1 answer

keeping DRY while using JSData and Sequelize

Does JSData replace or complement Sequelize.js? I am trying to understand how those two libraries can play together and if they should. From my reading it looks like JSData mainly deals with accessing data while Sequelize.js will create and…
epeleg
  • 10,347
  • 17
  • 101
  • 151
0
votes
1 answer

JS-Data loads data but doesn't render in view

I have followed the js-data angular tutorial to setup js-data-angular in my current project. model definition: .factory('shipmentFactory', function(DS) { return DS.defineResource({ name:'ShipmentInstructions', …
qmarcelle
  • 3
  • 2
0
votes
1 answer

How to make find() accept an array instead of one object?

Using JS-Data 2.6 in Angular, I'm trying to load an array of data using a nice clean URL, e.g. /report/22. (This format makes sense, because it's following business logic - I'm loading a report data by category id, and getting several rows…
analytik
  • 792
  • 6
  • 16
0
votes
4 answers

How to update my $scope after adding new elements?

I have a problem with my controller. I use ionic (angular) and js-data. when I add a new item via addItem() I will only when see it if I reload the page via F5. Here is my code: .controller('FooCtrl', function($scope, $ionicPlatform, foo) { …
gurehbgui
  • 14,236
  • 32
  • 106
  • 178
1 2 3
4