[Developers] Scientific notation in MQL

Michele Berg michele.r.berg at gmail.com
Tue Jul 21 21:09:50 UTC 2009


Interestingly enough, if you put this in the query editor and run "clean
up", it changes the query to this:
{
  "id":   "/en/philip_kendall",
  "type": "/people/person",
  "height_meters": {
    "connect": "update",
    "value":   1,
    "e4":      null
  }
}

Just a bit of a sidenote to the issue.

Michele

On Tue, Jul 21, 2009 at 3:54 PM, Philip Kendall <
philip-freebase at shadowmagic.org.uk> wrote:

> Is it a known issue that scientific notation is not supported in MQL? My
> reading of the JSON spec is that it should be (and it's certainly given
> as an example at <http://mql.freebaseapps.com/ch02.html#typefloat>), but
> yet...
>
> {
>  "id":   "/en/philip_kendall",
>  "type": "/people/person",
>  "height_meters": {
>    "connect": "update",
>    "value":   1e4
>  }
> }
>
> returns
>
> {
>  "code":          "/api/status/error",
>  "messages": [{
>    "code":    "/api/status/error/mql/type",
>    "info": {
>      "expected_type": "/type/float",
>      "property":      "e4"
>    },
>    "message": "Type /type/float does not have property e4",
>    "path":    "height_meters",
>    "query": {
>      "height_meters": {
>        "connect":      "update",
>        "e4":           null,
>        "error_inside": ".",
>        "value":        1
>      },
>      "id":   "/en/philip_kendall",
>      "type": "/people/person"
>    }
>  }],
>  "status":        "200 OK",
>  "transaction_id":
> "cache;cache01.sandbox.sjc1:8101;2009-07-21T20:47:36Z;0008"
> }
>
> having trashed the 1e4 parameter along the way. (I haven't tried this on
> the production graph).
>
> Cheers,
>
> Phil
>
> --
>  Philip Kendall <philip at shadowmagic.org.uk>
>  http://www.shadowmagic.org.uk/
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20090721/7916bc71/attachment.htm 


More information about the Developers mailing list