Questions tagged [lokijs]

LokiJS is an in-memory JavaScript datastore with persistence.

LokiJS is:

  • In-Browser NoSQL db with syncing and persisting
  • a Redis-style store an npm install away
  • Persistable NoSQL db for Cordova
  • Embeddable NoSQL db with Persistence for node-webkit
106 questions
1
vote
1 answer

node mysql connection pool exports

I am making an app using electronjs. I have created one connection pool which i will use globally in my project. A user can select which mysql server he need to connect and the selected server configuration is saved in a lokijs database. When we…
Ayoob Khan
  • 1,536
  • 2
  • 15
  • 13
1
vote
1 answer

Vuex state is not mutated by a general function whilst a dedicated function does mutate it

I have a LokiJS-provided storage which I use to update the Vuex state using mutations in the autoloadCallback. LokIJS storage: var db = new loki('mydatabase', { autoupdate: true, autoload: true, autoloadCallback: setupHandler }) Vuex state…
sjaustirni
  • 3,056
  • 7
  • 32
  • 50
1
vote
1 answer

What is a Dynamic View in LokiJS?

I am working on a Hybrid App where I am storing data with LokiJS. I read the documentation at LokiJS Website, and some of it on Rawgit, and i am good at basic concepts like creation of db, collection and operations on them. But I really did not…
lakshman_dev
  • 94
  • 1
  • 12
1
vote
2 answers

Is there any way to remove indexedDB if database name is LokiCatalog

Is there any way to remove indexedDB from chrome console for cordova application if database name is LokiCatalog?
Vadim Kovrizhkin
  • 1,575
  • 4
  • 16
  • 27
1
vote
0 answers

Relate LokiJS with json and fetch data from Angular 2+

Im using Angular 4 for building an app, but for the moment i want to have data (in memory) like LokiJs do. Can anyone help me how can i implement LokiJs on my Angular project and make it to communicate with my JSON. Is there any npm package that…
egzonmustafa
  • 115
  • 5
  • 13
1
vote
1 answer

How to preserve `LokiJS` data in `localstorage`

my data base is not preserved in local storage. any one help me here? I guess that, lokijs will preserve the data in localstorage by default. But after refresh I am not getting the updated datas. here is my code : jQuery(document).ready(function($)…
3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
1
vote
0 answers

ES6 Angular 1.6 LokiJS module injection filename error

My probleme is : Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to: Error: [$injector:modulerr] Failed to instantiate module function Loki(filename, options) due to: Error: [$injector:unpr] Unknown provider: filename I…
darkiron
  • 1,174
  • 1
  • 10
  • 20
1
vote
0 answers

lokiJs update array in object not persisted

I use lokiJs for angualJS app. I try to update one object in collection withe an array. But data in array was lost ! $scope.seance from loki , exos is internal array $scope.seance.exos.push($scope.exo); try{ …
darkiron
  • 1,174
  • 1
  • 10
  • 20
1
vote
2 answers

requiring loki inMemory database in server.js causes nodemon to constantly restart

Project repo After installed lokijs I created the following database.js file: var loki = require('lokijs'); var db = new loki('db.json'); db.addCollection('top').insert([ { term: 'JavaScript' , style : 'warning' }, { term: 'Angular 2' ,…
Leon Gaban
  • 36,509
  • 115
  • 332
  • 529
1
vote
2 answers

LokiJS - remove and findAndRemove do not work (saveDatabase not saving)

I'm using LokiJS and it's fine for most parts. Except that I can't seem to delete a record from the database. The find gets me the right record to delete, but neither remove() not findAndRemove() remove it after saveDatabase. What am I doing…
Gerry
  • 866
  • 2
  • 12
  • 31
1
vote
2 answers

Find object with value in its array

I'm using lokijs, which has "mongo-similar" query language. devices.insert({key:'d1', name:'Device1', users:['u1'], status: 'OK', current_wl:'123'}) devices.insert({key:'d2', name:'Device2', users:['u1','u1'], status: 'OK', current_wl:'123'}) …
Valentin H
  • 7,240
  • 12
  • 61
  • 111
1
vote
0 answers

Lokijs - Saving to database

According to the documentation on the website it's obvious how to save the data to the database, but right now I'm facing a problem when I integrate with express. For some reason it doesn't want to save the data. Here is a sample of the code:…
Mark
  • 1,603
  • 3
  • 13
  • 18
1
vote
0 answers

Importing LokiJS on Ionic2 Typescript app

I'm new to TypeScript and Ionic2 and tried to use LokiJS on a first app. So far I created a new app as suggested on Ionic2 doc: npm install -g ionic cordova typings ionic start cutePuppyPics --v2 cd cutePuppyPics After that I installed loki and…
kerosene
  • 930
  • 14
  • 31
1
vote
1 answer

What is the maximum stoage size of lokijs.js?

Have you tried lokijs.js with large amount data for desktop browsers and What is the maximum stoage size of lokijs.js?
Sathik Khan
  • 439
  • 4
  • 13
1
vote
2 answers

Offline portable web app, Javascript. How to get a persistent database across computers?

I have an offline web app for PC with JavaScript and I am looking to add a database to it. The problem is that it requires persistent data storage across multiple computers (via USB). So I want to find a way to store this data on a USB instead of on…