Support Server Functions in Expressions

Number:2492
Tracker:Feature
Author:Mirko Matytschak
Version:NDO 4.0.6
Assigned to: Mirko Matytschak
Status: Gelöst

Example in Linq:

class ServerFunctions
{
    public static int MIN_ACTIVE_ROWVERSION()
    {
        return 0;
    }
}
...
var m = pm.Objects().Where( m => m.rowVersion > versionBytes && m.rowVersion < ServerFunctions.MIN_ACTIVE_ROWVERSION() ).SingleOrDefault();

Example in NDOQuery:

var ndoQl = "userGuid = {0} AND rowVersion < MIN_ACTIVE_ROWVERSION() AND rowVersion > {1}";
var q = new NDOQuery(pm, ndoQl);
q.Parameters.Add(userGuid);
q.Parameters.Add(versionBytes);
var settings = q.ExecuteSingle();

It is necessary to clarify whether the parser can distinguish a function call from an identifier.


Mirko Matytschak - 21.05.2021 13:35:17

Version = NDO 4.0.6


Mirko Matytschak - 26.05.2021 19:13:54

Description changed


Mirko Matytschak - 26.05.2021 19:14:28

Description changed


Mirko Matytschak - 27.05.2021 15:50:42

Status = Gelöst

<<  previous   next  >>
Back to the Overview