
## This is an example for essential CRUD operations written in a script

## Parser read words one by one looking for operations. Word may be
## simple number, special character, multiline content if enclosured with
## quotation marks (', ", ` are commonly used). For simple values even
## text_which_does_not_contain_blank_characters will be treated like one word.
##
## Operations are defined using one of special characters: @, ?, +, =, -, !.  
## Additional special words may be used to specify some rules like ordering
## or formating like ^ or :.
## 
## Special character # is used to comment out rest of a line. 
##
## Basic syntax is:
##
##   <operation>  <context>  [ <filters> ]  ( <values> )
##
##
## OPERATIONS
## ==========
##
## Various operations are specified to give you access to your data
## stored on persistent storage.
##
##
## Use
## ---
##
## Change script context. May be used to specify tables or even column list 
## for further operations which does not specify context.
##
##   @ <table1> <table2.column1> ...
##
## Example:
##
##   @ users
##   ? [ name = "user1" ]
## 
## Execute
## -------
##
## Not quite what is seems to be like, execution mark may be used for
## dividing severl operations and denote that all parameters for current
## operation are set and the operation is ready to be executed 
##
##   ? users.name ^
##   !
##   ? users.name
##
## This is optional because the following will be transformed the same
## way because selection operation denoted by second question mark will end
## previously begun ordering section denoted by caret character.
##
## May be used in interactive mode to perform immediate execution.
##
## Select
## ------
##
## Get specified data from storage. 
##
##   ? users.name users.description [ users.active = true ]
##   ? users.name users.description ^ [ users.name ]
##

## Deleting a record
@ galaxy_places 
- ( `position`='ring' `type`='resupply' )

## Inserting a record
@ galaxy_places 
+ ( `position`='ring' `type`='resupply' `parameters`='' `extra`='' `level`=0 `reputation`=0 )

## Multiple inserts
@ galaxy_places 
+ ( `position`='ring' `type`='resupply' `parameters`='' `extra`='' `level`=0 `reputation`=0 )
+ ( `position`='ring' `type`='resupply' `parameters`='' `extra`='' `level`=0 `reputation`=0 )

## Updating a record
@ galaxy_places
= [ `position`='ring' `type`='resupply' ] ( `extra` = 'My extra value, quite long to test...' ) 

# Basic selection
? galaxy_places [ position = ring ]

# Perform join
? galaxy_places.`type` , galaxy_space.`name` ( `galaxy_places`.`position`='ring' )

# Execute immediately
!

= [ `position` = `ring` `type` = 'resupply' ] ( `position` = 'mulahay' )

