Skip to content
Search ffkv docs

Search the complete handbook, locally.

    EXISTS

    Determines whether one or more keys exist.

    Browse all commands · Upstream source documentation

    Reference fieldValue
    Canonical nameEXISTS
    Catalog groupGeneric commands
    Upstream since1.0.0 — upstream Redis/module version, not an ffkv release
    Pinned catalogRedis 8.10.0
    EXISTS key [key ...]

    TTL deadlines use wall-clock time and remain absolute across restart. Key/database operations can overwrite or remove data; SCAN is incremental rather than an atomic snapshot. New typed structures remain in RAM in hybrid mode.

    Source: README.md:193–195, 375–377, 584–585; tests/bdd/features/generic.feature.

    All requests share the 8 MiB framing/1,024-argument ingress limit; normal RESP replies have 64 MiB wire/logical budgets with bounded nesting/value counts. Management and Lua origins impose smaller budgets. These are not a process RSS cap. Catalog inclusion is not exhaustive option or wire-format parity. See limits and compatibility.

    The following fields come from the pinned Redis metadata, not measured ffkv performance or an assertion that ffkv enforces every upstream flag. Running COMMAND INFO/COMMAND DOCS describe the current engine.

    Upstream Redis complexity: O(N) where N is the number of keys to check.

    Upstream arity: -2 (includes the command name; a negative number is a minimum).

    Command flags: READONLY, FAST.

    ACL categories: KEYSPACE.

    Command tips: REQUEST_POLICY:MULTI_SHARD, RESPONSE_POLICY:AGG_SUM.

    ArgumentTypeConstraints / metadata
    keykeymultiple; key_spec_index: 0

    Upstream key discovery descriptors (indexes are relative to the full command vector):

    [
    {
    "flags": [
    "RO"
    ],
    "begin_search": {
    "index": {
    "pos": 1
    }
    },
    "find_keys": {
    "range": {
    "lastkey": -1,
    "step": 1,
    "limit": 0
    }
    }
    }
    ]
    Additional pinned upstream metadata
    {
    "group": "generic",
    "since": "1.0.0",
    "history": [
    [
    "3.0.3",
    "Accepts multiple `key` arguments."
    ]
    ]
    }

    Metadata source · Local snapshot: src/command_metadata.json, key exists.

    These are source observations, not a test run performed by this documentation build. A tag identifies scenario intent; an extracted vector identifies a command invocation, which may intentionally produce an error. Scenarios may require setup, multiple connections, persistence, cluster nodes or native-module fixtures.

    • Missing bitmaps read as zero without creating a key — tests/bdd/features/bitmaps.feature:123; invocation observed.
    • Bitfield overflow modes and read-only commands preserve values — tests/bdd/features/bitmaps.feature:167; invocation observed.
    • NOT is unary and aliases use original source data — tests/bdd/features/bitmaps.feature:405; invocation observed.
    • Database-local flush never removes another database — tests/bdd/features/catalog.feature:92; invocation observed.
    • Copy across databases replaces only when requested and detaches hash values and field deadlines — tests/bdd/features/generic.feature:5; invocation observed.
    • Existence counts repeated arguments but deletion counts each removed key once — tests/bdd/features/generic.feature:129; command tag and invocation observed.
    • Invalid serialized data cannot replace a live value or its deadline — tests/bdd/features/generic.feature:256; invocation observed.
    • Move respects destination collisions and transfers a hash with its deadline to another database — tests/bdd/features/generic.feature:768; invocation observed.
    • Rename overwrites the destination and preserves the source collection and expiration — tests/bdd/features/generic.feature:1042; invocation observed.
    • Migration copies into a real target database and removes the source only for a move — tests/bdd/features/generic.feature:1408; invocation observed.
    • Deletion counts each existing field only once and removes an empty key — tests/bdd/features/hashes.feature:165; invocation observed.
    • Get-and-delete processes duplicate fields in order and deletes the last-field key — tests/bdd/features/hashes.feature:319; invocation observed.
    • All-fields conditions are atomic and keep existing field expirations — tests/bdd/features/hashes.feature:430; invocation observed.
    • HEXPIRE reports per-field outcomes and respects expiration conditions — tests/bdd/features/hashes.feature:486; invocation observed.
    • HPEXPIRE reports per-field outcomes and respects expiration conditions — tests/bdd/features/hashes.feature:526; invocation observed.
    • Non-hash target type takes precedence over missing definitions — tests/bdd/features/hashes.feature:1042; invocation observed.
    • Zero relative expiry is immediately destructive and duplicate-safe — tests/bdd/features/hashes.feature:1455; invocation observed.
    • Duplicate elements do not update cardinality and cache invalidates — tests/bdd/features/hyperloglog.feature:5; invocation observed.
    • Union deduplicates overlapping input and supports destination aliases — tests/bdd/features/hyperloglog.feature:89; invocation observed.
    • Sparse decoding and dense conversion expose real representation — tests/bdd/features/hyperloglog.feature:161; invocation observed.
    • Counted pops return traversal order and delete emptied keys — tests/bdd/features/lists.feature:93; invocation observed.
    • Negative indexes and inclusive trim endpoints preserve list order — tests/bdd/features/lists.feature:163; invocation observed.
    • Exactly is all-or-nothing and count bounds the available source — tests/bdd/features/lists.feature:586; invocation observed.
    • Exactly blocking movement waits for the entire batch and preserves binary payloads — tests/bdd/features/lists.feature:726; invocation observed.
    • Finite blocking timeouts return null without creating destination lists (Scenario Outline) — tests/bdd/features/lists.feature:833; invocation observed.
    • An insertion wakes an exact batch after an earlier insufficient push — tests/bdd/features/lists.feature:938; invocation observed.
    • An exact batch timeout leaves a short source untouched — tests/bdd/features/lists.feature:980; invocation observed.
    • Insert ignores creation allocation budgets for existing filters — tests/bdd/features/probabilistic.feature:4; invocation observed.
    • A no-writes declaration is enforced rather than trusted — tests/bdd/features/scripting.feature:597; invocation observed.
    • DROPINDEX keeps documents unless DD explicitly deletes indexed sources — tests/bdd/features/search.feature:462; invocation observed.
    • Membership changes count distinct members and remove empty keys — tests/bdd/features/sets.feature:5; invocation observed.
    • SDIFFSTORE can overwrite an input after computing the result — tests/bdd/features/sets.feature:197; invocation observed.
    • SINTERSTORE can overwrite an input after computing the result — tests/bdd/features/sets.feature:237; invocation observed.
    • SUNIONSTORE can overwrite an input after computing the result — tests/bdd/features/sets.feature:277; invocation observed.
    • Moves preserve the source on wrongtype and handle same-key aliases — tests/bdd/features/sets.feature:507; invocation observed.
    • Popping a singleton deletes the source and rejects negative counts — tests/bdd/features/sets.feature:568; invocation observed.
    • Explicit remove counts each member once and removes an empty key — tests/bdd/features/sorted_sets.feature:361; invocation observed.
    • Lex removal preserves scores and deletes the last-member key — tests/bdd/features/sorted_sets.feature:433; invocation observed.
    • Maximum pop reverses tied members and deletes the empty key — tests/bdd/features/sorted_sets.feature:505; invocation observed.
    • Range store resolves source before overwrite and preserves original scores — tests/bdd/features/sorted_sets.feature:753; invocation observed.
    • Blocking minimum pop wakes on insertion and returns a flat scored tuple — tests/bdd/features/sorted_sets.feature:833; invocation observed.
    • Blocking multi pop wakes and caps count at available cardinality — tests/bdd/features/sorted_sets.feature:889; invocation observed.
    • Blocking sorted-set timeouts return null without creating keys — tests/bdd/features/sorted_sets.feature:1167; invocation observed.

    The following JSON arrays are the test harness’s argument vectors, not shell commands. Numeric arguments are converted by the harness; objects of the form {"base64":"…"} represent decoded binary bytes, not a literal JSON command argument. Preserve scenario setup and connection ordering. See the CLI guide for shell quoting and binary stdin. No reply is invented or inferred.

    NOT is unary and aliases use original source data — tests/bdd/features/bitmaps.feature:456 (I execute:)

    [
    "EXISTS",
    "y"
    ]

    Next source assertion: the reply equals:

    0

    Deletion counts each existing field only once and removes an empty key — tests/bdd/features/hashes.feature:179 (I execute:)

    [
    "EXISTS",
    "h"
    ]

    Next source assertion: the reply equals:

    0

    Counted pops return traversal order and delete emptied keys — tests/bdd/features/lists.feature:115 (I execute:)

    [
    "EXISTS",
    "q"
    ]

    Next source assertion: the reply equals:

    0