amark on master
reduce not-found acks if via/re… test undo tmp (compare)
amark on master
unbuild - PUBLISHED! 1238 (compare)
amark on master
SEA - Update sea.work to suppor… (compare)
amark on master
stupid cache miss kills me all … (compare)
Hello. I get a question. The message list in gunDB will increase to a very large size and will crash the app. the history message should be cleared up. How can i delete the message list?
I use the .set API to set the message into the message list
About your answer, use .put
to replace .set
. How can i store the message list in gunDB
@WillWang002_twitter from the docs
Querying is not provided out of the box, but path traversal and map functions can do a lot of the heavy lifting. gun.get(‘index’).map().on(callback) or .once(callback) will execute / traverse all children of that index and given a callback that can check properties against a query will return the data as a query result.
To keep queries performant your data model should keep data accessible in small networks. This can be done in using specialized indices to keep the set of data small. For example, querying for a person with the name 'Alice' in a huge database by following the 'allNodesIndex' will perform poorly, as the gun.get('allNodes').map().once(callback) will execute the callback on each node in the graph, while a 'person' index only iterates over the person nodes in the graph. And if your data includes gender, you may have a 'female' index, reducing the search space further.
If you have arbitrary values, such as ages or numbers or multi-node data points, you can build a binary tree structure for indexing.
Modeling your data for your use case and for your most common queries can greatly increase the performance of your queries. Often the best approach is to start studying graphs and knowledge representation in depth instead of trying to use something like SQL queries in an attempt to keep using old data approaches.
Anyway my main question is: how to change the username email address. I searched this forum, and Mark pointed out to change the pubkey by .set() method. I tried unsuccessfully, maybe I am not writing the correct code. Can someone suggest a sample working code like e.g. user.get("is").get("alias").put("blah@blah.com"); to point in the right direction?
where
let user = gun.user().recall({sessionStorage: true});
let gun = Gun(["http://localhost:8765/gun"]);
let gun = Gun();
does work, but then I have no relay peer and can't access the data from another browser
const rel = Gun.val.link.; // '#'
TypeError: Cannot read property 'link' of undefined
.put(null)
. It's probably safer to just go with that