30 references to Database
Microsoft.CodeAnalysis.Workspaces (30)
Storage\SQLite\v2\Database.cs (3)
59
public static string GetName(this
Database
database)
62
Database
.Main => "main",
63
Database
.WriteCache => "writecache",
Storage\SQLite\v2\Interop\SqlConnection.cs (9)
38
private static readonly byte[] s_mainNameWithTrailingZero = GetUtf8BytesWithTrailingZero(
Database
.Main.GetName());
39
private static readonly byte[] s_writeCacheNameWithTrailingZero = GetUtf8BytesWithTrailingZero(
Database
.WriteCache.GetName());
137
? $"attach database '{new Uri(databasePath.Replace("'", "''")).AbsoluteUri}?mode=memory&cache=shared' as {
Database
.WriteCache.GetName()};"
138
: $"attach database 'file::memory:?cache=shared' as {
Database
.WriteCache.GetName()};";
294
public Optional<Stream> ReadDataBlob_MustRunInTransaction(
Database
database, Table table, long rowId)
302
public Optional<Checksum> ReadChecksum_MustRunInTransaction(
Database
database, Table table, long rowId)
360
Database
database, Table table, Column column, long rowId,
379
Database
.Main => s_mainNameWithTrailingZero,
380
Database
.WriteCache => s_writeCacheNameWithTrailingZero,
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (15)
61
var writeCache =
Database
.WriteCache.GetName();
65
$"insert or replace into {
Database
.Main.GetName()}.{TableName} select * from {writeCache}.{TableName};";
67
_select_rowid_from_main_table_where_0primarykey = GetSelectRowIdQuery(
Database
.Main);
68
_select_rowid_from_writecache_table_where_0primarykey = GetSelectRowIdQuery(
Database
.WriteCache);
77
string GetSelectRowIdQuery(
Database
database)
108
public void CreateTable(SqlConnection connection,
Database
database)
159
Func<TData, SqlConnection,
Database
, long, Optional<T>> readColumn,
187
var optional = ReadColumnHelper(connection,
Database
.WriteCache, databaseKey, dataNameId);
191
optional = ReadColumnHelper(connection,
Database
.Main, databaseKey, dataNameId);
204
Optional<T> ReadColumnHelper(SqlConnection connection,
Database
database, TDatabaseKey databaseKey, int dataNameID)
263
SqlConnection connection,
Database
database, long rowId, Checksum? checksum)
296
SqlConnection connection,
Database
database, long rowId)
312
private bool ChecksumsMatch_MustRunInTransaction(SqlConnection connection,
Database
database, long rowId, Checksum checksum)
327
private bool TryGetActualRowIdFromDatabase(SqlConnection connection,
Database
database, TDatabaseKey databaseKey, int dataNameId, out long rowId)
337
using var resettableStatement = connection.GetResettableStatement(database ==
Database
.WriteCache
Storage\SQLite\v2\SQLitePersistentStorage.cs (3)
221
EnsureTables(connection,
Database
.Main);
222
EnsureTables(connection,
Database
.WriteCache);
232
void EnsureTables(SqlConnection connection,
Database
database)