Sequel Ruby对象映射框架

程序名称:Sequel

授权协议: 未知

操作系统: 跨平台

开发语言: Ruby

Sequel 介绍

Sequel 是一个 Ruby 语言的对象映射框架(ORM),提供了线程安全、连接池以及 DSL 语言用来构造查询和表模型。

示例代码

require "rubygems"  
require "sequel"

# connect to an in-memory database  
DB = Sequel.sqlite

# create an items table  
DB.create_table :items do  
  primary_key :id  
  String :name  
  Float :price  
end

# create a dataset from the items table  
items = DB[:items]

# populate the table  
items.insert(:name => 'abc', :price => rand * 100)  
items.insert(:name => 'def', :price => rand * 100)  
items.insert(:name => 'ghi', :price => rand * 100)

# print out the number of records  
puts "Item count: #{items.count}"

# print out the average price  
puts "The average price is: #{items.avg(:price)}"

Sequel 官网

http://sequel.jeremyevans.net/

相关编程语言

BlazeDS 是一个基于服务器的Java 远程控制(remoting...
OVal 是一个可扩展的Java对象数据验证框架,验证的规...
Volta 是一套开发工具,专为开发分布式、实时系统应...
OpenDDS 是一个开源的 C++ 实现的 对象管理组织 OMG...
JADE (Java Agent DEvelopment Framework) 是一个完...
FastMM ,在D2006和2007中已代替了原来的内存管理器。