Please sign in to comment.
Make PostgreSQL do bitwise xor instead of exponentiation for ^ operator
One of Sequel's jobs is to provide an interface that maps ruby syntax to get the same semantics regardless of database (as much as possible). Ruby's ^ operator does bitwise xor, but PostgreSQL's ^ operator does exponentiation. This commit makes Sequel use the PostgreSQL bitwise xor operator (#) on PostgreSQL, so that you will get similar results as on other databases. This breaks backwards compatibility for people currently using the ^ operator on PostgreSQL. In the meantime, you can probably switch to using the power function.
- Loading branch information...
Showing with 13 additions and 0 deletions.