Ask coding questions

← Back to all posts
Why does ReplDB get all only return the keys?
codingjlu (215)

So whenever I use ReplDB's prefix/get all request, it only returns the keys of the values. Is this the normal behavior? I tried visiting the link in the browser:

$REPLIT_DB_URL?prefix=

And also curl:

curl "$REPLIT_DB_URL?prefix="

And both times, it only returns the keys. When I give it a prefix, the same result. Anyone know why this happens?

Comments
hotnewtop
Coder100 (18143)

yes
that is the normal behavior

as per the docs, ?prefix= gives all the keys with that prefix.

codingjlu (215)

@Coder100 not the normal behavior in every other database I know...

ruiwenge2 (588)

really? when i go to any replit database link it shows a blank page and nothing else

codingjlu (215)

@ruiwenge2 lol that's because you probably didn't set anything.

codingjlu (215)

@ruiwenge2 it's not just the db link. You have to include the query string...

ruiwenge2 (588)

@codingjlu no, in my card creator website, there are 68 keys, and it still shows nothing

codingjlu (215)

@ruiwenge2 did you go to $REPLIT_DB_URL?prefix=?

ruiwenge2 (588)

@codingjlu i JUST tried it...
and still didn't work

ruiwenge2 (588)

@codingjlu can you show me a screenshot of what its supposed to show?

codingjlu (215)

@ruiwenge2 I set three items: Hello, t, and test. I'm visiting $REPLIT_DB_URL?prefix= and here's what it looks like:

codingjlu (215)

And the values is:

Hello = world
t = r
test = Hello
ruiwenge2 (588)

@codingjlu the url of the database for me is something like https://kv.replit.com/blahblahblah