Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 30 19:03
    mceachen opened #901
  • Nov 11 00:16
    cepm-nate commented #888
  • Nov 11 00:11
    stale[bot] unlabeled #877
  • Nov 11 00:11
    cepm-nate commented #877
  • Nov 03 08:33
    robguthrie commented #900
  • Nov 03 03:48
    robguthrie opened #900
  • Oct 29 13:51
    radex commented #899
  • Oct 29 13:48
    radex synchronize #899
  • Oct 18 02:07
    tonyxiao commented #744
  • Oct 15 12:02
    radex ready_for_review #899
  • Oct 15 12:02
    radex edited #899
  • Oct 15 12:02
    radex edited #899
  • Oct 15 12:02
    radex synchronize #899
  • Oct 15 11:20
    radex synchronize #899
  • Oct 15 11:12
    radex synchronize #899
  • Oct 13 08:34
    radex edited #899
  • Oct 13 08:30
    radex edited #899
  • Oct 13 08:05
    radex edited #899
  • Oct 13 08:05
    radex edited #899
  • Oct 13 08:01
    radex opened #899
braivre
@braivre
Hi! I really love LokiJS thank you so much.
I have a question...I'm using Vue with the autoupdate collection prop and v-model doesn't update the document property. How can I implement autoupdate with Vue?
xeoshow
@xeoshow
Is LokiJS still under maintainance? I found If the computer just shutting down while lokiJS is writing data, the data file will be garbage data and can not be loaded again ... How to resovle this? Thanks!
xeoshow
@xeoshow

My problem summarized as in below issue:
techfort/LokiJS#430

Any help is highly apprieciated!

hatim-heffoudhi
@hatim-heffoudhi
Hello everyone :)
could someone, please give his advice of using lokijs with typescript
?
franck34
@franck34
hi al, hi @techfort. I've started a POC of a TCP/HTTP API Server here https://github.com/franck34/LokiJS-Server. I'd like to brainstorm with everybody who got ideas about TCP API in a first time. Anybody ? @techfort ?
Saksham Khurana
@DawnImpulse
Hii, is it possible to add a listener to dynamic view ?
Night Yoshi
@NightYoshi370_gitlab
Hey, so I fucked up and I accidentally deleted my database.db file. Since lokijs is an in memory thing, can I get it back?
Marouen Dbouba
@maroodb
Hello World! how to synchronize loki db when using nodejs in cluster mode ?
if it is not supported, how can we force lokijs db instance to reload data from file on an event ?
Anthony Buck
@roja
Hi all
I am trying to read and write a lokijs database to / from a string
Could anyone point me in the right direction if someone has attempted this before?
Specifically, I want to manually handle the serialisation and deserialization process... I have attempted to create an adaptor but have struggled to find documentation on how to deal with the "empty state"... Again, any advice is most appreciated.
rbosneag
@rbosneag

Hi all,

I just added lokijsto a small Node app and I'm trying to reuse a collection defined somewhere (app.js) in a different module (blah.js). I do not need persistence, just in-memory db. I was thinking it could be possible to use a sort of loki singleton between such modules but it's not clear how.

Any suggestions?

Adrien Buffet
@adrienbuffet
Hi guys :D
Can anyone explain me the difference between LokiJS-Forge/LokiDB, Root-Core/LokiJS2 and techfort/LokiJS ?
Joe Minichino
@techfort
LokiJS is the db, Loki DB Is the next version which is in development and I have no idea about the root core one
Basically if you intend to use LokiJS in production use the techfort one
Adrien Buffet
@adrienbuffet
Ho I see... When will the LokiDB ready ? Have you planned a release yet ?
If you're the creator of the original project LokiJS, why aren't you in the LokiJS-forge team ?
https://github.com/orgs/LokiJS-Forge/people
Luis Vargas
@luisvt
where can I find examples for LokiDB?
sh0rtwave
@sh0rtwave
Hi all
Encountering an interesting issue when working with transform chains.
While my collections are (for speed) only working with references, and NOT creating clones....the behavior of resolveTransformParams automatically creates clones, which is creating problems with my transform handler when it wants ot resolve, for instance, a collection that references a list of javascript objects with circular references (like for instance, any particular JS-custom rendering object that projects into OpenGL, which would have a non-directed graph of both parent and child object hierarchies...which would call for a reference-based parameter passing method that does NOT clone.
sh0rtwave
@sh0rtwave
My actual transforms are parsed operations that do basic CRUD against key values in an object record....so I have a standard set of "transform handlers" that I parse in with [%lktxp], then those master handler functions create a custom scope within which my operations happen...that custom scope contains live system objects, access to collections, etc. Works great, with that one wrinkle.
I guess what I'm looking for is a kinda, sorta way to (better) bind data into a custom scope, so transforms have access to it in a standard closure-based way...that works with live objects (e.g. doesn't clone them).
sh0rtwave
@sh0rtwave
A couple of thoughts occur to me
A. Detect whether that object can be cloned or not, and throw an exception that can be trapped and handled to have a reference as a fallback (configurable via parameter) so instead of failure, when you need a reference as a parameter vs. a VO, lokijs can do the right thing (but will still chuck a warning, somewhere, somehow, that the programmer SHOULD have to handle)
sh0rtwave
@sh0rtwave
The specific issue I'm having is with eqJoin, and the 'joinData' parameters.
When 'joinData' is an array with, for instance, DOM objects in it, naturally it hits a read-only property somewhere and halts.
sh0rtwave
@sh0rtwave
I'm going to analyze this deeper, and devise a solution.
sh0rtwave
@sh0rtwave
I think I see a way
sh0rtwave
@sh0rtwave
Right. So.
At issue: This problem specifically emerges when using eqJoin in conjunction with data sourced from a collection of live system objects. In this particular instance at least, and probably in others, it might be more appropriate to NOT attempt to do parameter substitution against this type of data. It's being used for join purposes, first, and probably shouldn't be tampered with, and most likely SHOULD be reduced if one follows standard data publishing principles.
e.g. the "joinData" parameter has things like DOM objects in it.
(I'd imagine if you handed it a big joinData with lots of keys, that could also introduce a significant handling delay)
sh0rtwave
@sh0rtwave
So my proposed solution is: Provide a parameter to express a config option where joinData specifically is not parsed for parameter substitution, and then when that value is true, if the incoming parameter key IS joinData, then the action is to simply return the object reference as is, without parsing for params.
Sound fair?
I'll stick that into my fork along with the other bits I've kicked about.
And then I'll make a PR :D
Also I note the magic "420" forks number, someone should probably celebrate somewhere :D
sh0rtwave
@sh0rtwave
Ok, I got a solution crafted.
Hamed Sabeti
@hamedsbt
Hello, can you help me please!
How to make $or for this tow queries?
find({state: {$eq: "a"}});
find({state: {$eq: "b"}, $loki: {$in: [1,2,3]}});

I tried:

chain.find({
      $or: [
        {
          state: {$eq: "a"}
        },
        {
          state: {$eq: "b"}, $loki: {$in: [1,2,3]}
        }
      ]
    });

But does not works as excepted and all rows with state = a has returned. but I have a row with state:b and $loki:3

code-valor
@code-valor
Hi i need help
is anyone there?