arangoclient.net icon indicating copy to clipboard operation
arangoclient.net copied to clipboard

InvalidOperationException: Aql functions should only be used in ArangoDatabase.Query

Open drgraduss opened this issue 9 years ago • 4 comments

Every time you're using AQL within query InvalidOperationException: Aql functions should only be used in ArangoDatabase.Query exception thrown and caught. This affects query construction performance.

Adding this for tracking.

drgraduss avatar Nov 25 '15 11:11 drgraduss

@drgraduss thanks for open an separate issue for this. i'm aware of the problem.

ra0o0f avatar Nov 25 '15 14:11 ra0o0f

Hi @ra0o0f. When to expect fix for this issue? Thanks

drgraduss avatar Nov 30 '15 12:11 drgraduss

@drgraduss not until two month

ra0o0f avatar Nov 30 '15 13:11 ra0o0f

@drgraduss this should be and will be fixed. but compare these:

Stopwatch watch = new Stopwatch();
                watch.Start();

                for(int i=0;i<10000;i++)
                    db.Query<Person>()
                        .Where(p=> AQL.Contains(p.Fullname,"raoof"))
                        .Select(p => p).GetQueryData();

                watch.Stop();
                Console.WriteLine(watch.Elapsed);
Stopwatch watch = new Stopwatch();
                watch.Start();

                for(int i=0;i<10000;i++)
                    db.Query<Person>()
                        .Where(p=>p.Fullname == "raoof")
                        .Select(p => p).GetQueryData();

                watch.Stop();
                Console.WriteLine(watch.Elapsed);

ra0o0f avatar Dec 02 '15 15:12 ra0o0f