public ValueTask <int> DeleteByPathAsync(IDbTransaction transaction, string path)
 {
     return(transaction.ExecuteNonQueryAsync(
                () => DeleteByPathCommand,
                $"{nameof(DatabaseTable)}/{nameof(DeleteByPathCommand)}/{TableName}",
                path));
 }
 /// <summary>
 ///     TODO: use sqlite returning statement.
 ///     https://github.com/ericsink/SQLitePCL.raw/issues/416.
 /// </summary>
 /// <param name="transaction">The transaction.</param>
 /// <param name="startsWith">The start string to deleted.</param>
 public ValueTask <int> DeleteByStartsWithAsync(IDbTransaction transaction, string startsWith)
 {
     return(transaction.ExecuteNonQueryAsync(
                () => DeleteByStartsWithPathCommand,
                $"{nameof(DatabaseTable)}/{nameof(DeleteByStartsWithPathCommand)}/{TableName}",
                SqliteTransaction.EscapeLikeContent(startsWith) + "%"));
 }
 public async ValueTask <bool> DeletePropertyOnFileUpdated(IDbTransaction transaction, long target)
 {
     return(await transaction.ExecuteNonQueryAsync(
                () => DeletePropertyByTargetAndFeatureCommand,
                $"{nameof(DatabaseTable)}/{nameof(DeletePropertyByTargetAndFeatureCommand)}/{TableName}",
                target,
                PropertyFeature.AutoDeleteWhenFileUpdate) != 0);
 }
 public async ValueTask <bool> DeleteProperty(IDbTransaction transaction, long target, string key)
 {
     return(await transaction.ExecuteNonQueryAsync(
                () => DeletePropertyByTargetAndKeyCommand,
                $"{nameof(DatabaseTable)}/{nameof(DeletePropertyByTargetAndKeyCommand)}/{TableName}",
                target,
                key) != 0);
 }
 public ValueTask <int> UpdateStatsByIdAsync(
     IDbTransaction transaction,
     long id,
     string contentTag)
 {
     return(transaction.ExecuteNonQueryAsync(
                () => UpdateStatsByIdCommand,
                $"{nameof(DatabaseTable)}/{nameof(UpdateStatsByIdCommand)}/{TableName}",
                id,
                contentTag));
 }