very basic version of usql

This commit is contained in:
2021-07-14 12:01:44 +02:00
parent f594437b61
commit 577370caef
21 changed files with 3189 additions and 1072 deletions

View File

@@ -1,20 +1,27 @@
(define fc 5)
(define sc 5)
(usql "create table data (ticker varchar(8), price float null)")
(usql "load data from '/Users/vaclavt/Library/Mobile Documents/com~apple~CloudDocs/Development/usql/data.csv')")
(print (usql "select ticker, price from data"))
(define first_tid (thread-create (while (> fc 0) (do (thread-under-lock "ilock" (do (set! fc (dec fc))(print 1))) (thread-sleep 500)))))
(define second_tid (thread-create (while (> sc 0) (do (thread-under-lock "ilock" (do (set! sc (dec sc))(print 2))) (thread-sleep 750)))))
;; (read-url "https://api.nasdaq.com/api/calendar/dividends/")
(print "first thread id:" first_tid)
(print "second thread id:" second_tid)
(threads-join)
(print "ok")
(try
(ls-dir "nonexisting/dir")
(print "dir not exists"))
;; (define fc 5)
;; (define sc 5)
(try
(throw "my-exception")
(print "exception caught:" ml-exception))
;; (define first_tid (thread-create (while (> fc 0) (do (thread-under-lock "ilock" (do (set! fc (dec fc))(print 1))) (thread-sleep 500)))))
;; (define second_tid (thread-create (while (> sc 0) (do (thread-under-lock "ilock" (do (set! sc (dec sc))(print 2))) (thread-sleep 750)))))
(/ 1 0)
;; (print "first thread id:" first_tid)
;; (print "second thread id:" second_tid)
;; (threads-join)
;; (print "ok")
;; (try
;; (ls-dir "nonexisting/dir")
;; (print "dir not exists"))
;; (try
;; (throw "my-exception")
;; (print "exception caught:" ml-exception))
;; (/ 1 0)