Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add strlen,setex,psetex and setnx cmds #39

Merged
merged 8 commits into from
Dec 1, 2023

Conversation

super-Pan66
Copy link
Contributor

No description provided.

src/cmd_kv.h Outdated Show resolved Hide resolved
src/base_cmd.h Show resolved Hide resolved
src/cmd_kv.cc Outdated Show resolved Hide resolved
src/cmd_kv.cc Outdated Show resolved Hide resolved
src/cmd_kv.cc Outdated Show resolved Hide resolved
@panlei-coder panlei-coder reopened this Nov 22, 2023
@panlei-coder panlei-coder changed the title pcy string cmd:strlen setex psetex setnx feat:strlen setex psetex setnx Nov 22, 2023
@panlei-coder panlei-coder changed the title feat:strlen setex psetex setnx feat: Add strlen,setex,psetex and setnx cmds Nov 22, 2023
@github-actions github-actions bot added the ✏️ Feature New feature or request label Nov 22, 2023
AlexStocks
AlexStocks previously approved these changes Nov 25, 2023
src/cmd_kv.cc Outdated Show resolved Hide resolved
src/cmd_kv.cc Outdated
PSTORE.SetValue(client->argv_[1], PObject::CreateString(client->argv_[3]));
int64_t sec = 0;
pstd::String2int(client->argv_[2], &sec);
PSTORE.SetExpire(client->argv_[1], ::Now() + sec * 1000);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pstd下现在有获取时间戳的函数了, 可以用pstd里的函数获取

src/cmd_kv.cc Outdated
PSTORE.SetValue(client->argv_[1], PObject::CreateString(client->argv_[3]));
int64_t msec = 0;
pstd::String2int(client->argv_[2], &msec);
PSTORE.SetExpire(client->argv_[1], ::Now() + msec);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同样, 时间戳获取改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已替换

@AlexStocks AlexStocks reopened this Nov 30, 2023
@AlexStocks AlexStocks merged commit 5f8ee3b into OpenAtomFoundation:unstable Dec 1, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants