タグ

関連タグで絞り込む (3)

タグの絞り込みを解除

sequelに関するsaronpasuのブックマーク (3)

  • SequelのTipsのようなもの - しばそんノート

    Rubyにおける軽量なデータベースツールキットとして、なかなかお手軽なSequelですが、実際に使うにあたっていくつか悩んだポイントがあったので、備忘録としてその解決法をメモしておきます。 なお、この記事はRuby 1.9.1p378とSequel 3.8.0の組み合わせを対象として書いています。 モデルの定義前にDB接続をしたくない SequelにもActiveRecordパターンに基づいたモデルの仕組みが用意されていますが、「モデルを定義した時点でデータベースへの接続が存在していなければならない」という制約があります。 つまり、 require 'sequel' Sequel.connect('sqlite://test.db') class User < Sequel::Model; end p User.all は動きますが、 require 'sequel' class User

    SequelのTipsのようなもの - しばそんノート
    saronpasu
    saronpasu 2010/07/24
    比較的最近のsequelの話。メモっとく
  • Sequel: The Database Toolkit for Ruby - Plugins

    Sequel::Model Plugins Sequel::Model has a very flexible and standardized plugin architecture, see the RDoc. Here is a list of plugins that members of the Sequel community have developed: Built-in Plugins association_proxies: Changes the *_to_many association method to return a proxy instead of an array of objects. caching: Supports caching primary key lookups of model objects to any object that su

  • はてなブログ | 無料ブログを作成しよう

    織田信長 ぼちぼち、元気にやっています。少し薬にも慣れた...んかなぁ。相変わらずべられないけど。朝、指がこわばって文字なんて入力できなかったけど、それはほぼなくなった。関節もどこも痛くない。薬効いてきたんやろな。 で、ブログを書こうと言う気がまた起きてきた。 …

    はてなブログ | 無料ブログを作成しよう
    saronpasu
    saronpasu 2009/02/27
    日本語でいろいろ詳しく書いてある Sequelの使い方など
  • 1