Drkcore

17 10 2006 perl catalyst Tweet

DBIx::Classを使ってみた

いまいち、Class::DBIとDBIx::Classの違いがわかっていないのだけど、Catalystで作りたいものがあったので Perl/DBICなどみながら、いろいろさわってみてる。

My Kwiki: HomePage

Class::DBI inspired ORM designed to be resultset-oriented rather than table-oriented - so native support for views, aggregates (GROUP BY etc.), better automatic JOIN-ing and the ::Sweet search features done properly.

Class::DBIがテーブル指向なのに対して、DBIx::Classはresultset指向らしい。確かにCDBIだとページの処理用にプラグインがあったりするけどDBIx::Classだとさくさく書けた。

もうちょいドキュメント 読む必要があるけど、なかなか楽しげ。

ちなみに、下の二つは同じらしい。今日書いててちょっと悩んだのでメモ

$c->model('DBIC')->resultset('Items')

2006.10.17追記

DBIx::Class::Manual::Glossary - Clarification of terms used. - search.cpan.org

ResultSet

This is an object representing a set of data. It can either be an entire table, or the results of a query. The actual data is not held in the ResultSet, it is only a description of how to fetch the data.

ResultSetとはデータセットを表すオブジェクトで、テーブル全体であったり、クエリの結果だったりする。

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021