From fc2a58bc93d6b73c728e5d03c498bd6529c15abb Mon Sep 17 00:00:00 2001 From: Dmitry Grebeniuk Date: Wed, 31 Mar 2010 12:39:14 +0300 Subject: [PATCH] dbfwork: 'to_number(x)' is treated as simply 'x' --- dbfwork.ml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dbfwork.ml b/dbfwork.ml index 964d375..5085cb3 100644 --- a/dbfwork.ml +++ b/dbfwork.ml @@ -283,7 +283,7 @@ value lpad = lrpad True ; -value optnumval_of_sqlexpr se = +value rec optnumval_of_sqlexpr se = let te = gente "number" in match se with @@ -306,7 +306,12 @@ value optnumval_of_sqlexpr se = ) *) | SEIdent i when ident_is_null i -> None - | SECall _ _ -> te "function call" + | SECall funname [funarg] + when (compare_ident funname "to_number") = 0 + -> + optnumval_of_sqlexpr funarg + | SECall _ _ -> + te "unknown function call" | SEIdent _ -> te "identifier" | SENum a b -> Some (a, b) ] -- 2.11.4.GIT