Add TTL support (EXPIRE, TTL, EXPIREAT) to Redis extension#10
Open
JC1738 wants to merge 1 commit intoQuery-farm:mainfrom
Open
Add TTL support (EXPIRE, TTL, EXPIREAT) to Redis extension#10JC1738 wants to merge 1 commit intoQuery-farm:mainfrom
JC1738 wants to merge 1 commit intoQuery-farm:mainfrom
Conversation
Open
Implements complete Time-To-Live operations with proper error handling and optimization. Adds 3 scalar functions matching Redis protocol. ## Features - redis_expire(key, seconds, secret) → Set TTL in seconds - redis_ttl(key, secret) → Get remaining TTL (-2/-1/positive) - redis_expireat(key, timestamp, secret) → Set expiry at Unix timestamp ## Implementation - 4 protocol formatters (formatExpire, formatExpireAt, formatTtl, parseIntegerResponse) - Error handling with try-catch blocks - Secret access optimization (extract once before loops) - Follows AGENTS.md patterns ## Files changed - src/redis_extension.cpp: +135/-2 lines - docs/README.md: +20 lines - test/sql/redis.test: +15 lines - .gitignore: +5 lines
734e04c to
e209c82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds three scalar functions for managing key time-to-live in Redis:
Implementation details:
All functions follow existing patterns and pass unit tests. Live-tested against local Redis instance - all TTL operations working correctly.