diff options
Diffstat (limited to 'doc/user/example')
| -rw-r--r-- | doc/user/example/album.data | 5 | ||||
| -rw-r--r-- | doc/user/example/artist.data | 5 | ||||
| -rw-r--r-- | doc/user/example/create_artist_album.vos | 19 | ||||
| -rw-r--r-- | doc/user/example/filter_artist_album.vos | 21 | ||||
| -rw-r--r-- | doc/user/example/join_artist_album.vos | 16 | ||||
| -rw-r--r-- | doc/user/example/sort_album.vos | 9 | ||||
| -rw-r--r-- | doc/user/example/sort_artist.vos | 9 |
7 files changed, 84 insertions, 0 deletions
diff --git a/doc/user/example/album.data b/doc/user/example/album.data new file mode 100644 index 0000000..af667d6 --- /dev/null +++ b/doc/user/example/album.data @@ -0,0 +1,5 @@ +'You Forgot it in People' 1 +'Burn' 5 +'Get Lifted' 4 +'The Joshua Tree' 2 +'Broken Social Scene' 1 diff --git a/doc/user/example/artist.data b/doc/user/example/artist.data new file mode 100644 index 0000000..0178395 --- /dev/null +++ b/doc/user/example/artist.data @@ -0,0 +1,5 @@ +1,"Broken Social Scene" +2,"U2" +3,"Led Zeppelin" +4,"John Legend" +5,"Deep Purple" diff --git a/doc/user/example/create_artist_album.vos b/doc/user/example/create_artist_album.vos new file mode 100644 index 0000000..7e530a8 --- /dev/null +++ b/doc/user/example/create_artist_album.vos @@ -0,0 +1,19 @@ +# +# example of create statement +# +LOAD "artist.data" ( + :idx : ::',', + '"':name:'"':: +) as artist; + +LOAD "album.data" ( + '\'':title :'\''::, + :artist_idx: :28:28 +) as album; + +CREATE "create_artist_album.data" from artist, album ( + :artist.idx : ::'|', + '"':artist.name :'"'::'|', + :album.artist_idx: ::'|', + '[' :album.title :']' :: +); diff --git a/doc/user/example/filter_artist_album.vos b/doc/user/example/filter_artist_album.vos new file mode 100644 index 0000000..5e989c5 --- /dev/null +++ b/doc/user/example/filter_artist_album.vos @@ -0,0 +1,21 @@ +# +# example of using create with filter +# +LOAD "artist.data" ( + :idx :::',', + '"':name:'"':: +) as artist; + +LOAD "album.data" ( + '\'':title :'\''::, + :artist_idx: :28 :28 +) as album; + +CREATE "filter_artist_album.data" from artist, album ( + :artist.idx :::'|', + '"':artist.name :'"'::'|', + '[':album.title :']':: +) FILTER ( + ACCEPT artist.idx = 1, + REJECT album.artist_idx != 1 +); diff --git a/doc/user/example/join_artist_album.vos b/doc/user/example/join_artist_album.vos new file mode 100644 index 0000000..d8d2e2c --- /dev/null +++ b/doc/user/example/join_artist_album.vos @@ -0,0 +1,16 @@ +# +# example of join statement +# +LOAD "artist.data" ( + :idx : ::',', + '"':name:'"':: +) as artist; + +LOAD "album.data" ( + '\'':title :'\''::, + :artist_idx: :28 :28 +) as album; + +JOIN artist, album INTO "join_artist_album.data" ( + artist.idx = album.artist_idx +); diff --git a/doc/user/example/sort_album.vos b/doc/user/example/sort_album.vos new file mode 100644 index 0000000..18c0286 --- /dev/null +++ b/doc/user/example/sort_album.vos @@ -0,0 +1,9 @@ +# +# example of sort statement with two field +# +LOAD "album.data" ( + '\'':title :'\''::, + :artist_idx: :28:28 +) as album; + +SORT album BY artist_idx, title INTO "album_sorted.data"; diff --git a/doc/user/example/sort_artist.vos b/doc/user/example/sort_artist.vos new file mode 100644 index 0000000..39fdda8 --- /dev/null +++ b/doc/user/example/sort_artist.vos @@ -0,0 +1,9 @@ +# +# example of sort statement by descending order +# +LOAD "artist.data" ( + :idx :::',', + '"':name:'"':: +) as artist; + +SORT artist BY name DESC; |
