Files
browser/plugins/examples/scum-server-plugin/assets/scum-live/queries/player-economy-read.json
T
2026-08-13 08:27:22 +08:00

30 lines
1.8 KiB
JSON

{
"key": "scum-player-economy-read-v1",
"adapterVersion": "scum-live-data-v1",
"queryVersion": "scum-sqlite-query-v1",
"capability": "player-details.read",
"requiredSchemaFingerprint": "sha256:ebd477d6c6ead9c34c41169af489236d762a76186d45dedd753d50f1b81e26f0",
"statementType": "single-select-or-cte",
"statement": "SELECT u.id AS externalPlayerId, up.id AS profileId, bar.id AS bankAccountId, bac.id AS currencyRowId, bac.currency_type AS currencyType, bac.account_balance AS accountBalance FROM \"user\" u JOIN user_profile up ON up.user_id = u.id AND up.type = 1 JOIN bank_account_registry bar ON bar.account_owner_user_profile_id = up.id JOIN bank_account_registry_currencies bac ON bac.bank_account_id = bar.id WHERE u.id = :externalPlayerId ORDER BY bac.currency_type ASC, bac.id ASC LIMIT :limit",
"parameters": [
{ "name": "externalPlayerId", "binding": ":externalPlayerId", "type": "string", "required": true, "minLength": 1, "maxLength": 96 },
{ "name": "limit", "binding": ":limit", "type": "integer", "required": true, "minimum": 1, "maximum": 16 }
],
"safety": {
"queryOnly": true,
"readOnlyConnection": true,
"forbidMultipleStatements": true,
"forbidAttach": true,
"forbidWritePragmas": true,
"forbidExtensionLoading": true,
"maxRows": 16,
"timeoutMs": 2000,
"maxResultBytes": 32768
},
"evidence": {
"source": "openspec/changes/replace-scum-projections-with-real-data-management/evidence/scum-current-service-sqlite-diagnostic-2026-08-12.md",
"provenJoins": ["bank_account_registry.account_owner_user_profile_id -> user_profile.id", "bank_account_registry_currencies.bank_account_id -> bank_account_registry.id"],
"ambiguity": "Currency labels, units, command execution, and readback confirmation are unverified; currencyType remains numeric and version-scoped."
}
}