DBæä½ãã¼ã« Emacs DBI ãä½ã£ã¦ã¿ã
å»å¹´ããã»ãã¼ãã¨ä½ã£ã¦ãããEmacsããDBãæä½ã§ãããã¼ã« Emacs DBI ãç´¹ä»ãã¾ãã
Emacs DBI ã®ç°¡åãªç´¹ä»
ãã®ãã¼ã«ã®ç®çã¯ãã¯ãã¹ãã©ãããã©ã¼ã ã§ä¾¿å©ãªDBæä½ç°å¢ãå®ç¾ãããã¨ã§ãã pgAdmin ã MySQL Query Browser ã®ãããªGUIã®è¯ããCUIã§å®ç¾ãã¦ã¿ããã¨ãã¦ã¿ã¾ãããããªãã¡ãã¼ãã®ããããããããããã®DBãã¼ã«ã§ããã¡ãªã¿ã«ããã®ãã¼ã«ã«ã¨ã£ã¦Emacsã¯ãã ã®å®è¡ç°å¢ã§ããEmacs使ããªã人ã§ã使ãã¨ä¾¿å©ã ã¨æãã¾ãã
ãã¼ã¿ãã¼ã¹ç»é¢
e2wmã§3ãã¤ã³ã®ç»é¢
æ©è½æ¦è¦
以ä¸ã®ãããªæ©è½ãããã¾ãã
- Emacsã¨DBæ¥ç¶å¯è½ãªPerlãåãã°ã¿ã¼ããã«ã§ãä½å¦ã§ãåã
- DBå®ç¾©ããã¼ãã«å®ç¾©ãããè¦ãã
- auto-complete ã«ããSQLè£å®
- æ¥ç¶å DBã«ãããã¼ã¯ã¼ããååããã¼ãã«åãã«ã©ã åãªã©ãè£å®
- 対å¿DBï¼ãã®æ¥è¨æç¹ï¼
- SQLite3, MySQL, PostgreSQL, Oracle
ç°¡åã«ä»çµã¿ã説æãã¾ãã¨ãEmacsã®UIããèªåRPCï¼SWANKã£ã½ãSå¼ã®ãããã³ã«ï¼ã§Perlã«æ¥ç¶ããPerlã®DBIã使ã£ã¦DBæ¥ç¶ããã¨ãããã®ã§ãã
ã¤ã³ã¹ãã¼ã«
Perlã®ã¢ã¸ã¥ã¼ã«ã¨elispãå ¥ããå¿ è¦ãããã¾ãã
ã©ã¡ããããã±ã¼ã¸ã·ã¹ãã ã使ããã¨ã«ãã£ã¦ãã³ãã³ãä¸çºã§å ¥ãããã¨ãåºæ¥ãã®ã§ãããç°å¢ã«ãã£ã¦ã¯ãã¾ãåããªãããããã¾ãããå¤åãããªã«é£ãããªãã¨ã¯æãã¾ãããEmacsã¨Perl/CPANã®ç¥èãããã¨ã¹ã ã¼ãºã§ãã
æå ã§ã®åä½ç¢ºèªã¯ã以ä¸ã®ç°å¢ã§ç¢ºèªãã¦ãã¾ãã
- Gentoo Linux amd64 / perl 5.12.4 / cpanm / Emacs 23.3.5 / SQLite, MySQL, Postgresql
- Windows XP (32bit) / cygwin perl 5.10.1 / cpanm / Emacs 23.3a / SQLite
- Windows XP (32bit) / ActivePerl 5.14.2 / ppm / Emacs 23.3a / SQLite
CPAN
以ä¸ã®CPANã¢ã¸ã¥ã¼ã«ãå ¥ãã¾ãã
- RPC::EPC::Service
- DBI
- DBIãã©ã¤ãï¼ä½¿ãDBã«å¿ãã¦ï¼
- DBD::SQLite (SQLite)
- DBD::Pg (Postgresql)
- DBD::mysql (MySQL)
cpan 使ãã¨ãã®ã³ãã³ãä¾
cpan RPC::EPC::Service DBI DBD::SQLite DBD::Pg DBD::mysql
èªåã®æã§ã¯ã·ã¹ãã å ¨ä½ã®CPANã¨åããããã« cpanm ã使ã£ã¦ãã¾ãã
LinuxãMacãªãããã§å
¥ãã¨æãã¾ããWindowsã§æ軽ã«ä½¿ãã«ã¯ActivePerlãããã¿ããã§ãã
Cygwinã使ã£ã¦ãã人ã¯å¤ãã¨æãã¾ãããCygwin Perl ã¯Perl以å¤ã®ä¾åé¢ä¿ãèªå解決ããå¿
è¦ãããã¾ãã
Windows : Cygwin Perl
Cygwinã®Setup.exeãããPerl ã gcc-4 ã SQLite ãªã©ã®éçºããã±ã¼ã¸ãå ¥ãã¦ãCPANã³ãã³ãã§å ¥ããã¨å ¥ãã¯ãã§ããCygwinã®CPANãé ãã®ã§ã¡ãã£ã¨æéããããã¾ãããã®å ´åã¯ã cpanm ã使ãã¨éãã¦ããã§ããCPANã§ã®ãã«ãã«å¤±æããå ´åã¯ãbuild.logãè¦ãªããä¾åã©ã¤ãã©ãªã追å ããã¨å¤§ä¸å¤«ã¿ããã§ãã
Windows : ActivePerl
(2012/03/07 ä¿®æ£)ActivePerlã®ppmã§ä¸çºã¤ã³ã¹ãã¼ã«ã§ãã¾ã!
ppm install RPC-EPC-Service
Marmalade ã使ã£ãelispã®å ¨èªåã¤ã³ã¹ãã¼ã«
Marmalade package ã·ã¹ãã ãå ¥ã£ã¦ããã°ã M-x list-package ãã¦ããedbiãã¨ããããã±ã¼ã¸ãæ¢ãã¦ã¤ã³ã¹ãã¼ã«æä½ããã ãã§ããå¿ è¦ãªä¾åã©ã¤ãã©ãªãPerlããã°ã©ã ããã¹ã¦ã¤ã³ã¹ãã¼ã«ããã¾ãããã¨ã¯è¨å®ã¸é²ãã§ãã ããã
elispã®æåã¤ã³ã¹ãã¼ã«
Marmaladeã使ããªãå ´åã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã§ãã
ã¾ãã¯ä»¥ä¸ã® elisp ãã¤ã³ã¹ãã¼ã«ãã¾ãã
- deferred.el
- concurrent.el
- ctable.el
- epc.el
- edbi.el
;; auto-installã使ãå ´å (auto-install-from-url "https://github.com/kiwanami/emacs-deferred/raw/master/deferred.el") (auto-install-from-url "https://github.com/kiwanami/emacs-deferred/raw/master/concurrent.el") (auto-install-from-url "https://github.com/kiwanami/emacs-ctable/raw/master/ctable.el") (auto-install-from-url "https://github.com/kiwanami/emacs-epc/raw/master/epc.el") (auto-install-from-url "https://github.com/kiwanami/emacs-edbi/raw/master/edbi.el")
- æåãã¦ã³ãã¼ã
- https://github.com/kiwanami/emacs-deferred/raw/master/deferred.el
- https://github.com/kiwanami/emacs-deferred/raw/master/concurrent.el
- https://github.com/kiwanami/emacs-ctable/raw/master/ctable.el
- https://github.com/kiwanami/emacs-epc/raw/master/epc.el
- https://github.com/kiwanami/emacs-edbi/raw/master/edbi.el
å¾ã¯ perl ã®ããã°ã©ã ãå¿
è¦ã§ãã
以ä¸ã®ãªã³ã¯ãã edbi-bridge.pl ããã¦ã³ãã¼ãã㦠edbi.el ã¨åãæã«ç½®ãã¦ãã ãã
è¨å®ã¨åä½ç¢ºèª
scratchãããã¡ã§ (require 'edbi) ã¨ãã£ã¦ã M-x 'edbi:open-db-viewer ã¨ãã¦DBæ¥ç¶ç»é¢ãåºãã°ã²ã¨ã¾ãOKã§ããããã§ã¨ã©ã¼ãåºãå ´åã¯ãå¿ è¦ãª elisp ãå ¥ã£ã¦ããªãå¯è½æ§ãããã¾ãã
次åèµ·åæãã使ããããã«ã ~/.emacs.d/init.el ãªã©ã®åèªã®è¨å®ãã¡ã¤ã«ã«ä»¥ä¸ã®ããã«è¿½å ãã¾ãã
(autoload 'edbi:open-db-viewer "edbi")
使ãæ¹èª¬æ
åç»é¢ãç°¡åã«èª¬æãã¾ããå¾ã§ç»é¢é·ç§»ã«ã¤ãã¦ãã¾ã¨ãã¾ãã
æ¥ç¶
M-x edbi:open-db-viewer ã§æ¥ç¶ãã¤ã¢ãã°ãéãã¾ãã
æ¥ç¶ãã¤ã¢ãã°
ãData Sourceãã«ã¯DBIã§æ¥ç¶ããã¨ãã®æ¸ãæ¹ã§ãæ¥ç¶å ã®DBæ å ±ãæ¸ãã¾ãã以ä¸ãæ¸ãæ¹ã®ä¾ã§ãã
- sqlite : dbi:SQLite:dbname=/path/to/abcd.sqlite
- postgresql : dbi:Pg:dbname=abcd (â»abcd ã¨ããDBã«æ¥ç¶ããå ´å)
- mysql : dbi:mysql:abcd (â»abcd ã¨ããDBã«æ¥ç¶ããå ´å)
- 詳細㯠DBIのドキュメントãåDBDã®ããã¥ã¡ã³ããåç §ãã¦ãã ããã
ãUser NameããAuthãã«ã¯ãæ¥ç¶ã®ããã®ã¦ã¼ã¶ã¼åã¨ãã¹ã¯ã¼ããå ¥ãã¾ããã¦ã¼ã¶ã¼åããã¹ã¯ã¼ããå¿ è¦ãªãDBã¯å ¥åããå¿ è¦ã¯ããã¾ããã
ä¸åº¦æ¥ç¶ç¢ºç«ããããData Source 㨠User Name ã¯å±¥æ´ã«æ®ãã¾ãã®ã§ã次åããã¯ãHistoryããã¯ãªãã¯ããããã¿ã³ã®ä¸ã§RETããã¨é¸æã§ãã¾ããå±¥æ´ã¯ edbi:ds-history-file ã«ä¿åããã¾ããï¼å±¥æ´ã®ç·¨éæ©è½ã¯ç¾å¨ããã¾ãããï¼
æ¥ç¶ã®éã«ã¨ã©ã¼ãçºçããã¨ãã¨ã©ã¼ã®å 容ãä¸ã®æ¹ã«è¡¨ç¤ºããã¾ããæ¥ç¶æ å ±ã«ééãããªããã°ã¤ã³ã¹ãã¼ã«ã«åé¡ãããããããã¾ããããã©ãã«ã·ã¥ã¼ãã£ã³ã°ã®é ãåç §ãã¦ãã ããã
DBå®ç¾©ç»é¢
Emacs DBI ã®ãã¼ã çãªç»é¢ã§ããæ¥ç¶å
ã®ãã¼ãã«ããã¥ã¼ã®ä¸è¦§ã表示ããã¾ãã
ããããåãã¼ãã«ã®å®ç¾©ãã¯ã¨ãªã¼ã®å
容ã表示ãã¾ãã
DBå®ç¾©ç»é¢
主ãªãã¼ãã¤ã³ãã§ãã
ãã¼ | åä½ |
---|---|
j,k,n,p | é¸æã®ä¸ä¸ç§»å |
SPC | é¸æãããã¼ãã«ã®å®ç¾©è¡¨ç¤º |
RET | é¸æãããã¼ãã«ã®ãã¼ã¿è¡¨ç¤º |
c | ã¯ã¨ãªã¼ã¨ãã£ã¿éã |
g | ææ°ã®æ å ±ã«æ´æ° |
q | Emacs DBI çµäº |
ï¼è©³ãã㯠edbi:dbview-keymap 㨠ctbl:table-mode-map ãåç §ãã¦ãã ãããï¼
ãã¼ãã«å®ç¾©ç»é¢
ãã¼ãã«ããã¥ã¼ã®å®ç¾©ã表示ãã¾ããã«ã©ã ã®ååã»åã»ãµã¤ãºã主ãã¼ãNOT NULLãªã©ã®æ å ±ãè¦ããã¨ãã§ãã¾ãã
ãã¼ãã«å®ç¾©ç»é¢
主ãªãã¼ãã¤ã³ãã§ãã
ãã¼ | åä½ |
---|---|
j,k, n,p | ä¸ä¸ç§»å |
V | ãã¼ãã«ã®ãã¼ã¿è¡¨ç¤º |
c | ã¯ã¨ãªã¼ã¨ãã£ã¿éã |
g | ææ°ã®æ å ±ã«æ´æ° |
q | ãããã¡kill |
ï¼è©³ãã㯠edbi:dbview-table-keymap 㨠ctbl:table-mode-map ãåç §ãã¦ãã ãããï¼
ã¯ã¨ãªã¼ã¨ãã£ã¿ç»é¢
ãã®ãããã¡ã§SQLãæ¸ãã¾ããC-c C-c ã§SQLå®è¡ã M-p / M-n ã§éå»ã«å®è¡ããSQLã表示ã§ãã¾ãã
sql-mode ããã¼ã¹ã«ããã¡ã¸ã£ã¼ã¢ã¼ãã«ãªã£ã¦ãã¦ãé©å½ãªã·ã³ã¿ãã¯ã¹ãã¤ã©ã¤ãã¨ãauto-completeãå
¥ã£ã¦ããã°è£å®ãå¹ãã¦ãEmacsã®ã¨ãã£ã¿ã®è½åãçããã¦å¹çããSQLãæ¸ããã¨ãã§ãã¾ãã
ã¨ãã£ã¿ç»é¢
主ãªãã¼ãã¤ã³ãã§ãã
ãã¼ | åä½ | |
---|---|---|
C-c C-c | SQLå®è¡ | |
M-p | å±¥æ´ãã©ã | |
M-n | å±¥æ´ããã | |
C-q q | Emacs DBI çµäº |
ï¼è©³ããã¯edbi:sql-mode-map ãåç §ãã¦ãã ãããï¼
ç¾å¨ã®ã¨ãããSQLã®å±¥æ´ã¯Emacsãçµäºããã¨æ¶ãã¦ãã¾ãã¾ãã
ã¯ã¨ãªã¼çµæç»é¢
SQLã®çµæãè¦ããããã¼ãã«ã§è¡¨ç¤ºãã¾ãã
çµæç»é¢
主ãªãã¼ãã¤ã³ãã§ãã
ãã¼ | åä½ |
---|---|
j,k,n,p | ä¸ä¸ç§»å |
h,l,b,f | å·¦å³ç§»å |
a,e | 左端ãå³ç«¯ç§»å |
q | ãããã¡kill |
SELECTã§ãªãSQLã®å ´åã¯ãå½±é¿ãåããè¡æ°ã表示ããã¾ãã
ï¼ãã ããDBIãã©ã¤ãã®å®è£
ã«ãã£ã¦ã¯ãªãã ãããåãããªãå¤ã«ãªããã¨ãããã¾ããï¼
ç»é¢é·ç§»
ããã¾ã§ã®ç»é¢ã®é·ç§»ãã¾ã¨ããã¨ä»¥ä¸ã®ããã«ãªãã¾ãã
ç»é¢é·ç§»
çµäºãæ¥ç¶ã®å¾å§æ«
Emacs DBI ãçµäºããã«ã¯ãDBå®ç¾©ç»é¢ï¼*edbi-dbviewer* ãããã¡ï¼ã§ q ãæ¼ãã¾ãããã®éãé¢é£ãããããã¡ãä¸ç·ã«æ¶ãã¦ãã¾ã£ã¦ãããã©ããã®ç¢ºèªãåºã¾ããæ®éã¯æ¶ãã¦ãã¾ã£ã¦ããã¨æãã¾ãã
DBå®ç¾©ç»é¢ãæ®éã«killãã¦ãã¾ãã¨ãDBæ¥ç¶ã ããæ®ã£ã¦ãã¾ãå ´åãããã¾ãããããªæã¯ã M-x epc:manager ã¨ããã¨ãç¾å¨æ¥ç¶ä¸ã®EPCãä¸è¦§ã§åºã¦ãã¾ãããã®ç»é¢ã§å¿ è¦ãªãæ¥ç¶ã®è¡ã«ç§»åãã¦ãDããæ¼ãã¨æ¥ç¶ãæ¶ããã¨ãã§ãã¾ããEPCã«ã¤ãã¦ã¯å¥ã®ã¨ã³ããªã§ããã¨æãã¾ãã
EPCæ¥ç¶ç»é¢
ãã©ãã«ã·ã¥ã¼ã
äºæ³ããããã©ãã«ã¨å¯¾å¿æ¹æ³ãç°¡åã«ã¾ã¨ãã¾ããã
è¿æã« Emacs ã Perl ã®ããã«ã¼ãä¸äººã¯ããã¨æãã¾ãã®ã§ããã¾ãåããªãå ´åã¯ç¸è«ãããã¨ããã¨æãã¾ãã
- LC_ALLã¨ãLANGã®ãã±ã¼ã«ãä¸æã¨ããã¨ã©ã¼
- (setenv "LC_ALL" "ja_JP.utf8") ã¨ãè©ä¾¡ããã¨åãããããã¾ããã
- ãfile-error Searching for program ãã®ãããªãã¡ã¤ã«ããã£ã¬ã¯ããªã¯ããã¾ãã perlã
- ãerror Server may raise an error : Can't open perl script "ã/edbi-bridge.pl": ãã®ãããªãã¡ã¤ã«ããã£ã¬ã¯ããªã¯ããã¾ãã ï¼ä»¥ä¸ç¥ã
- edbi-bridge.pl ãè¦ã¤ãããªãã¨ããã¨ã©ã¼ã§ã
- edbi.el ã¨åããã£ã¬ã¯ããªã«ããã°å¤§ä¸å¤«ã®ã¯ãã§ã
- ãã¾ãè¡ããªãå ´åã¯ãæå㧠edbi:driver-libpath ã edbi-bridge.pl ã®ãããã£ã¬ã¯ããªã«è¨å®ãã¦ã¿ã¦ãã ããã
- ãerror Server may raise an error : Can't locate RPC/EPC/Service.pm in @INC (@INC contains: ...ï¼ä»¥ä¸ç¥ã
- Perlã¢ã¸ã¥ã¼ã«ãè¦ã¤ãããªãã¨ããã¨ã©ã¼ã§ã
- RPC::EPC::Service ãªã©ã®ã¤ã³ã¹ãã¼ã«ããã¤ã³ã¹ãã¼ã«å ã®CPANã®ãã£ã¬ã¯ããªãè¦ãã¦ãªãå¯è½æ§ãããã¾ã
- ç°å¢ã«ãã£ã¦ã¯ AnyEvent ãåããªãå ´åãããããã§ã
- ãã®ä»
ã¾ã ã¾ã éçºéä¸ã§ãã®ã§ããã°ãä¸ä¾¿ãªã¨ãããããããããã¨æãã¾ãã
ã«ã¹ã¿ãã¤ãº
å¤æ°ãããã¯ããã¼ããã
- ãã¼ãã«ç°¡æãã¼ã¿è¡¨ç¤ºã® LIMIT 件æ°ãããã©ã«ãã¯50ã
- edbi:dbview-show-table-data-default-limit
- é·ãæååã®åãæ¨ã¦æåæ°ãããã©ã«ã㯠50ã
- edbi:query-result-column-max-width
- åºå®ãããã¼ãããããã¡å
ãããã¼ããããã©ã«ã㯠t ï¼åºå®ãããã¼ï¼
- edbi:query-result-fix-header
- åºå®ã ã¨ç¸¦ã¹ã¯ãã¼ã«ãã¦ããããã¼ã表示ããããã横ã¹ã¯ãã¼ã«ããã¨åãã¦ãã¾ã
- ãããã¡å ãããã¼ã ã¨æ¨ªã¹ã¯ãã¼ã«ãã¦ãåé¡ãªããã縦ã¹ã¯ãã¼ã«ã§åãã¦ãã¾ã
- ã¯ã¨ãªã¼ç·¨éãããã¡ã® mode-hook
- edbi:sql-mode-hook
- ãã¼ããã
- ctbl:table-mode-map : ãã¼ãã«ã®åºæ¬ãã¼ããã
- edbi:dbview-keymap : DBå®ç¾©ç»é¢ã®ãã¼ããã
- edbi:dbview-table-keymap : ãã¼ãã«å®ç¾©ç»é¢ã®ãã¼ããã
- edbi:sql-mode-map : ã¯ã¨ãªã¼ç·¨éç»é¢ã®ãã¼ããã
- edbi:dbview-query-result-keymap : ã¯ã¨ãªã¼çµæç»é¢ã®ãã¼ããã
e2wmã¨ã®é£æº
e2wmã®ãã¼ã¹ãã¯ãã£ãã«ãããã¨ã§ãGUIã¢ããªã®ããã«ã¦ã¤ã³ãã¦ã®æ§æãåºå®ãã¦ä½¿ããã¨ãã§ãã¾ãã
e2wm ç»é¢
å©ç¨æ¹æ³ã¯ã以ä¸ã® elisp ã e2wm ã®å¾ã§èªã¿è¾¼ãããã«è¨å®ãã¾ãã
- edbi-e2wm.el : https://gist.github.com/1842966
ãã®ä¾ã§ã¯ãSuper+Dãã§DBç»é¢ã«ãªãããã«è¨å®ãã¦ãã¾ãã
ãã¼ä¸çºã§ã³ã¼ãã¨DBæä½ãåãæ¿ãããã¨ãã§ããã®ã§ãWebã¢ããªéçºã®ãããªã³ã¼ãã¨DBãé »ç¹ã«åç §ãããããªéçºã«å¨åãçºæ®ãã¾ãã
å¥ã®DBMSã¸ã®å¯¾å¿
ç¾å¨ã®ã¨ãããSQLite, MySQL, Postgresql ã¨ãid:buzztaiki ããã«ããããããã ãã Oracle ã«å¯¾å¿ãã¦ãã¾ãããã以å¤ã®DBMSã«ã¤ãã¦ã¯ãPerlã®DBDï¼DBIã®ãã©ã¤ãï¼ãããã°åççã«å¯¾å¿å¯è½ã§ãããã ããDBDãDBMSã«ãã£ã¦APIã®ä»æ§ãè¿ãå¤ãããªãç°ãªãããããã®ã¾ã¾ã§ã¯åããªãå¯è½æ§ãé«ãã§ãã
ä»ã®DBMSã¸ã®å¯¾å¿ã追å ããæ¹æ³ã¯ä»¥ä¸ã®ããã§ãã
- githubã® edbi-demo.el ãããããå®è¡ããªããDBDããã®è¿ãå¤ã確èª
- ä»ã®DBMSã®ãã®ãåèã«ããªãã edbi:dbd æ§é ä½ãå®ç¾©
- edbi:dbd-register ã§ç»é²ãã¦æ¥ç¶ããªããã¦åä½ç¢ºèª
ãããããæãã«è¿½å 対å¿ãã§ãããã pull request ãéã£ã¦ããã ãããåãè¾¼ã¿ããã¨æãã¾ãã
ä»å¾ã®å±é
以ä¸ãèªåãç¾å¨èãã¦ããå¸æã§ããå®ç¾ãããã©ããã¯æªå®ã§ãã
- 対å¿DBã®è¿½å
- ãã¼ãã«å®ç¾©ç»é¢ã®å
å®
- ã¤ã³ããã¯ã¹æ å ±ã®åå¾ (ç¾å¨SQLiteããåãã¦ãªã)
- Foreign Key æ å ±
- ã¯ã¨ãªã¼é¢ä¿
- ãã使ãSQLã®ä¿åæ©è½ãAnythingã§é¸æã¨ã
- 段éçãã¼ã¿åå¾ï¼ç¾å¨ã¯å ¨é¨åã£ã¦ãã¦ãã¾ãï¼
- LIMITã¯ãã£ãæªãï¼fetchã使ã£ã¦ãã®ã§ãå®éã«ã¯ããã°ã©ã ããéä¸ã§æ¢ãããã¨ãåºæ¥ãï¼
- auto-complete ã§æèãã¿ã¦è£å®ã§ããã¨è¯ããã
- ãã¼ã¿æä½æ©è½
- ã¬ã³ã¼ãã®è©³ç´°è¡¨ç¤ºï¼é·ãããã¹ãã¯åããã®ã§ï¼
- ãã¼ãã«ã«INSERTããæ©è½
ãã¨ãã
ããããããã®ãã¼ã«ãã¤ãããã¨æã£ãã®ã¯ãLinuxç¨ã®è¯ãDBæä½ç¨GUIãã¼ã«ãç¡ãã£ãããã§ãã
éçºã®æã¯SQLãããããæ¸ãã®ã§ãè£å®ãã·ã³ã¿ãã¯ã¹ãã¤ã©ã¤ãã欲ããã§ããããã¼ãã«å®ç¾©ãé »ç¹ã«è¦ããã§ããã³ã³ã½ã¼ã«ã ã¨ãã®ãããã®ãµãã¼ããå ¨ãç¡ãã®ã§ä¸ä¾¿ã§ããã
Emacs ã«ã¯ sql-mode ã inferior 㪠sql-interactive-mode ãããã¾ãããèªåã«ã¨ã£ã¦ã¯ console ãã¡ãã£ã¨ä¾¿å©ã«ãªã£ãç¨åº¦ã§ãããªãã®ã§ãã³ã³ã½ã¼ã«ã«æ¯ã¹ã¦ã¡ãªãããæãããã¾ããã§ããã
- ã³ã³ã½ã¼ã«UIã®åé¡
ä¸æ¹ãGUIã®ã¢ããªã¯ãçµæããã¼ãã«ã®å½¢ã§è¡¨ç¤ºãããã®ã§è¦ããããã¾ããã¼ãã«ã®å®ç¾©æ å ±ã¸ã®ã¢ã¯ã»ã¹ã容æã§ããããã«ãGUIã§ãã¼ãã«ãDBMSã®ç®¡çãè¡ããããExplainã®çµæãè¦ãããæ´å½¢ã§ãããã便å©ãªæ©è½ãããããããã¾ãã
èªåã使ã£ãã試ããããããã¨ãããDBæä½ã®GUIãã¼ã«ã«ã¯ä»¥ä¸ã®ãã®ãããã¾ãã
- pgAdmin
- http://www.pgadmin.org/
- 便å©
- EXPLAINãç´ æµ
- MySQL Query Browser / MySQL Workbench
- http://dev.mysql.com/
- Query Browser ã¯ä¾¿å©ã ã£ã
- Workbenchã«ãªã£ã¦ããåãããªããªã£ã
- SQL Server Management Studio
- http://en.wikipedia.org/wiki/SQL_Server_Management_Studio
- DBã«é¢ãããã¨ã¯ä½ã§ãåºæ¥ã
- 管çãããã¯ã¢ãããç£æ»ãå®ç¾©ãEXPLAIN ãªã©ãªã©
- æ»ã¬ã»ã©éãã®ã§ä½¿ããããªã
- phpMySQLAdmin
- http://www.phpmyadmin.net/home_page/
- ããããåºæ¥ã
- ãã®ããã«Webãµã¼ãã¼ãPHPã»ããã¢ããããã®ãé¢å
- SQLite Browser
- http://sqlitebrowser.sourceforge.net/
- 大ä½ãããã©ãä»ã®ãã¼ã«ã«æ¯ã¹ã¦GUIãé©å½ã§ç´°ããæã使ãã¥ãã
- SQLite Manager (Firefox plugin)
- https://addons.mozilla.org/ja/firefox/addon/sqlite-manager/
- SQLite Browserãããã£ã¡ã®æ¹ã使ããããã®ã§ãå°ç¨ã®Firefoxã®ãããã¡ã¤ã«ãç¨æããã¨ããæãã
- CSE
- http://www.hi-ho.ne.jp/tsumiki/
- æ´å²ãåä½å®ç¸¾ãå¤ããODBCçµç±ã§ã¯ç¾å ´ããã¡ã¯ãããã
- A5:SQL Mk2
- http://www.wind.sannet.ne.jp/m_matsu/developer/a5m2/
- å人çã«æ°ã«å ¥ã£ã¦ãã
- ODBCãOLEã§ã®æ¥ç¶ãè±å¯
- å®ç¾©æ¸åºåãSQLã®è£å®ã便å©
- Eclipse / DBViewer
- http://www.ne.jp/asahi/zigen/home/plugin/dbviewer/about_jp.html
- Eclipseã§éçºãã人åã
- æã¯DBEditã¨ã使ã£ã¦ã
- NetBeans
- http://netbeans.org/features/ide/database.html
- JPAãåºãé ããæ¥éã«DBã¨Javaéçºã®èåãé²ãã§ã
- JDevelopperãç¾å ´ã®è©å¤ããããã
Windows ã«ã¯ããããGUIãã¼ã«ãããã®ã§ãããMacçã¯æ®ã©ããã¾ãããLinuxã¯Macããã¯ã¾ãã§ããã常ç¨ã§ãããã¼ã«ã¯ã»ã¨ãã©ç¡ãã§ããIDEçµ±åã®ãã¼ã«ã¯ã©ã®OSã§ãåãã¦ä¾¿å©ãããªã®ã§ããããããããã®ããã«IDEèµ·åãããããã¾ããã
軽ãã¦ãã©ã®OSã§ãåãããã«åãã¦ãGUIã®ãã¼ã«ããã便å©ã«ä½¿ãã¦ãEmacs並ã«ã¨ãã£ã¿ãå¼·åãªDBæä½ãã¼ã«ã欲ããã®ã§ãã
ã¨ãããã¨ã§ãç¡ããªãä½ããã¨ããäºã§ãå»å¹´ã® calfw ãä¸æ®µè½ããå¾ããä½ãå§ãã¾ãããéä¸ãæ´¾çãã¼ã«ã¨ã㦠epc / ctable ãªã©ãåºæ¥ã¾ããã
ä»ã§ã¯æ¥å¸¸çã«Emacs DBIã使ã£ã¦ãã¾ããã大å¤å¹¸ããªæ¯æ¥ãéã£ã¦ãã¾ãã
次åäºå®ããç¥ãã
以ä¸ã®å 容ãäºå®ãã¦ãã¾ãã
ã¾ãã3/31ã® Fukuoka Perl Workshop #21 ã«ã¦ãEmacs DBI ã epc ã®å é¨ã®åããªã©ã«ã¤ãã¦çºè¡¨ãããããªã¨èãã¦ãã¾ãã@lestrrat ããã @nekokak ãããæ¥ãããããã§ãã®ã§ããã²ã©ããï¼