sco_storage_v1.column_count
Returns number of columns of a held cursor into required uint32_t out_count; no current row needed; output initialized to 0.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, uint64_t, uint32_t *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sco_storage_v1.column_count |
| Record ID | sco-storage-v1-column-count |
| Service | sco.storage |
| Table | sco_storage_v1 |
| Version macro | SCO_STORAGE_VERSION_1_0 |
| Packed table version | 65536 |
| Since / availability | size >= 96; 1.0 |
| Complete member extent (x64 bytes) | 96 |
| Table size (x64 bytes) | 128 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*column_count)(sco_plugin* self, uint64_t cursor, uint32_t* out_count);
Returns number of columns of a held cursor into required uint32_t out_count; no current row needed; output initialized to 0.
Results and failures
Section titled “Results and failures”Common storage failures; BAD_ARG NULL output; NOT_FOUND unknown/non-owned cursor; *out_count initialized to 0.
Absent capability
Section titled “Absent capability”unspecified
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”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.
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(*column_count) |
| cpp | typed-wrapper | include/scosdk/storage.hppif (detail::CanCall(t_, &sco_storage_v1::column_count)) t_->column_count(self_, id_, &n); |
| csharp | typed-wrapper | sdk/csharp/Sco.Sdk/Storage.csreturn _id != 0 && _s.Table != null && _s.Table->size >= (uint)((byte*)&_s.Table->column_count - (byte*)_s.Table + sizeof(nint)) && _s.Table->column_count != null && _s.Table->column_count(_s.SelfFor, _id, &n) == ScoResult.Ok ? (int)n : 0; |
| lua | restricted | plugins/lua/sco_lua.cr = st->column_count(s->self, c->id, &ncols);sdk/docs/lua.md Cursors are the runtime’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.