Skip to content

Commit a08d06b

Browse files
committed
devexteme array any
1 parent 66849e0 commit a08d06b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Core.Arango.DevExtreme/ArangoTransform.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections;
33
using System.Collections.Generic;
44
using System.Linq;
5+
using System.Security.Principal;
56
using System.Text;
67
using System.Threading;
78
using System.Threading.Tasks;
@@ -628,7 +629,7 @@ private string GetMatchingFilter(IList dxFilter, bool not = false)
628629
case "endswith":
629630
opString = "ENDSWITH";
630631
break;
631-
case "in":
632+
case "in": // TODO: deprecated
632633
opString = "IN";
633634
break;
634635
default:
@@ -654,13 +655,20 @@ private string GetMatchingFilter(IList dxFilter, bool not = false)
654655

655656
var realPropertyName = _settings.ValidPropertyName(dxFilter[0].ToString()).FirstCharOfPropertiesToUpper();
656657

658+
if (_settings.ArrayProperties.Contains(realPropertyName))
659+
{
660+
if (opString == "==")
661+
opString = "ANY ==";
662+
}
663+
657664
string property;
658665

659666
if (_settings.ExtractFilters.TryGetValue(realPropertyName, out var extract1))
660667
property = PropertyName(extract1.Property, extract1.IteratorVar);
661668
else
662669
property = PropertyName(realPropertyName);
663670

671+
664672

665673
string boundParam = null;
666674

Core.Arango.DevExtreme/ArangoTransformSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ public class ArangoTransformSettings
104104
/// </summary>
105105
public Func<string, ArangoTransformSettings, string> PropertyTransform { get; set; }
106106

107+
public HashSet<string> ArrayProperties { get; set; } = new();
108+
107109
/// <summary>
108110
/// When true (default) always sort by _key last if not already present
109111
/// </summary>

0 commit comments

Comments
 (0)