SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Fernando Blat
             @ferblape
Tuesday, April 12, 2011
Un poco sobre mí

       •       De Valencia            • unvlog.com
       • 4 años en The Cocktail y     • iwannagothere.com //
               La Coctelera             mimaleta.com

       •       He sido freelance un   • lacoctelera.com //
               tiempo                   partigi.com

       • Ahora trabajo en             • actuable.es
               Vizzuality

Tuesday, April 12, 2011
Sequel!



Tuesday, April 12, 2011
Dataset



Tuesday, April 12, 2011
Representación de un
                 conjunto de filas de una
                      o varias tablas


Tuesday, April 12, 2011
users                              updates
              -           id            -   id
              -           username      -   user_id
              -           email         -   message
              -           created_at    -   created_at




Tuesday, April 12, 2011
DB = Sequel.connect('sqlite://
      ddbb.sqlite3')

      DB.class
      => Sequel::Postgres::Database




Tuesday, April 12, 2011
users = DB[:users]
         => #<Sequel::SQLite::Dataset:
         "SELECT * FROM `users`">




Tuesday, April 12, 2011
users.filter("email = ?", 'ferblape@gmail.com')

   => #<Sequel::SQLite::Dataset: "SELECT * FROM
   `users` WHERE (email = 'ferblape@gmail.com')">




Tuesday, April 12, 2011
users.filter("email = ?", 'ferblape@gmail.com').sql

  => "SELECT * FROM `users` WHERE (email =
  'ferblape@gmail.com')




Tuesday, April 12, 2011
Un Dataset es una
                           representación


Tuesday, April 12, 2011
#first, #last,
                             #count,
                            #all, ...


Tuesday, April 12, 2011
Algunas consultas con
                                 Sequel


Tuesday, April 12, 2011
users[1]

                 users[:username => 'blat']




Tuesday, April 12, 2011
users.filter({:email =>
  ['ferblape@gmail.com','ferblape@vizzuality.co
  m']}).sql

  => "SELECT * FROM `users` WHERE (`email` IN
  ('ferblape@gmail.com',
  'ferblape@vizzuality.com'))"




Tuesday, April 12, 2011
users.filter({:email =>
 ['ferblape@gmail.com','ferblape@vizzuality.co
 m']} & ~{:username => 'blat'}).sql

 => "SELECT * FROM `users` WHERE ((`email` IN
 ('ferblape@gmail.com',
 'ferblape@vizzuality.com')) AND (`username` !
 = 'blat'))"




Tuesday, April 12, 2011
users.filter{created_at > Date.today}.or
   {created_at < Date.today - 60}.order
   (:id).limit(10).sql

   => "SELECT * FROM `users` WHERE
   ((`created_at` > '2011-03-26') OR
   (`created_at` < '2011-01-25')) ORDER BY `id`
   LIMIT 10"




Tuesday, April 12, 2011
Inserciones



Tuesday, April 12, 2011
users.insert(:username => 'blat', :email =>
    'ferblape@gmail.com')
    => 1

    users.insert(:username => 'blatvizz', :email
    => 'ferblape@vizzuality.com')
    => 2




Tuesday, April 12, 2011
Actualizaciones



Tuesday, April 12, 2011
users.update(:id => :id + 1000)
        => 2

        users.all
        =>
        [{:id=>1001, :username=>"blat",
        :email=>"ferblape@gmail.com",
        :created_at=>2011-03-26 00:00:00 +0100},
        {:id=>1002, :username=>"blatvizz",
        :email=>"ferblape@vizzuality.com",
        :created_at=>2011-03-26 00:00:00 +0100}]



Tuesday, April 12, 2011
Resultados de las
                             consultas


Tuesday, April 12, 2011
users.all

       =>
       [{:id=>1, :username=>"blat",
       :email=>"ferblape@gmail.com",
       :created_at=>nil},
       {:id=>2, :username=>"blatvizz",
       :email=>"ferblape@vizzuality.com",
       :created_at=>nil}]




Tuesday, April 12, 2011
users.to_hash(:id,:username)

                 => {1=>"blat", 2=>"blatvizz"}




Tuesday, April 12, 2011
users.select_map(:username)

                 => ["blat", "blatvizz"]




Tuesday, April 12, 2011
Algunos ejemplos más
                           esotéricos


Tuesday, April 12, 2011
users.group_and_count(:id).sql

                 => "SELECT `id`, count(*) AS 'count'
                 FROM `users` GROUP BY `id`"




Tuesday, April 12, 2011
updates.join(users.filter{created_at <
   Date.today}, :id => :user_id).sql

   => "SELECT * FROM `updates` INNER JOIN
   (SELECT * FROM `users` WHERE (`created_at` <
   '2011-03-26')) AS 't1' ON (`t1`.`id` =
   `updates`.`user_id`)"




Tuesday, April 12, 2011
users.select(:username___wadus).sql

                 => "SELECT `username` AS 'wadus' FROM
                 `users`"




Tuesday, April 12, 2011
Modelos



Tuesday, April 12, 2011
Tuesday, April 12, 2011
class Table < Sequel::Model(:user_tables)

                 # Ignore mass-asigment on not allowed columns
                 self.strict_param_setting = false

                 # Allowed columns
                 set_allowed_columns(:name, :privacy, :tags)

                 def before_validation
                   self.privacy ||= :public
                   self.name = set_table_name if self.name.blank?
                   super
                 end

                 ...

            end




Tuesday, April 12, 2011
Más



Tuesday, April 12, 2011
• migraciones estilo             • zonas horarias
               ActiveRecord
                                        • relaciones
       • gestión de múltiples           • dirty attributes
               bbdd: maestro-esclavo,
               maestro-maestro          • serialización JSON
       • sharding de tablas             • compatibilidad con
                                          ActiveModel
       • transacciones
       • paginación                     • extensiones y plugins

Tuesday, April 12, 2011
Tuesday, April 12, 2011
¿Vale la pena utilizarlo
                                 con Rails?


Tuesday, April 12, 2011
Acoplamiento

                     • tareas Rake
                     • migraciones
                     • generadores
                     • config/database.yml

Tuesday, April 12, 2011
sequel-rails



Tuesday, April 12, 2011
Gracias!




Tuesday, April 12, 2011

Mais conteúdo relacionado

Destaque

Administración ágil de sistemas en el entorno de una startup
Administración ágil de sistemas en el entorno de una startupAdministración ágil de sistemas en el entorno de una startup
Administración ágil de sistemas en el entorno de una startupFernando Blat
 
Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014
Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014
Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014javier ramirez
 
How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...
How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...
How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...javier ramirez
 
Everything you always wanted to know about Distributed databases, at devoxx l...
Everything you always wanted to know about Distributed databases, at devoxx l...Everything you always wanted to know about Distributed databases, at devoxx l...
Everything you always wanted to know about Distributed databases, at devoxx l...javier ramirez
 
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA LondonBuilding Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA Londonjavier ramirez
 
Highly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowakiHighly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowakijavier ramirez
 

Destaque (6)

Administración ágil de sistemas en el entorno de una startup
Administración ágil de sistemas en el entorno de una startupAdministración ágil de sistemas en el entorno de una startup
Administración ágil de sistemas en el entorno de una startup
 
Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014
Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014
Bigdata for small pockets, by Javier Ramirez from teowaki. RubyC Kiev 2014
 
How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...
How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...
How you can benefit from using Redis. Javier Ramirez, teowaki, at Codemotion ...
 
Everything you always wanted to know about Distributed databases, at devoxx l...
Everything you always wanted to know about Distributed databases, at devoxx l...Everything you always wanted to know about Distributed databases, at devoxx l...
Everything you always wanted to know about Distributed databases, at devoxx l...
 
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA LondonBuilding Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
 
Highly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowakiHighly available distributed databases, how they work, javier ramirez at teowaki
Highly available distributed databases, how they work, javier ramirez at teowaki
 

Semelhante a Fernando Blat discusses Sequel ORM features and usage

Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)
Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)
Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)jeremymcanally
 
A Tour Through the Groovy Ecosystem
A Tour Through the Groovy EcosystemA Tour Through the Groovy Ecosystem
A Tour Through the Groovy EcosystemLeonard Axelsson
 
JS Tooling in Rails 3.1
JS Tooling in Rails 3.1JS Tooling in Rails 3.1
JS Tooling in Rails 3.1Duda Dornelles
 
Web Scraping using Diazo!
Web Scraping using Diazo!Web Scraping using Diazo!
Web Scraping using Diazo!pythonchile
 
Ruby hollywood
Ruby hollywoodRuby hollywood
Ruby hollywoodehuard
 
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)jbellis
 
HootSuite Dev 2
HootSuite Dev 2HootSuite Dev 2
HootSuite Dev 2ujihisa
 
Doctrator Symfony Live 2011 Paris
Doctrator Symfony Live 2011 ParisDoctrator Symfony Live 2011 Paris
Doctrator Symfony Live 2011 Parispablodip
 
Solving the "Brooklyn Problem"
Solving the "Brooklyn Problem" Solving the "Brooklyn Problem"
Solving the "Brooklyn Problem" Kellan
 
Online journalism: thinking about platforms
Online journalism: thinking about platformsOnline journalism: thinking about platforms
Online journalism: thinking about platformsPaul Bradshaw
 
Ronnieovergoor weekvandeondernemer - part1
Ronnieovergoor   weekvandeondernemer - part1Ronnieovergoor   weekvandeondernemer - part1
Ronnieovergoor weekvandeondernemer - part1Ronnie Overgoor
 
international PHP2011_ilia alshanetsky_Hidden Features of PHP
international PHP2011_ilia alshanetsky_Hidden Features of PHPinternational PHP2011_ilia alshanetsky_Hidden Features of PHP
international PHP2011_ilia alshanetsky_Hidden Features of PHPsmueller_sandsmedia
 

Semelhante a Fernando Blat discusses Sequel ORM features and usage (15)

Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)
Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)
Big and Fat: Using MongoDB with Deep and Diverse Data Sets (MongoATL version)
 
A Tour Through the Groovy Ecosystem
A Tour Through the Groovy EcosystemA Tour Through the Groovy Ecosystem
A Tour Through the Groovy Ecosystem
 
JS Tooling in Rails 3.1
JS Tooling in Rails 3.1JS Tooling in Rails 3.1
JS Tooling in Rails 3.1
 
Web Scraping using Diazo!
Web Scraping using Diazo!Web Scraping using Diazo!
Web Scraping using Diazo!
 
Ruby hollywood
Ruby hollywoodRuby hollywood
Ruby hollywood
 
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
 
Changeyrmarkup
ChangeyrmarkupChangeyrmarkup
Changeyrmarkup
 
HootSuite Dev 2
HootSuite Dev 2HootSuite Dev 2
HootSuite Dev 2
 
Doctrator Symfony Live 2011 Paris
Doctrator Symfony Live 2011 ParisDoctrator Symfony Live 2011 Paris
Doctrator Symfony Live 2011 Paris
 
Solving the "Brooklyn Problem"
Solving the "Brooklyn Problem" Solving the "Brooklyn Problem"
Solving the "Brooklyn Problem"
 
When?, Why? and What? of MongoDB
When?, Why? and What? of MongoDBWhen?, Why? and What? of MongoDB
When?, Why? and What? of MongoDB
 
Ruby on Rails 101
Ruby on Rails 101Ruby on Rails 101
Ruby on Rails 101
 
Online journalism: thinking about platforms
Online journalism: thinking about platformsOnline journalism: thinking about platforms
Online journalism: thinking about platforms
 
Ronnieovergoor weekvandeondernemer - part1
Ronnieovergoor   weekvandeondernemer - part1Ronnieovergoor   weekvandeondernemer - part1
Ronnieovergoor weekvandeondernemer - part1
 
international PHP2011_ilia alshanetsky_Hidden Features of PHP
international PHP2011_ilia alshanetsky_Hidden Features of PHPinternational PHP2011_ilia alshanetsky_Hidden Features of PHP
international PHP2011_ilia alshanetsky_Hidden Features of PHP
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Fernando Blat discusses Sequel ORM features and usage