sco_storage_v1.begin
SCO_BAD_ARG: one is already open. Until commit nothing the plugin writes is durable; ordinary unload, non-retained crash cleanup or rollback undoes all of it. Retained-provider faults skip rollback/close hooks and require restart.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sco_storage_v1.begin |
| Record ID | sco-storage-v1-begin |
| Service | sco.storage |
| Table | sco_storage_v1 |
| Version macro | SCO_STORAGE_VERSION_1_0 |
| Packed table version | 65536 |
| Since / availability | size >= 48; 1.0 |
| Complete member extent (x64 bytes) | 48 |
| Table size (x64 bytes) | 128 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*begin)(sco_plugin* self);
SCO_BAD_ARG: one is already open. Until commit nothing the plugin writes is durable; ordinary unload, non-retained crash cleanup or rollback undoes all of it. Retained-provider faults skip rollback/close hooks and require restart.
Results and failures
Section titled “Results and failures”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 capability
Section titled “Absent capability”Absent table: query_service NOT_FOUND.
Ownership
Section titled “Ownership”Caller buffers; inputs/SQL parameters copied during call. Host owns database/cursors; no SQLite pointer or allocation crosses the ABI.
Thread affinity
Section titled “Thread affinity”Any thread; calls serialize per plugin. Same-call recursive reentrancy unspecified.
Callback context
Section titled “Callback context”unspecified
Reentrancy
Section titled “Reentrancy”unspecified
Cleanup and cancellation
Section titled “Cleanup and cancellation”rollback or ordinary unload/non-retained crash cleanup undoes uncommitted writes; no per-call interrupt API. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls.
Language mappings
Section titled “Language mappings”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(*begin) |
| cpp | typed-wrapper | include/scosdk/storage.hppsco_result Begin() noexcept { return detail::CanCall(t_, &sco_storage_v1::begin) && detail::CanCall(t_, &sco_storage_v1::rollback) ? t_->begin(self_) : SCO_UNAVAILABLE; } |
| csharp | typed-wrapper | sdk/csharp/Sco.Sdk/Storage.cspublic ScoResult Begin() => _t == null || _t->size < (uint)((byte*)&_t->rollback - (byte*)_t + sizeof(nint)) || _t->begin == null || _t->rollback == null ? ScoResult.Unavailable : _t->begin(Self); |
| lua | typed-wrapper | plugins/lua/sco_lua.cStoreTx(L, st ? st->begin : NULL, st, s) |
Examples
Section titled “Examples”- tests/abi_storage.c
- tests/test_lua.cpp
- tests/test_settings.cpp
- tests/test_storage.cpp
- sdk/csharp/Sco.Sdk.Tests/FakeHost.cs
- tools/test.sh
- sdk/csharp/Sco.Sdk.Tests/Layout.cs
ABI pins prove layout, not semantic behavior or a live game session.