サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ChatGPT
sequel.rubyforge.org
A dataset represents an SQL query, or more generally, an abstract set of rows in the database. Datasets can be used to create, retrieve, update and delete records. Query results are always retrieved on demand, so a dataset can be kept around and reused indefinitely (datasets never cache results): my_posts = DB[:posts].filter(:author => 'david') # no records are retrieved my_posts.all # records are
Association Basics This guide is based on guides.rubyonrails.org/association_basics.html Why Associations? Associations exist to simplify code that deals with related rows in separate database tables. Without associations, if you had classes such as: class Artist < Sequel::Model end class Album < Sequel::Model end And you wanted to get all of the albums for a given artist (assuming each album was
Migrations This guide is based on guides.rubyonrails.org/migrations.html Overview Migrations make it easy to alter your database’s schema in a systematic manner. They make it easier to coordinate with other developers and make sure that all developers are using the same database schema. Migrations are optional, you don’t have to use them. You can always just create the necessary database structure
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
Sequel provides thread safety, connection pooling and a concise DSL for constructing database queries and table schemas. Sequel also includes a lightweight but comprehensive ORM layer for mapping records to Ruby objects and handling associated records. Sequel supports advanced database features such as prepared statements, bound variables, stored procedures, master/slave configurations, and databa
Sequel is a lightweight database access toolkit for Ruby. Sequel provides thread safety, connection pooling and a concise DSL for constructing database queries and table schemas. Sequel also includes a lightweight but comprehensive ORM layer for mapping records to Ruby objects and handling associated records. Sequel supports advanced database features such as prepared statements, bound variables,
Cheat Sheet Open a database require 'rubygems' require 'sequel' DB = Sequel.sqlite('my_blog.db') DB = Sequel.connect('postgres://user:password@localhost/my_db') DB = Sequel.postgres('my_db', :user => 'user', :password => 'password', :host => 'localhost') DB = Sequel.ado('mydb') Open an SQLite memory database Without a filename argument, the sqlite adapter will setup a new sqlite database in memory
General Info, Guides, Examples, and Tutorials README Cheat Sheet Dataset Filtering Advanced Associations Prepared Statements/Bound Variables Master/Slave Databases and Sharding Schema Modification Full API RDoc, Main Classes/Modules: Sequel Sequel::Database Sequel::Dataset Sequel::Model Sequel::Model::Associations Sequel::Model::Associations::EagerLoading Change Log Release Notes License External
Ruby Sequel is a lightweight database toolkit for Ruby.Sequel provides thread safety, connection pooling and a concise DSL for constructing database queries and table schemas. Sequel also includes a lightweight but comprehensive ORM layer for mapping records to Ruby objects and handling associated records. Sequel supports advanced database features such as prepared statements, bound variables, mas
このページを最初にブックマークしてみませんか?
『Sequel: The Database Toolkit for Ruby』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く