Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Plugins and Extensions for Sequel

tree: de66be8fb4

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION


This library starts the collection of plugins and possibly extension I assemble for the Ruby Sequel ORM.

Currently, it contains:

  • plugin for Trees to mimic the Rails acts_as_tree plugin.
  • extension for Exporting data using Dataset#export.

NOTE: Authors of other plugins and extensions for Sequel are welcome to contact me for inclusion of your plugin and extension to this project.

Released under MIT license.

For the Impatient


This gem is released to gemcutter. Rubyforge is not utilized.

gem install sequel_plus

Use Tree Plugin

require 'sequel'

class Node < Sequel::Model
    plugin :tree

Use Exporter

require 'sequel' require 'sequel_plus'

DB = Sequel.sqlite

# Every row, every column, tab delimited, unquoted..."nodes.txt", "w"){|file| DB[:nodes].export(file)}

# Every row, every column, comma delimited double-quotes"nodes.txt", "w"){|file| DB[:nodes].export(file, :delimiter => ',', :quote_char => '"')}

# Specific rows and columns"nodes.txt", "w"){|file| DB[:nodes].filter(:id < 5).select(:id, :name).export(file)}

Note on Patches/Pull Requests

  • This release adds an export facility to the Sequel::Dataset


Copyright 2009 Michael Lang. All rights reserved. Released under MIT license. See LICENSE for details.

Something went wrong with that request. Please try again.