Class ServerDbContext
The homeserver's database; SQLite now, PostgreSQL later through the same model.
Implements
Inherited Members
Namespace: Uniform.Matrix.Server.Storage
Assembly: Uniform.Matrix.Server.dll
Syntax
public sealed class ServerDbContext : DbContext, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IDisposable, IAsyncDisposable
Constructors
| Edit this page View SourceServerDbContext(DbContextOptions<ServerDbContext>)
Create a context with options.
Declaration
public ServerDbContext(DbContextOptions<ServerDbContext> options)
Parameters
| Type | Name | Description |
|---|---|---|
| DbContextOptions<ServerDbContext> | options |
Properties
| Edit this page View SourceAccessTokens
Access tokens by hash.
Declaration
public DbSet<AccessTokenRow> AccessTokens { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<AccessTokenRow> |
AccountData
Global and per-room account data.
Declaration
public DbSet<AccountDataRow> AccountData { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<AccountDataRow> |
Counters
Server counters.
Declaration
public DbSet<CounterRow> Counters { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<CounterRow> |
CrossSigningKeys
Cross-signing keys.
Declaration
public DbSet<CrossSigningKeyRow> CrossSigningKeys { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<CrossSigningKeyRow> |
CurrentState
Current state of each room.
Declaration
public DbSet<CurrentStateRow> CurrentState { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<CurrentStateRow> |
DelayedEvents
Delayed events waiting to be sent.
Declaration
public DbSet<DelayedEventRow> DelayedEvents { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<DelayedEventRow> |
DeviceKeys
Device keys.
Declaration
public DbSet<DeviceKeysRow> DeviceKeys { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<DeviceKeysRow> |
DeviceListChanges
Latest device list change per user.
Declaration
public DbSet<DeviceListChangeRow> DeviceListChanges { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<DeviceListChangeRow> |
Devices
Devices of local users.
Declaration
public DbSet<DeviceRow> Devices { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<DeviceRow> |
EventEdges
Edges of the room graphs.
Declaration
public DbSet<EventEdgeRow> EventEdges { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<EventEdgeRow> |
EventRelations
Relations between events.
Declaration
public DbSet<EventRelationRow> EventRelations { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<EventRelationRow> |
Events
Events of all rooms.
Declaration
public DbSet<EventRow> Events { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<EventRow> |
FallbackKeys
Fallback keys.
Declaration
public DbSet<FallbackKeyRow> FallbackKeys { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<FallbackKeyRow> |
FederationOutbox
PDUs and EDUs waiting for other servers.
Declaration
public DbSet<FederationOutboxRow> FederationOutbox { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<FederationOutboxRow> |
FederationProgress
How far the federation sender got.
Declaration
public DbSet<FederationProgressRow> FederationProgress { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<FederationProgressRow> |
Filters
Stored sync filters.
Declaration
public DbSet<FilterRow> Filters { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<FilterRow> |
ForgottenRooms
Rooms users have forgotten.
Declaration
public DbSet<ForgottenRoomRow> ForgottenRooms { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ForgottenRoomRow> |
ForwardExtremities
Latest events of each room.
Declaration
public DbSet<ForwardExtremityRow> ForwardExtremities { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ForwardExtremityRow> |
KeyBackupVersions
Key backup versions.
Declaration
public DbSet<KeyBackupVersionRow> KeyBackupVersions { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<KeyBackupVersionRow> |
KeySignatures
Signatures uploaded for keys.
Declaration
public DbSet<KeySignatureRow> KeySignatures { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<KeySignatureRow> |
Media
Uploaded media.
Declaration
public DbSet<MediaRow> Media { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<MediaRow> |
OneTimeKeys
Unclaimed one-time keys.
Declaration
public DbSet<OneTimeKeyRow> OneTimeKeys { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<OneTimeKeyRow> |
Profiles
Profiles of local users.
Declaration
public DbSet<ProfileRow> Profiles { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ProfileRow> |
Pushers
Pushers of users.
Declaration
public DbSet<PusherRow> Pushers { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<PusherRow> |
Receipts
Latest receipts.
Declaration
public DbSet<ReceiptRow> Receipts { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ReceiptRow> |
RegistrationTokens
Registration tokens created by admins.
Declaration
public DbSet<RegistrationTokenRow> RegistrationTokens { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<RegistrationTokenRow> |
RemoteInvites
Invites from other servers to rooms not here yet.
Declaration
public DbSet<RemoteInviteRow> RemoteInvites { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<RemoteInviteRow> |
RemoteMedia
Media of other servers kept here.
Declaration
public DbSet<RemoteMediaRow> RemoteMedia { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<RemoteMediaRow> |
Reports
Reports of content, rooms and users.
Declaration
public DbSet<ReportRow> Reports { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ReportRow> |
RoomAliases
Local room aliases.
Declaration
public DbSet<RoomAliasRow> RoomAliases { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<RoomAliasRow> |
RoomKeys
Backed-up room keys.
Declaration
public DbSet<RoomKeyRow> RoomKeys { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<RoomKeyRow> |
Rooms
Rooms.
Declaration
public DbSet<RoomRow> Rooms { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<RoomRow> |
ServerKeyResponses
Signed key answers of other servers.
Declaration
public DbSet<ServerKeyResponseRow> ServerKeyResponses { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ServerKeyResponseRow> |
StateGroupEntries
Entries of state snapshots.
Declaration
public DbSet<StateGroupEntryRow> StateGroupEntries { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<StateGroupEntryRow> |
StateGroups
State snapshots.
Declaration
public DbSet<StateGroupRow> StateGroups { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<StateGroupRow> |
Thumbnails
Generated thumbnails.
Declaration
public DbSet<ThumbnailRow> Thumbnails { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ThumbnailRow> |
ToDevice
Undelivered to-device messages.
Declaration
public DbSet<ToDeviceRow> ToDevice { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<ToDeviceRow> |
Transactions
Client transaction IDs.
Declaration
public DbSet<TransactionRow> Transactions { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<TransactionRow> |
Users
Local accounts.
Declaration
public DbSet<UserRow> Users { get; }
Property Value
| Type | Description |
|---|---|
| DbSet<UserRow> |
Methods
| Edit this page View SourceOnModelCreating(ModelBuilder)
Keys and indexes.
Declaration
protected override void OnModelCreating(ModelBuilder modelBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| ModelBuilder | modelBuilder |