Skip to content

0.6.1

Compare
Choose a tag to compare
@imdrasil imdrasil released this 07 Sep 12:06
· 417 commits to master since this release
f30572a

Changelog

General

  • adds Time::Span to supported types

QueryBuilder

  • allows listing any SQLNode instance in SELECT clause (like raw sql or functions)
  • removes redundant SQLNode#sql_args_count
  • adds SQLNode#filterable? function which presents if node has filterable sql parameter
  • refactors Condition#sql_arg
  • adds Function base abstract class for defining custom sql functions
  • adds lower, upper, current_timestamp, current_date, current_time, now, concat, abs, ceil, floor, round
  • adds Join#filterable? and Query#filterable?
  • raise AmbiguousSQL when % symbol is found in the raw SQL (except %s)

Model

  • replaces mapping option numeric_converter with new converter
  • adds NumericToFloat64Converter and JSONConverter
  • now #to_h and #to_str_h use field getter methods
  • remove puts from JSONConverter#from_db

Adapter

  • propagate native DB::Error instead of wrapping it into BadQuery
  • manually release a connection when an exception occurs under the transaction

Config

  • set default max_pool_size to 1 and warn about danger of setting different max_pool_size, max_idle_pool_size and initial_pool_size

Migration

  • adds Migration::TableBuilder::CreateForeignKey & Migration::TableBuilder::DropForeignKey
  • adds Migration::Base#add_foreign_key & Migration::Base#drop_foreign_key
  • adds Migration::TableBuilder::ChangeTable#add_foreign_key & Migration::TableBuilder::ChangeTable#drop_foreign_key

Exceptions

  • add AmbiguousSQL - is raised when forbidden % symbol is used in the raw SQL