Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 30 03:31
    Alengeorge-01 commented #1279
  • Sep 29 21:58
    draeder commented #1279
  • Sep 29 21:55
    draeder commented #1279
  • Sep 28 07:58
    mmalmi commented #1282
  • Sep 28 04:07
    Alengeorge-01 commented #1279
  • Sep 28 04:07
    Alengeorge-01 commented #1279
  • Sep 28 04:06
    Alengeorge-01 commented #1279
  • Sep 27 23:41
    amark closed #1283
  • Sep 27 23:41
    amark commented #1283
  • Sep 27 23:39
    amark commented #1280
  • Sep 27 23:25
    amark edited #1279
  • Sep 27 23:24
    amark commented #1279
  • Sep 27 23:21
    amark closed #1273
  • Sep 27 23:21
    amark commented #1273
  • Sep 27 23:16
    amark commented #1271
  • Sep 27 23:10
    amark commented #1282
  • Sep 27 23:02
    amark commented #1277
  • Sep 27 22:59
    amark commented #1024
  • Sep 27 22:48
    amark commented #1275
  • Sep 24 23:36
    syonfox updated the wiki
Jachen Duschletta
@Dletta
[D]jabis: with the rad/lex query
[D]jabis: (for some reason)
Wasis Haryo Sasoko
@yokowasis

you mean

gun.get({'#': 'chat', '.': '2019/06/20:10:10:10.30'}).map().once(s=>{
  console.log(s);
})

like this ?

Jachen Duschletta
@Dletta
[D]jabis: yes
[D]jabis: not sure about the query, am on phone, check the docs
Wasis Haryo Sasoko
@yokowasis
yeah totally the same
it result the whole array
Jachen Duschletta
@Dletta
[D]jabis: gun.get('chat').get({'.': {'*': '2019/06/'}}).map().once((data)=>{ console.log("data is",data); })
Wasis Haryo Sasoko
@yokowasis
yeah that straight up didn't work.
Jachen Duschletta
@Dletta
[D]jabis: see note about what you need to include in order to use it in browser
Wasis Haryo Sasoko
@yokowasis
Yeah, i have been on that pages for hours. still can't get the code on the docs working. I straight up copy pasting it.
Jachen Duschletta
@Dletta
[D]jabis: if you want direct match you need to use '='
Wasis Haryo Sasoko
@yokowasis
    <script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/gun/sea.js"></script>    
    <script src="https://cdn.jsdelivr.net/npm/gun/lib/radix.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/gun/lib/radisk.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/gun/lib/store.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/gun/lib/rindexed.js"></script>    
    <script src="https://unpkg.com/peerjs@1.3.1/dist/peerjs.min.js"></script>
my include
Jachen Duschletta
@Dletta
[D]jabis: don't know which version of gun jsdelivr from npm uses
Wasis Haryo Sasoko
@yokowasis
you mean
gun.get({'#': 'chat', '.' = '2019/06/20:10:10:10.30'}).once(s=>{
  console.log(s);
})
Jachen Duschletta
@Dletta
[D]jabis: no
Wasis Haryo Sasoko
@yokowasis
gun.get({'#': 'chat', '=' : '2019/06/20:10:10:10.30'}).once(s=>{
  console.log(s);
})
?
Jachen Duschletta
@Dletta
[D]jabis: {'.': {'>': 'dave', '<': 'fred'}, '%': 50000} , so it would be .get('chat').get({'.':{'=':'2019/06/20:10:10:10.30'}})
[D]jabis: also include the byte percentage for hit
[D]jabis: and you NEED to use map with all rad queries
[D]jabis: without map in there it won't trigger the lex portion at all
Wasis Haryo Sasoko
@yokowasis

tried

gun.get('chat').get({'.':{'=':'2019/06/20:10:10:10.30'}}).map().once(s=>{
  console.log(s);
})

straight up doesn't work. the callback didn't get called.

I didn't know whether this is a gun bug, or just mistakes on the docs.
Jabis Sevon
@jabis
image.png
probably your gun version
might have a bug there
(note I'm using my browser's location.host +'-testing' as "sandbox" for these random debuggings, to not put unnamespaced testing stuff to the root :)
Wasis Haryo Sasoko
@yokowasis
@jabis , are you doing put before running the script ? can you try running the script without putting it in the same command ?
Jabis Sevon
@jabis
gun.get(window.location.host+'-testing').get('chat').get('2021/06/31').put({stuff:'this is shown'}).once(Gun.log)
and
gun.get(window.location.host+'-testing').get('chat').get('2021/05/31').put({stuff:'this is hidden'}).once(Gun.log)
so you see I pulled records '>':'2021/06'
and only the "this is shown" was shown
without map it returned the both
gun.get(window.location.host+'-testing').get('chat').get({'.':{'>':'2021/06'},'%':50000}).map().once(Gun.log)
you can drop the first get out
leave the rest (well modify the timestamp)
Wasis Haryo Sasoko
@yokowasis
yap, doesn't work on me.
Jabis Sevon
@jabis
I used 2021/05 and 2021/06 vs your 2019/06 whatevs :)
image.png
also tested the '=' operator and it matches
I have no idea tho what my gun version is, so can't help much more than this :D
Wasis Haryo Sasoko
@yokowasis
send your gun.js file here
this works
gun.get('chat').get('2021/06/31').put({stuff:'this is shown'}).once(Gun.log)

gun.get('chat').get({'.' : {'>' : '2021/06' },'%' : 50000 }).map().once(s=>{
  console.log (s);
})

gun.get('chat').get({'.':{'>':'2021/06'},'%':50000}).map().once(Gun.log)
this doesn't work
gun.get('chat').get({'.' : {'>' : '2021/06' },'%' : 50000 }).map().once(s=>{
  console.log (s);
})

gun.get('chat').get({'.':{'>':'2021/06'},'%':50000}).map().once(Gun.log)
Jabis Sevon
@jabis
I believe it would need all the radix etc files as well
Wasis Haryo Sasoko
@yokowasis
like I said, it fails silently. Callback is not called. Do I really need to put things first before it get fired ?
can you try it @jabis ?