Skip to content

Instantly share code, notes, and snippets.

@neovintage
Created December 7, 2011 21:43
Show Gist options
  • Save neovintage/1444812 to your computer and use it in GitHub Desktop.
Save neovintage/1444812 to your computer and use it in GitHub Desktop.
mysql options in datamapper
require 'dm-core'
require 'dm-mysql'
# Shows available options
class HasAllOption
include DataMapper::Resource
property :id, Serial
property :name, String
table_opts :engine => 'MyISAM',
:avg_row_length => 7,
:checksum => 1,
:comment => "Best Comment EVER!!",
:connection => 'another_connection',
:data_directory => '/dude/wheres/my/dictionary',
:delay_key_write => 0,
:index_directory => '/index/this',
:insert_method => 'FIRST',
:key_block_size => 256,
:max_rows => 5,
:min_rows => 0,
:pack_keys => 0,
:password => 'secret',
:row_format => 'COMPRESSED',
:tablespace => 'DUDE',
:union => 'has_its, not_includeds'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment