-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
Improvements in Persistence & Reminders
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Escendit Ltd. All Rights Reserved. | ||
// Licensed under the MIT. See LICENSE.txt file in the solution root for full license information. | ||
|
||
namespace Escendit.Orleans.Persistence.Cassandra.Mapping; | ||
|
||
using global::Cassandra.Mapping; | ||
using Schema; | ||
|
||
/// <summary> | ||
/// Single Grain Storage Mapping. | ||
/// </summary> | ||
public class SingleGrainStorageMapping : Mappings | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SingleGrainStorageMapping"/> class. | ||
/// </summary> | ||
public SingleGrainStorageMapping() | ||
{ | ||
For<SingleGrainStorageTable>() | ||
.PartitionKey("type", "id", "name") | ||
.Column(p => p.Type, cm => cm.WithName("type")) | ||
.Column(p => p.Id, cm => cm.WithName("id")) | ||
.Column(p => p.Name, cm => cm.WithName("name")) | ||
.Column(p => p.State, cm => cm.WithName("state")) | ||
.Column(p => p.Etag, cm => cm.WithName("etag")); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) Escendit Ltd. All Rights Reserved. | ||
// Licensed under the MIT. See LICENSE.txt file in the solution root for full license information. | ||
|
||
namespace Escendit.Orleans.Persistence.Cassandra.Schema; | ||
|
||
/// <summary> | ||
/// Single Grain Storage Table. | ||
/// </summary> | ||
public class SingleGrainStorageTable | ||
{ | ||
/// <summary> | ||
/// Gets or sets the type. | ||
/// </summary> | ||
/// <value>The type.</value> | ||
public byte[] Type { get; set; } | ||
Check warning on line 15 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / build (7.0.x)
Check warning on line 15 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / build (7.0.x)
Check warning on line 15 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / Build and analyze (7.0.x)
|
||
|
||
/// <summary> | ||
/// Gets or sets the id. | ||
/// </summary> | ||
/// <value>The id.</value> | ||
public byte[] Id { get; set; } | ||
Check warning on line 21 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / build (7.0.x)
Check warning on line 21 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / build (7.0.x)
Check warning on line 21 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / Build and analyze (7.0.x)
|
||
|
||
/// <summary> | ||
/// Gets or sets the name. | ||
/// </summary> | ||
/// <value>The name.</value> | ||
public string Name { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// Gets or sets the state. | ||
/// </summary> | ||
/// <value>The state.</value> | ||
public byte[] State { get; set; } | ||
Check warning on line 33 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / build (7.0.x)
Check warning on line 33 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / build (7.0.x)
Check warning on line 33 in src/Persistence/Cassandra/Schema/SingleGrainStorageTable.cs GitHub Actions / Build and analyze (7.0.x)
|
||
|
||
/// <summary> | ||
/// Gets or sets the etag. | ||
/// </summary> | ||
/// <value>The etag.</value> | ||
public string Etag { get; set; } = default!; | ||
} |