require 'sequel' require 'logger' opts = { # hostãªã©DBæ¥ç¶æ å ± loggers: [Logger.new('/tmp/sql.log')] } dbh = Sequel.connect(opts) dbh[:sample_data___st].select( :st__id, :st__data ).where( st__id: 10 ).all # é åå½¢å¼ã§è©²å½ãããã¼ã¿ãå ¨ä»¶åå¾ ã¨ããããªé¢¨ã«ãããã¨ã§loggersãã¼ã§æå®ããå ´æã«SQLãåºåãããããã«ãªãã¾ãã ã覧ã®ã¨ããloggersã«ã¯é åã渡ãã¦ããã®ã§è¤æ°ã®ãã°ã«åããã¨ãå¯è½ã¨ãªã£ã¦ãã¾ãã åºåçµæã¨ãã¦ã¯ãããªæãã§ãã (0.019228s) SELECT `st`.`id`, `st`.`data` FROM `sample_data` AS `st`
{{#tags}}- {{label}}
{{/tags}}