æãã¿ã¡ã«ãªããåå¿è ç¨è¨èªãã¯SennaQLï¼
å°å³ã«åé¿ã®ãªãSenna 1.1.0ã§ããã
SennaQLã¨ããæ°ããåãåããè¨èªãæè¼ããã¦ãã¾ãã
æã
ã®èª¿æ»ã®çµæã
ãªãã¨SennaQLã¯ä»¥ä¸ã®ãã¼ã¸ã§æãããã¦ãã
Schemeã®ç¹å¾´ãå
¨ã¦æºããã¦ãããã¨ãå¤æãã¾ããã£ï¼ï¼ï¼
Schemeã§è±ããªè¡¨ç¾åã身ã«ã¤ãã
åç §éæã§ããããªå¿ããã ã¦ã
æ¬å¼§ã¯ããããªãï¼ï¼
Schemeã¯ä¸ãç®æããï¼
ããã¯ã¿ããªSennaQLãå¦ã°ãªãã¨ãããªãã§ããï¼ï¼
SennaQLã®ããããæ¹æ³
Senna 1.1.0以éãã¤ã³ã¹ãã¼ã«ãããã¨ã«ã
% senna filename.db
ã¨å®è¡ããã°ã対話çç°å¢ã§SennaQLã試ããã¨ãã§ãã¾ãã
SennaQLã§ç°¡åãªè¨ç®ããã£ã¦ã¿ã¾ãããã
> (+ 1 1) 2 > (define a 3) a > (define b (+ a 1)) b > (define (abs x) > (if (< x 0) > (- x) > x)) abs > (abs -100) 100
ã»ããç°¡åã§ãããï¼ï¼by ããï¼
SennaQLã§ãªã¢ã¼ãã®ãµã¼ãã«è¨ç®ããã¦ã¿ãã
% senna -s filename.db
ã¨å®è¡ããã°Sennaãµã¼ããç«ã¦ããã¨ãã§ãã¾ãã
ããã©ã«ãã§ã¯port 10041ãlistenãã¾ãã
% senna -c senna.example.com
ã¨å®è¡ããã°ãsenna.example.comã®Sennaãµã¼ãã«æ¥ç¶ãããã¨ãã§ãã¾ãã
ãããã¯ã¼ã¯æ代ã«ã対å¿ããSennaQLï¼ï¼å½ããåãï¼
åå¿è ã«ããããSennaQLï¼
SennaQLã¯ãã¬ã¼ã¹ãã«ãæ©è½ãå®è£
ãã¦ãã¾ãã
ãã£ã¦ãæååã®ã¨ã¹ã±ã¼ããªã©ãããå¿
è¦ãããã¾ããã
å®å
¨å®å¿åå¿è
ã«ãããããã£ï¼ï¼ï¼
> (display ?) > oreore oreore#t > (display ?) > "test" "test"#t
jsonãåºåã§ããSennaQLï¼
jsonã£ã¦Web 2.0ã£ã½ãããï¼ï¼
SennaQLã§ã¯JSONåºåãã§ãã¾ãã
以ä¸ã®ãããªsxmlã£ã½ãå¼ãä¸ããã¨ã
ãããjsonã§åºåãã¦ããã¾ãã
ãã©ãã¼ï¼ï¼ï¼(å³ã£å)
> (disp > '(:html > (:head (:title "sxml")) > (:body > (@ (:bgcolor "blue") > (:text "white")) > (:center (:b "Hello.")))) > :json) ["html", ["head", ["title", "sxml"]], ["body", {["bgcolor", "blue"]: ["text", "white"]}, ["center", ["b", "Hello."]]]] #t
SennaQLã§å ¨ææ¤ç´¢ããã¦ã¿ãã
ä¸è¨ãã¼ã¸ã試ãã¦ã¿ãåã«ï¼ç¹æ³¨æã
sennaã³ãã³ããå®è¡ããã¨ãã«ã
ä½æããSennaå
ãã¼ã¿ãã¼ã¹ã®ã¨ã³ã³ã¼ãã£ã³ã°ãæå®ããå¿
è¦ãããã¾ãã
ä¾ãã°ãã¨ã³ã³ã¼ãã£ã³ã°utf8ã§Sennaå
ãã¼ã¿ãã¼ã¹ãåæåããã«ã¯ã
% senna -e utf8 /tmp/bookmark.db
ã¨ããå¿ è¦ãããã¾ãã
ã¨ã³ã³ã¼ãã£ã³ã°ãéãã¨æ¤ç´¢çµæããããããªãå¯è½æ§ãå åã«ããã®ã§ã注æãï¼
SennaQLã¯ä»å¾ã©ããªãã®ï¼
Sennaã¯ããã¼ã¸ã§ã³1.1.0ç³»ã§ä»¥ä¸ã®ä½æ¥ãè¡ãäºå®ã§ãã
- 次æãã¼ã¸ã§ã³ã§ã®APIãåºãã
- SennaQLã使ã£ããµã¼ãã¹ããã©ã¸ã«å
ã§éçºããã®ã«ä½µãã¦
- å ¨ææ¤ç´¢ã¨ã³ã¸ã³ã«å¯¾ããã¯ã¨ãªè¨èªã¨ãã¦å¿ è¦ãªæ©è½ãå®è£ ãã
- å®å®æ§ãä¸ããããã°ç´ãã
- ããã©ã¼ãã³ã¹ã測å®ããSennaQLã足ãå¼ã£å¼µã£ã¦ããªãã調ã¹ã
- SennaQLãç´æ¥æ¸ããªãã¦ãå ¨ææ¤ç´¢ãã§ããAPIã®éçº
SennaQLã¯Schemeã¨ãã¦ã¯æ©è½ã¯è¶³ããªãã®ã§ã
æ¯éæ¯éãããå¸æã§ãã