<< Limit [while|until] expression | Home | ALTER Initial >>

BitOf(column,string)

A suggested extension to MySQL

BitOf(column,string)

Manipulating Column Type SETs cannot be readily (or efficiently) manipulated

Eg. Suppage the column Flags is defined as set(‘a’,’b’,’c’)

Update flags = flags_with_b_flipped.

This can be written using string manipulation – although it is messy - or can be written as

 Flags=flags^2     /* b=~b */

But this depends on ‘b’ being the second item in the set declaration.

Flags=flags^bitOf(flags,’b’)

BitOf(column,string) means the bit-mask that represents string in the column definition. (not the current value of).





Add a comment Send a TrackBack