Shell Examples in Documentation

Throughout much of the documentation client scripts are provided for:

  • C#
  • Go
  • JVM (Java, Scala)
  • JavaScript
  • Python
  • Known issues
    My client uses Elm. I therefore use shell scripts in the Fauna UI to interact with the DB for setting up and testing data and code.
    It would be useful to have shell scripts to copy alongside all the other languages in all the examples …

Update:
I realize we can strip e.g. a javascript example by removing
query(), every ref to ‘q.’ and the error handling code.
However, this isn’t apparent when first encountering the documentation …

Good point, we have discussed providing ‘pure’ FQL as an alternative language a while back but didn’t get to it yet. The shell driver is indeed using the JavaScript driver behind the scenes so it should be the exact same syntax as the JS without the q.'s.

You are right that this is definitely not obvious.

You can keep the q’s in the shell and it works fine.

1 Like

Absolutely, the shell is probably just evaluating the javascript (I’m not entirely sure).
If there was something like ‘pure FQL’ I would omit the .q though. But I assume Freeross is mainly interested in having doc examples without the error handling code in that case.

Correct. To a new user like myself, having to chop up the example code from the outset creates a doubt about whether I’m using the example documentation correctly.

1 Like