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