fix negative DECIMAL w/ fraction on mysql
This commit is contained in:
parent
1b2e5bdfc9
commit
464811eae8
|
@ -749,10 +749,11 @@ computed string on the server can be. See also:
|
|||
;; big integer
|
||||
=> (lambda (m)
|
||||
(string->number s))]
|
||||
[(regexp-match #rx"^-?([0-9]*)\\.([0-9]*)$" s)
|
||||
[(regexp-match #rx"^(-)?([0-9]*)\\.([0-9]*)$" s)
|
||||
=> (lambda (m)
|
||||
(+ (string->number (cadr m))
|
||||
(parse-exact-fraction (caddr m))))]
|
||||
(* (if (cadr m) -1 1)
|
||||
(+ (string->number (caddr m))
|
||||
(parse-exact-fraction (cadddr m)))))]
|
||||
[else
|
||||
(error/internal* 'parse-decimal "cannot parse as decimal"
|
||||
'("string" value) s)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user