Icebox

Icebox is a Ruby gem and command-line utility for interacting with Infobright Community Edition (ICE), an open-source, column-oriented database based on MySQL. It is still in the very earliest stages of development, and shouldn’t be used by anyone for anything.

I follow semantic versioning. In 0.x.y, there is no stable API and anything may change at any time. Curious tinkerers who don’t mind that should still at least wait until 0.1.0, which I use to signify that others could conceivably find the project useful.

Usage

From the command line

icebox create_table_as <database> <table> <select_query>
icebox insert_into <database> <table> <select_query>
icebox load_data_infile <database> <table> <csv_file>
icebox [-h|-?|--help]

From Ruby

require 'icebox'

# Icebox can wrap around an existing Sequel database handle:
db = Sequel.mysql(database: 'test', socket: '/tmp/mysql-ib.sock')
box = Icebox.new(db)

# Alternatively, you can supply Sequel#mysql options to Icebox#new:
box = Icebox.new(database: 'test', socket: '/tmp/mysql-ib.sock')

# Either way, you can access the internal Sequel object using #db:
box.db["SELECT alpha, beta, gamma FROM my_table"].all

# From the Icebox wrapper, you can call handy functions:
box.create_table_as  "output_table", "SELECT * FROM input_table"
box.insert_into      "output_table", "SELECT * FROM input_table"
box.load_data_infile "output_table", "/tmp/my_example_data.csv"

Contributing to Icebox

  • Wait until 0.1.0

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2011 Riley Goodside. Distributed under MIT license. See LICENSE.txt for further details.