Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (load "@lib/http.l" "@lib/xhtml.l" "@lib/form.l")
- # Movie schema
- (class +Movie +Entity)
- (rel nm (+Need +String))
- (rel info (+String))
- (rel date (+Ref +Date))
- (pool "movie.db")
- (de add-movie (Name Info)
- (new! '(+Movie)
- 'nm Name
- 'info Info
- 'date (stamp)) )
- (de search-all ()
- (for
- (Q
- (search "" '((nm +Movie)))
- (search Q))
- (with @
- (<h3> NIL (prinl (: nm)))
- (<br>)) ) )
- (de work ()
- (app)
- (action
- (html 0 "movie db" NIL NIL
- (form NIL
- (<h1> NIL "movie")
- (<br>)
- (search-all))) ) )
- (de go ()
- (server 8080 "!work") )
Advertisement
Add Comment
Please, Sign In to add comment