Guest User

Untitled

a guest
Aug 27th, 2024
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. (load "@lib/http.l" "@lib/xhtml.l" "@lib/form.l")
  2.  
  3. # Movie schema
  4. (class +Movie +Entity)
  5. (rel nm (+Need +String))
  6. (rel info (+String))
  7. (rel date (+Ref +Date))
  8.  
  9. (pool "movie.db")
  10.  
  11. (de add-movie (Name Info)
  12. (new! '(+Movie)
  13. 'nm Name
  14. 'info Info
  15. 'date (stamp)) )
  16.  
  17. (de search-all ()
  18. (for
  19. (Q
  20. (search "" '((nm +Movie)))
  21. (search Q))
  22. (with @
  23. (<h3> NIL (prinl (: nm)))
  24. (<br>)) ) )
  25.  
  26. (de work ()
  27. (app)
  28. (action
  29. (html 0 "movie db" NIL NIL
  30. (form NIL
  31. (<h1> NIL "movie")
  32. (<br>)
  33. (search-all))) ) )
  34.  
  35. (de go ()
  36. (server 8080 "!work") )
  37.  
Tags: lisp picolisp
Advertisement
Add Comment
Please, Sign In to add comment