50 references to Result
Microsoft.CodeAnalysis.Workspaces (50)
Storage\SQLite\Interop\NativeMethods.cs (25)
16public static SafeSqliteHandle sqlite3_open_v2(string filename, int flags, string? vfs, out Result result) 18result = (Result)raw.sqlite3_open_v2(filename, out var wrapper, flags, vfs); 19if (result != Result.OK) 37public static SafeSqliteStatementHandle sqlite3_prepare_v2(SafeSqliteHandle db, string sql, out Result result) 41result = (Result)raw.sqlite3_prepare_v2(db.DangerousGetWrapper(), sql, out var wrapper); 42if (result != (int)Result.OK) 60public static SafeSqliteBlobHandle sqlite3_blob_open(SafeSqliteHandle db, utf8z sdb, utf8z table, utf8z col, long rowid, int flags, out Result result) 64result = (Result)raw.sqlite3_blob_open(db.DangerousGetWrapper(), sdb, table, col, rowid, flags, out var wrapper); 65if (result != (int)Result.OK) 100public static Result sqlite3_busy_timeout(SafeSqliteHandle db, int ms) 103return (Result)raw.sqlite3_busy_timeout(db.DangerousGetWrapper(), ms); 118public static Result sqlite3_blob_read(SafeSqliteBlobHandle blob, Span<byte> bytes, int offset) 121return (Result)raw.sqlite3_blob_read(blob.DangerousGetWrapper(), bytes, offset); 124public static Result sqlite3_reset(SafeSqliteStatementHandle stmt) 127return (Result)raw.sqlite3_reset(stmt.DangerousGetWrapper()); 130public static Result sqlite3_step(SafeSqliteStatementHandle stmt) 133return (Result)raw.sqlite3_step(stmt.DangerousGetWrapper()); 136public static Result sqlite3_bind_text(SafeSqliteStatementHandle stmt, int index, string val) 139return (Result)raw.sqlite3_bind_text(stmt.DangerousGetWrapper(), index, val); 146public static Result sqlite3_bind_text(SafeSqliteStatementHandle stmt, int index, ReadOnlySpan<byte> val) 149return (Result)raw.sqlite3_bind_text(stmt.DangerousGetWrapper(), index, val); 152public static Result sqlite3_bind_int64(SafeSqliteStatementHandle stmt, int index, long val) 155return (Result)raw.sqlite3_bind_int64(stmt.DangerousGetWrapper(), index, val); 158public static Result sqlite3_bind_blob(SafeSqliteStatementHandle stmt, int index, ReadOnlySpan<byte> bytes) 161return (Result)raw.sqlite3_bind_blob(stmt.DangerousGetWrapper(), index, bytes);
Storage\SQLite\Interop\SqlException.cs (2)
9internal class SqlException(Result result, string message) : Exception(message) 11public readonly Result Result = result;
Storage\SQLite\v2\Interop\SqlConnection.cs (12)
100var handle = NativeMethods.sqlite3_open_v2(databasePath, (int)flags, vfs: null, out var result); 102if (result != Result.OK) 182if (result != Result.DONE && throwOnError) 192var handle = NativeMethods.sqlite3_prepare_v2(_handle, query, out var result); 416out var result); 418if (result == Result.ERROR) 431=> ThrowIfNotOk((Result)result); 433public void ThrowIfNotOk(Result result) 436public static void ThrowIfNotOk(SafeSqliteHandle handle, Result result) 438if (result != Result.OK) 444public void Throw(Result result) 447public static void Throw(SafeSqliteHandle handle, Result result)
Storage\SQLite\v2\Interop\SqlStatement.cs (6)
15/// either <see cref="Result.DONE"/> if the command completed and produced no 16/// value, or <see cref="Result.ROW"/> if it evaluated out to a sql row that can 41public Result Step(bool throwOnError = true) 43var stepResult = NativeMethods.sqlite3_step(statement); 48if (stepResult is not Result.DONE and not Result.ROW)
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (1)
346if (stepResult == Result.ROW)
Storage\SQLite\v2\SQLitePersistentStorage_StringIds.cs (4)
86if (exception.Result == Result.CONSTRAINT) 150if (stepResult == Result.ROW) 181Result stepResult; 182while ((stepResult = statement.Step()) == Result.ROW)