RubyFlow : Ruby Community Link Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

Bitfields Rails Plugin/Gem, simple bitfields with scopes, sql, setter-sql, change-recording

The new 'bitfields' Rails plugin and gem allows simple bitfield managements for ActiveRecord and others, produces fast(indexable) sql for query and bit-setting.

Comments

You doing it all wrong. Idea of storing bitfields in single database field leads to very big problems in future grow of your database. Sergey Moiseev - March 11, 2010 13:12
Does anyone know if we are limited to 32 bitfields per database column? Restriction based on 32bit integer (1, 2, 4, 8, 16...) obviously on 32bit OS....

... or am I getting it wrong?mcnaz - March 11, 2010 14:54
Sergey, can you explain why this is wrong, and what the preferred way is?
Or at least direct us to a link?Todd - March 11, 2010 23:23
Bitfields are a good solution if a database already is huge, they save space and migrations(aka downtime) and can be renamed easily. With fast indexed IN() queries, query time should no longer be an issue.
grosser - April 25, 2010 15:56

Post a Comment

Note: If you are a registered user, you can log in to populate these fields.

You may use ONLY these HTML tags to format your comment:
<a href="" title=""> <b> <blockquote> <code> <em> <i> <strong>
Do NOT use <p> tags. Just use newlines :-)

t
E bum
o
j
s
o
G willy
n
G willy
b
A willy
l
R tits
a
n
k