Skip to content

Release 0.9.0

Compare
Choose a tag to compare
@imdrasil imdrasil released this 24 May 16:49
· 185 commits to master since this release
db9d285

Changelog

General

  • add Crystal 0.34.0 support
  • add Jennifer::Presentable with abstract methods declarations (#attribute, #errors, #human_attribute_name, #attribute_metadata, #class_name)

QueryBuilder

  • Query#initialize now accept Adapter::Base as a second (optional) argument
  • OrderItem is renamed to OrderExpression to avoid possible name collisions

Model

  • fix an issue with rendering new_record and destroyed system variables by #to_json
  • Resource.table_prefix now returns underscored namespace name (if any) by default
  • Base includes Jennifer::Presentable
  • add Translation#class_name method to return underscored class name
  • add Mapping#attribute_metadata to return attribute metadata by it's name
  • remove Base::primary_field_type
  • Prevent compile time error with models named Model or Record

View

  • fix an issue with rendering new_record and destroyed system variables by #to_json
  • remove Base::primary_field_type

Adapter

  • db connection is established on the first request no on adapter initialization
  • Adapter.adapter_class raises BaseException if no valid Config.adapter is specified
  • .command_interface, .create_database, .drop_database, .generate_schema, .load_schema, .db_connection, .connection_string, .database_exists? now are instance methods
  • Base#initialize now excepts Config instance
  • respect host in Jennifer::Postgres::CommandInterface#database_exists?
  • escape connection URI segments
  • Config#logger now is Log instead of Logger
  • add read/write adapter segregation
  • deprecate .adapter & .adapter_class
  • remove .query, .exec & .scalar

Config

  • .reset_config invokes #initialize instead of creating new instance

Migration

  • Base#schema_processor is no more public api
  • Runner.create and Runner.drop now accept option Adapter::Base instance
  • pass to_table in TableBuilder::DropForeignKey#process
  • fix TableBuilder::CreateTable#reference - now it takes into account given SQL type for the foreign key column
  • add #add_reference, #drop_reference, #add_timestamps to TableBuilder::CHangeTable
  • TableBuilder::CHangeTable#drop_index also accepts single column name
  • remove deprecated TableBuilder::CreateTable#index overrides

Record

  • #initialize(DB::ResultSet) is removed