Jump To...

RETURN HOME
0. Header
0.1. Explanation
1. Workspaces and Syntax
2. Saving and Loading Files
3. Commands
3.1. Terminate
3.2. Save to a File
3.3. Load from a File
3.4. Print
3.5. Create
3.6. Add
3.7. Delete
3.8. Length
3.9. Remove
3.10. Pop
3.11. Change/Create a Workspace
3.12. Info
3.13. List
3.14. Help
3.14.1. Tutorial

Simple Query List Official Documentation


This is the official documentation of Simple Query List. You may use the Navigation on the right side of the screen to quickly find the section you would like to read about.

Explanation

In this documentation you can find styled text. Here is a quick overview of what is what:
I'm a block of code!
I'm a multiline
block of code!
I'm an explaining block of code!
I'm an output of a block of code!

Example in python: print("Hello World!")
We will print hello world to the screen.
Hello World!
Command Syntax: command parameter label another_parameter



Workspaces and Syntax


When working with any SQLT script, you need to execute it in a workspace. The workspace holds all the data that the commands save - all arrays and their values.
The default workspace is called root, but you can create a workspace with any name (no spaces allowed). All workspaces are absolutely independed from each other and exist solely to allow management of multiple files at the same time.

The syntax of the language is very simple, you simply write a command name, followed by parameters separated by spaces.
Example from python:
Python Script:
a = ["hi"]  Create list a and add value "hi" to it.
print(a)  Print list a to screen.
["hi"]

SQLT Script:
create a  Create array a.
add hi to a  Add value "hi" to array a.
print a  Print array a to screen.
["hi"]



Saving and Loading Files


We can save workspaces to files and then load them into a new script or simply duplicate them.
All files have a version identifier as the first line of the code - such as sqlt:ver(1). If your version is different than the version of the file, there may be issues with loading. Don't worry however, as SQLT will warn you if the versions do not match.
Files are saved with .sqlt extension and are saved as raw text files.
Syntax:
sqlt:ver(1) Version Identifier
a|a|hdohohod Array a with values a and hdohohod
b Empty Array b
It's true however, that as a user, you do not need to remember this, as the Python script can do it for you whenever you load the file.



Commands


All commands have either a set amount of parameters that they take, or a specific syntax you must follow, or you will encounter an error. Errors do not terminate the program, they will simply not execute whatever commands you've input. Keep in mind, that if an error have never been encountered before or an error has not been expected when programming, you might run into a Python Exception. I advise you to always save your workspace before you execute a command of whose syntax you are not sure.
Some commands also have aliases, in this documentation, altough listing all of them, the header will contain the name of said command, despite it not being any of the aliases/being only one of the aliases.



Terminate

Aliases: termin terminate endprogram shutdown
Syntax: termin
Function: Terminates the terminal, makes all unsaved work inaccessible and disallows you to input any more comands.



Save to a File

Aliases: save
Syntax: save workspace as file
Syntax Example: save root as myfiles/wsroot = Saves workspace root as file wsroot.sqlt located in */myfiles/
Function: Saves a workspace to a file. File must be either full path C:/Users/User/myworkspace, partial path myfolder/myworkspace or just the file name myworkspace. It will be saved as a .sqlt file.



Load from a File

Aliases: load
Syntax: load file as workspace
Syntax Example: load wsroot as arb = Loads file wsroot.sqlt from the current directory as workspace arb
Function: Loads a workspace from a file. After loading, asks whether to switch the active workspace to the loaded one. Allows overwriting a workspace (confirmation required). File must be either full path C:/Users/User/myworkspace, partial path myfolder/myworkspace or just the file name myworkspace. You can only load .sqlt files.



Print

Aliases: print show view
Syntax: print array
Syntax Example: create a  Create an array to output.
add hello world to a  Add something to the array so we don't output an empty array.
print a  Print the array.
["hello world"]
Function: Prints an array to the screen.



Create

Aliases: create
Syntax: create array
Syntax Example: create a = Create array a
Function: Creates a new array. You can also use it to overwrite arrays (confirmation required).



Add

Aliases: add
Syntax: add value to array
Syntax Example: add Hello, World! to arr = Add value Hello, World! to array arr
Function: Adds a value to the back of an array. The value can be as long as you need, but don't forget that to array must come last.



Delete

Aliases: delete del
Syntax: del array
Syntax Example: del a = Delete array a
Function: Deletes an array (confirmation required).



Length

Aliases: length len
Syntax: len array
Syntax Example: create a  Initialize an array.
add hey vsauce to a  Let's add some values.
add michael here to a
len a  Get the amount of items in the array.
2  This is what array a stores: ['hey vsuace','michael here']
Function: Prints the amount of items in an array.     I'm sorry for not being serious in this documentation.



Remove

Aliases: remove
Syntax: remove value from array
Syntax Example: remove sadge from arr = Remove value sadge from array arr
Function: Removes a specific value from an array.



Pop

Aliases: pop
Syntax: pop array index
Syntax Example: pop array 4 = Remove 5th value from array arr
Function: Removes a value from an array at a specific index. Negative indexing is supported.



Change/Create a Workspace

Aliases: ws workspace cw changews changeworkspace
Syntax: cw workspace
Syntax Example: cw woah = Create workspace woah or change to workspace woah, if it already exists.
Function: Creates a workspace and changes to it if it doesn't exist, or just changes to a workspace if it exists.



Info

Aliases: info
Syntax: info optional:workspace
Syntax Example: info root = Show info about workspace root
Function: Shows info about the provided workspace, or, if no workspace is provided, about the current workspace.
Output Syntax: workspace {array_name: list of values, array_name: list of values, ...}
Output Syntax Example: root {hi:['bruh','what now'], hello:['idk man']}



List

Aliases: list
Syntax: list
Function: Lists all existing workspaces.



Help

Aliases: help
Syntax: help command
Syntax Example: help delete = Shows information about the delete command.
Function: Shows information about provided command, lists all possible aliases and shows the syntax. It can also be used for learning purposes - there is a quick tutorial available upon typing the command help tutorial and even an "instant help" for anyone who doesn't know what to do - by using the help me command, they can get information about the presence of the inbuilt tutorial.

Output of the command help me: Use the 'help <command>' syntax to view help about any command.
If you wish to learn the commands, use 'help tutorial'.


Tutorial

The base of the tutorial (help tutorial) contains all the information you need to set up a workspace and save/load from a file. Every tutorial also contains a code snippet to direct you to the next/previous tutorial (the first tutorial directs you to use help t1 to continue reading and learn more).