Skip to content

sco_storage_v1.exec

Runs one statement with nparams bound parameters (?, ?NNN, :name in index order; nparams must equal the statement’s count; params may be NULL with 0). Rows it returns are dropped. out_changes (optional): rows changed. SCO_BAD_ARG: not exactly one statement, a syntax error, a wrong parameter count, or something storage refuses (ATTACH, DETACH, BEGIN, COMMIT, SAVEPOINT, VACUUM, a PRAGMA outside the list in docs/storage.md, schema changes to a table or index named sco_*). SCO_FAILED: it ran and failed (a constraint, its time budget, the database busy); last_error says why. SCO_TOO_MANY: the quota is full.

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

Service index

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

Header source

sco_result (*exec)(sco_plugin* self, const char* sql, const sco_sql_value* params, uint32_t nparams, int64_t* out_changes);
Runs one statement with nparams bound parameters (?, ?NNN, :name in index order; nparams must equal the statement’s count; params may be NULL with 0). Rows it returns are dropped. out_changes (optional): rows changed. SCO_BAD_ARG: not exactly one statement, a syntax error, a wrong parameter count, or something storage refuses (ATTACH, DETACH, BEGIN, COMMIT, SAVEPOINT, VACUUM, a PRAGMA outside the list in docs/storage.md, schema changes to a table or index named sco_*). SCO_FAILED: it ran and failed (a constraint, its time budget, the database busy); last_error says why. SCO_TOO_MANY: the quota is full.

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
(*exec)
cpp typed-wrapper include/scosdk/storage.hpp
return t_->exec(self_, sql, params.size() ? params.begin() : nullptr, static_cast<uint32_t>(params.size()), changes);
csharp typed-wrapper sdk/csharp/Sco.Sdk/Storage.cs
r = _t->exec(Self, s, block.Values, block.Count, &c);
lua typed-wrapper plugins/lua/sco_lua.c
const sco_result r = st->exec(s->self, sql, n ? params : NULL, n, &changes);

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