Skip to content

sco_storage_v1.next_key

The first key that starts with prefix (NULL or “”: any key) and sorts after “after” (NULL: from the start), in byte order, copied NUL-terminated with the size handshake. Iterate by passing the last key back as after. SCO_NOT_FOUND: no more keys.

sco_result (*)(sco_plugin *, const char *, const char *, char *, uint32_t *)

Service index

Property Value
Symbol sco_storage_v1.next_key
Record ID sco-storage-v1-next-key
Service sco.storage
Table sco_storage_v1
Version macro SCO_STORAGE_VERSION_1_0
Packed table version 65536
Since / availability size >= 40; 1.0
Complete member extent (x64 bytes) 40
Table size (x64 bytes) 128

Header source

sco_result (*next_key)(sco_plugin* self, const char* prefix, const char* after, char* out, uint32_t* inout_size);
The first key that starts with prefix (NULL or “”: any key) and sorts after “after” (NULL: from the start), in byte order, copied NUL-terminated with the size handshake. Iterate by passing the last key back as after. SCO_NOT_FOUND: no more keys.

Absent table: query_service NOT_FOUND. Stopped: UNAVAILABLE; invalid/released self: BAD_ARG. Allocation exceptions: TOO_MANY; database errors may be FAILED. Additional failures/output state unspecified unless described in the buffer contract.

Absent table: query_service NOT_FOUND.

Caller buffers; inputs/SQL parameters copied during call. Host owns database/cursors; no SQLite pointer or allocation crosses the ABI.

Any thread; calls serialize per plugin. Same-call recursive reentrancy unspecified.

unspecified

unspecified

No cancellation entrypoint; ordinary unload/non-retained crash cleanup rolls back transaction and closes cursors/database. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sco_storage.h
(*next_key)
cpp typed-wrapper include/scosdk/storage.hpp
const sco_result r = t_->next_key(self_, prefix, out.empty() ? nullptr : last.c_str(), buf, &size);
csharp typed-wrapper sdk/csharp/Sco.Sdk/Storage.cs
return _t->next_key(Self, pp, ap, buf, size);
lua typed-wrapper plugins/lua/sco_lua.c
const sco_result r = st->next_key(s->self, prefix, after, key, &size);

ABI pins prove layout, not semantic behavior or a live game session.