{"record":{"id":"05bfe096338551ca","repo":"tursodatabase/turso","slug":"only-input-parameters-are-supported","errorCode":null,"errorMessage":"Only input parameters are supported","messagePattern":"Only input parameters are supported","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"bindings/dotnet/src/Turso.Data/TursoParameter.cs","lineNumber":75,"sourceCode":"        DbType = dbType;\n        Value = value;\n    }\n\n    public override void ResetDbType()\n    {\n        DbType = DbType.String;\n    }\n\n    public override DbType DbType { get; set; } = DbType.String;\n\n    public override ParameterDirection Direction\n    {\n        get => ParameterDirection.Input;\n        set\n        {\n            if (value != ParameterDirection.Input)\n            {\n                throw new ArgumentException(\"Only input parameters are supported\");\n            }\n        }\n    }\n    public override bool IsNullable { get; set; }\n    [AllowNull]\n    public override string ParameterName { get; set; } = \"\";\n\n    [AllowNull]\n    public override string SourceColumn { get; set; } = \"\";\n    public override object? Value { get; set; }\n    public override bool SourceColumnNullMapping { get; set; }\n\n    public TursoValue ToValue()\n    {\n        if (Value is null)\n            return new TursoValue { ValueType = TursoValueType.Null };\n\n        var value = Value;","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/tursodatabase/turso/blob/6c7252267988c76e632af00a671e4b9788dfae13/bindings/dotnet/src/Turso.Data/TursoParameter.cs#L57-L93","documentation":"TursoParameter.Direction only ever returns ParameterDirection.Input, and the setter throws ArgumentException for any other value (Output, InputOutput, ReturnValue). Turso's statement protocol binds values client-to-server only; it has no output-parameter mechanism, so requesting one is rejected immediately rather than silently ignored.","triggerScenarios":"Setting 'parameter.Direction = ParameterDirection.Output' (or InputOutput/ReturnValue) on a TursoParameter; ORMs or generic ADO.NET helpers that set Direction on every parameter; code ported from SQL Server stored-procedure call sites.","commonSituations":"Migrating stored-procedure-based code that used OUTPUT parameters; Dapper/EF-style helpers that probe directions; copy-pasted command wrappers that set Direction explicitly.","solutions":["Remove the Direction assignment — Input is already the default.","Restructure code that relied on OUT parameters: use SELECT to return values and read them with a reader (or use ExecuteScalar).","If a shared helper sets Direction, gate it: only assign when the value is ParameterDirection.Input, or skip Turso commands."],"exampleFix":"// before\nvar p = new TursoParameter(\"@newId\", 0) { Direction = ParameterDirection.Output };\n\n// after\nvar p = new TursoParameter(\"@newId\", 0); // direction stays Input; read results via SELECT instead","handlingStrategy":"validation","validationCode":"if (parameter.Direction != ParameterDirection.Input)\n    throw new NotSupportedException(\"Turso supports input parameters only; return data via SELECT.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["In provider-agnostic helpers, skip assigning Direction for Turso rather than setting it unconditionally.","Refactor OUT-parameter patterns to SELECT-based returns before migrating to Turso."],"tags":["csharp","dotnet","parameters","stored-procedures","unsupported-feature"],"backgroundTag":"output-parameter-unsupported","analyzedSha":"6c7252267988c76e632af00a671e4b9788dfae13","analyzedAt":"2026-08-20T07:02:18.389Z","contentChangedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}