Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4904

.NET: DML via LINQ

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.1
    • Component/s: platforms
    • Labels:

      Description

      Perform bulk update operations via LINQ: UPDATE WHERE, DELETE WHERE. Insert can already be done on object level with ICache.PutAll.

      1) DELETE WHERE. This is quite simple. We can provide an extension method like this:

      public static int DeleteAll<K, V>(this ICache<K, V> cache, IQueryable<ICacheEntry<K, V>> items);
      

      2) UPDATE WHERE. This is tricky, because LINQ only works with expression trees, and multi-line methods are not supported. We should come up with a way to provide a list of columns and values, something like

      public static int UpdateAll<K, V>(this ICache<K, V> cache, IQueryable<ICacheEntry<K, V>> items, params UpdateAction[] actions);
      

      where UpdateAction can consist of a MemberExpression and a value for that member.

      We should probably do delete as a separate task first.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ptupitsyn Pavel Tupitsyn
                Reporter:
                ptupitsyn Pavel Tupitsyn
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: