Ejemplo n.º 1
0
 /// <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) + "%"));
 }
Ejemplo n.º 2
0
 public ValueTask <DataRow[]> SelectByStartsWithAsync(
     IDbTransaction transaction,
     string startsWith)
 {
     return(transaction.ExecuteReaderAsync(
                () => SelectByStartsWithPathCommand,
                $"{nameof(DatabaseTable)}/{nameof(SelectByStartsWithPathCommand)}/{TableName}",
                HandleReaderDataRows,
                SqliteTransaction.EscapeLikeContent(startsWith) + "%"));
 }