åå ããã®ç¶ãã§ãã ä»åã¯ããã㪠SELECT ã¯ã¨ãªãè¨è¿°ããããã«ä½¿ç¨ãããã¡ã½ããçã«ã¤ãã¦æ¸ãã¦ã¿ã¾ãã ãã¼ã¿ã»ãã ãã®åã«ã¾ããã¼ã¿ã»ããã«ã¤ãã¦èª¬æãã¾ãã ãã¼ãã«ããã¬ã³ã¼ããã«ã©ã ãçµãè¾¼ãã ãã®ããã¼ã¿ã»ããã¨ããã¾ãã DB[:tbl] ã¯ãã¼ãã«å ¨ä½ã表ããã¼ã¿ã»ãããªãã¸ã§ã¯ãã§ãã ãã¼ã¿ã»ãããªãã¸ã§ã¯ãã«å¯¾ãã where, select çã®ã¡ã½ããã¯å ã®ãã¼ã¿ã»ãããå¤æ´ããã®ã§ã¯ãªããæ°ããªãã¼ã¿ã»ãããè¿ãã¾ãã ds1 = DB[:tbl].where(:col1 => 123) #=> SELECT * FROM tbl WHERE col1 = 123 ds2 = ds1.where(:col2 => 456) #=> SELECT * FROM tbl WHERE col1 = 123 AND col2 = 456 ds3 = ds
{{#tags}}- {{label}}
{{/tags}}