Surreal-Net / Surreal.Net

Database driver for SurrealDB available for REST and RPC sessions.
Apache License 2.0
57 stars 7 forks source link

Bug: Float and Double Queries that use 'Special Numbers' fail #54

Open Du-z opened 2 years ago

Du-z commented 2 years ago

Some tests from ResultTests.FloatTryGetValueQueryTest and ResultTests.DoubleTryGetValueQueryTest do not return the correct response.

This is because the parameter inserts rather than inf into the query.

The query parameterization needs to be updated to use inf etc

ProphetLamb commented 2 years ago

So far I've been unable to query infinity and nan using the <float> cast syntax. Using a rest client: nan returns zero and ∞ fails to execute at all. I am currently experimenting on the behavior without casts. If you could send me a demo query for nan that'd be greatly appreciated 👍

ProphetLamb commented 2 years ago

Double neg inf

Double inf

Current implementation queries like so: Double inf string

and so:

Double min value

ProphetLamb commented 2 years ago

The former two examples cannot be produced using the current serializer. Which is good!

tobiemh commented 2 years ago

Hey @ProphetLamb SurrealDB doesn't support NaN or -Inf or +Inf yet. It does however support (as you probably know) arbitrary large decimal numbers.