The examples in this course are inside mini windows of their own that look like this…
-- Returns a string "Click on the 'Run in Surrealist' button to run this query!"; -- Also returns a string RETURN "Results display without needing the RETURN keyword, " + "but you can add it if you want";
…and this.
"Just don't forget" "the semicolon between statements" "or you will get an error." "Add some semicolons to make these statements work!"
You don’t need to think about installing SurrealDB or starting a connection of your own to run any of them.
But you can also run the examples in a more manual way, if you prefer. Here is how to do it.
surreal start --user root --pass root
in a terminal window to start the server with a single root user. Then connect using Surrealist or use the command surreal sql --ns ns --db db --user root --pass root --pretty
in a second terminal window to connect using the CLI.