Releases: amberframework/granite
Better compatibility with Crystal 0.25
- Updates mysql and sqlite dependent shards
- Better support for timestamps in sqlite (thanks @bcardiff)
- Simplifies field casting, timestamp handling, and removes sqlite hacks no longer necessary.
- Implements #read_attribute to read an attribute by string or symbol name
If upgrading from Granite < 0.12.0, please also see release notes for 12.0
v0.12.0
Several Breaking Changes:
- timestamps stored in a sqlite database will not have the timezone and will throw an exception on read.
find_by
syntax has changed fromPost.find_by :slug, "example_slug"
toPost.find_by slug: "example_slug"
. This allows support for multiple parameters tofind_by
The list of changes and contributors:
64b3e31 Update to crystal 0.25.0 (#228) - @robacarp and @faustinoaq
ba90030 Added uniqueness validator for models (#227) - @Thellior
7661430 bugfix: querybuilder logger (#224) - @robacarp
e5f9b4c Adds model.from_json(JSON::Any) (#221) - @Blacksmoke16
757140b added query macro, tests, and docs (#215) - @noahlh
455d7ca Fix last insert ID race condition (#220) - @charlie-hadden
afdc4d0 Allow find_by
to accept multiple arguments (#211) - @Blacksmoke16
b23155a Validation Helpers (#219) - @Blacksmoke16
8a0cdd0 Update amber repository link (#205) - @faustinoaq
Thanks everyone! 💯
v0.11.0
v0.10.0
Lots of new stuff in 0.10.0:
- Bulk Import was provided by @Blacksmoke16
- UUID spec and usage was provided by @Blacksmoke16
- New migrator was provided by @maiha
- The beginning of a query syntax was provided by @robacarp
- Lazy loading Collection was provided by @Adam-Stomski
- Several refactoring work was provided by @c910335
- Cleanup work was provided by @faustinoaq
BREAKING CHANGE:
- the
all()
method now returns aCollection
object instead of an array.
Detailed commits:
- 2b85634 Fix Bulk Imports (#199)
- 5aa24f7 refactor transactions (#187)
- 6870dcf Migrator provided by Maiha (#201)
- 62af089 Update README for manually running callbacks (#196)
- 71afec3 Bulk import batch size (#191)
- 734ddc4 Manually trigger callbacks (#195)
- 4c8e990 UUID Spec + Usage (#194)
- f25c453 support belongs_to custom method name (#186)
- a019a20 Use most recent version in granite docker image (#192)
- ea226b4 Minimally useful query syntax (#132)
- 644491e Bulk import (#168)
- eca1c15 Some enhancements about callbacks (#183)
- e700242 Change .all and has_many to return *Collection object (#176)
- 7581ecd Spec for from_sql, and a big mock for the DB class (#133)
- 40f4a09 Add field! for property! (#181)
- 3cae412 Revert code samples until ORM word is removed (#175)
- dc37f7f Update links and code samples (#173)
v0.9.1
v0.9.0
13ccfc0 add belongs_to custom type support (#142) @drujensen
6d160a2 parse timestamp strings for sqlite db adapter (#135) @damianham
48b7da4 primary auto: false
works as a natural key (#166) @maiha
332b9af Fix .create class method (#167) @Adam-Stomski
43fc6fc spec: don't clear database automatically (#165) @maiha
5a4b1f9 add record statuses about persistence: new_record?
, destroyed?
, persisted?
(#153) @maiha
f797799 add spec for callbacks (#154) @maiha
719d2e5 find
,find_by
,first
now ensures T
, call with trailing ?
for T?
(#146) @maiha
fab317b simplify specs by reducing macros (#147) @maiha
c9cfc3d Fields are now required in default. Use foo?
for nilable fields. (#144) @maiha
b93f7b6 allow reserved words as table and column names (#139) @maiha
f8ddc27 Fix documentation for creation of Indexes (#138) @gabrielengel
40b13eb Add #count (#137) @maiha