sillyql / tests / test-4.txt
test-4.txt
Raw
#lots of insert + rehash
CREATE friends 5 string string bool int string name vibe is_cool distance town
INSERT INTO friends 10 ROWS
Izzy Edgy true 1000 Ann_Arbor
Izzy Funny false 1000 Ann_Arbor
Sam Cool true 30 Ann_Arbor
Tyler Nice true 9000 Mt_Clemens
Tyler Mean false 400 Mt_Clemens
Bri Fun false 100 Ann_Arbor
Jack Edgy true 1000 Ann_Arbor
Brian Smart true 1000 Ann_Arbor
Abby Loud false 10 Ann_Arbor
Ben Scary false 10000 Los_Angeles
PRINT FROM friends 3 name vibe town ALL
GENERATE FOR friends hash INDEX ON distance
PRINT FROM friends 3 name vibe town ALL
GENERATE FOR friends hash INDEX ON name
PRINT FROM friends 3 name vibe town WHERE distance < 1000
GENERATE FOR friends bst INDEX ON vibe
PRINT FROM friends 3 name vibe town ALL
GENERATE FOR friends hash INDEX ON town
DELETE FROM friends WHERE name = Bri
INSERT INTO friends 6 ROWS
Nik Dumb false 1200 Ann_Arbor
Corey wild false 1000 Ann_Arbor
Brendan HotAndCold true 30 Ypsilanti
Ty Cool true 900 Frankenmeuth
Paige Mean false 400 Lansing
Briana Fun true 1000 Traverse_city
CREATE work 3 string bool bool kind working done
INSERT INTO work 3 ROWS
Coding true false
Serving false true
Crying true false
JOIN work AND friends WHERE done = is_cool AND PRINT 3 working 1 distance 2 distance 2
GENERATE FOR work bst INDEX ON kind
INSERT INTO work 2 ROWS
Diving true true
Typing true false
GENERATE FOR work hash INDEX ON done
JOIN work AND friends WHERE working = is_cool AND PRINT 3 kind 1 name 2 done 1
REMOVE friends
PRINT FROM work 2 kind working WHERE done = true
REMOVE work
QUIT