Skip to content

Numeric Functions

csamak edited this page May 26, 2014 · 4 revisions

##Numeric Functions

All of the AQL numeric functions are mapped to System.Math.

###Example

    dv.FacebookUsers.Where(u => Math.Abs(u.id) > 32);

will generate

    for $u in dataset FacebookUsers where (numeric-abs($u.id) > 32) return $u

For an example of each function, view the relevant tests.

###Supported Functions

  • numeric-abs : Math.Abs
  • numeric-ceiling : Math.Ceiling
  • numeric-floor : Math.Floor
  • numeric-round is currently not supported
  • numeric-round-half-to-even
    Any of
    • Math.Round(double)
    • Math.Round(decimal)
    • Math.Round(double, MidpointRounding.ToEven)
      Note that Math.Round defaults to MidpointRounding.ToEven

Clone this wiki locally