Guest User

Untitled

a guest
Jun 20th, 2023
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. (setq *Sqlite_postfix ";\n.read ./in\n")
  2. (setq *TO_DB "in" *FROM_DB "out")
  3.  
  4. (class +Sql)
  5. (dm T (Fn)
  6. (call 'mkfifo "in" "out") # this is from the point of view of the app being automated, not from the pil perspective
  7. (push '*Bye '(call 'rm "in" "out"))
  8. (call "./start_sqlite.sh")
  9. )
  10.  
  11. (dm q> (QueryStr)
  12. (in *FROM_DB
  13. (out *TO_DB (prinl QueryStr *Sqlite_postfix))
  14. (setq res (read))
  15. (prinl res)
  16. )
  17. (flush)
  18. )
  19.  
  20.  
  21.  
  22. (if *Dbg
  23. (setq x (new '(+Sql) "db"))
  24. (send 'q> x "select 'x';")
  25. )
  26.  
Advertisement
Add Comment
Please, Sign In to add comment