Skip to content

Commit

Permalink
some valuetasks
Browse files Browse the repository at this point in the history
  • Loading branch information
coronabytes committed Nov 30, 2024
1 parent bc68333 commit 1d5841d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Core.Arango.DevExtreme/ArangoTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public ArangoTransform(DataSourceLoadOptionsBase loadOption, ArangoTransformSett
/// <summary>
/// Executes transformed query asynchronous
/// </summary>
public async Task<DxLoadResult> ExecuteAsync<T>(IArangoContext arango,
public async ValueTask<DxLoadResult> ExecuteAsync<T>(IArangoContext arango,
ArangoHandle handle,
string collection,
CancellationToken cancellationToken = default)
Expand Down
10 changes: 5 additions & 5 deletions Core.Arango.Migration/ArangoMigrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public bool Compare(object a, object b)
}

/// <inheritdoc/>
public async Task<ArangoStructure> GetStructureAsync(ArangoHandle db,
public async ValueTask<ArangoStructure> GetStructureAsync(ArangoHandle db,
CancellationToken cancellationToken = default)
{
var snapshot = new ArangoStructure();
Expand Down Expand Up @@ -174,7 +174,7 @@ public async Task<ArangoStructure> GetStructureAsync(ArangoHandle db,
}

/// <inheritdoc/>
public async Task ApplyStructureAsync(ArangoHandle db, ArangoStructure update,
public async ValueTask ApplyStructureAsync(ArangoHandle db, ArangoStructure update,
ArangoMigrationOptions options = null)
{
options ??= new ArangoMigrationOptions();
Expand Down Expand Up @@ -547,7 +547,7 @@ public void AddMigration(IArangoMigration migration)
}

/// <inheritdoc/>
public async Task UpgradeAsync(ArangoHandle db)
public async ValueTask UpgradeAsync(ArangoHandle db)
{
var cols = await _arango.Collection.ListAsync(db);

Expand Down Expand Up @@ -579,7 +579,7 @@ public async Task UpgradeAsync(ArangoHandle db)
}

/// <inheritdoc/>
public async Task ExportAsync(ArangoHandle db, Stream output, ArangoMigrationScope scope)
public async ValueTask ExportAsync(ArangoHandle db, Stream output, ArangoMigrationScope scope)
{
using var zip = new ZipArchive(output, ZipArchiveMode.Create, true, Encoding.UTF8);

Expand Down Expand Up @@ -614,7 +614,7 @@ public async Task ExportAsync(ArangoHandle db, Stream output, ArangoMigrationSco
}

/// <inheritdoc/>
public async Task ImportAsync(ArangoHandle db, Stream input, ArangoMigrationScope scope)
public async ValueTask ImportAsync(ArangoHandle db, Stream input, ArangoMigrationScope scope)
{
using var zip = new ZipArchive(input, ZipArchiveMode.Read);

Expand Down
10 changes: 5 additions & 5 deletions Core.Arango.Migration/IArangoMigrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public interface IArangoMigrator
/// <summary>
/// Get structure from database
/// </summary>
Task<ArangoStructure> GetStructureAsync(ArangoHandle db,
ValueTask<ArangoStructure> GetStructureAsync(ArangoHandle db,
CancellationToken cancellationToken = default);

/// <summary>
/// Apply structure to database
/// </summary>
Task ApplyStructureAsync(ArangoHandle db, ArangoStructure update,
ValueTask ApplyStructureAsync(ArangoHandle db, ArangoStructure update,
ArangoMigrationOptions options = null);

/// <summary>
Expand All @@ -50,16 +50,16 @@ Task ApplyStructureAsync(ArangoHandle db, ArangoStructure update,
/// <summary>
/// Apply missing migrations up to latest
/// </summary>
Task UpgradeAsync(ArangoHandle db);
ValueTask UpgradeAsync(ArangoHandle db);

/// <summary>
/// Export database to zip archive stream
/// </summary>
Task ExportAsync(ArangoHandle db, Stream output, ArangoMigrationScope scope);
ValueTask ExportAsync(ArangoHandle db, Stream output, ArangoMigrationScope scope);

/// <summary>
/// Import database from zip archive stream and replace existing data
/// </summary>
Task ImportAsync(ArangoHandle db, Stream input, ArangoMigrationScope scope);
ValueTask ImportAsync(ArangoHandle db, Stream input, ArangoMigrationScope scope);
}
}

0 comments on commit 1d5841d

Please sign in to comment.