First page Back Continue Last page Overview Text

Notes:


For example, take even a simple thing like concatenating strings.

The SQL standard string concatenation operator is the double pipe, but Microsoft SQL Server uses the addition operator, and MySQL uses the CONCAT function.

The general approach to database independence using another library is to avoid SQL concatenation in the database, and select all columns needed and do the concatenation in ruby.

The problem with this approach is that it is going to be slower, and it is not always possible, since a filter may depend on the result of a string concatenation operation.

Sequel abstracts the SQL syntax issues, allowing you to write efficient database independent code.