Permalink
Commits on Oct 19, 2018
Commits on Oct 16, 2018
  1. Add Float64::Lucky.parse(value : PG::Numeric) overload (#297)

    perezperret authored and paulcsmith committed Oct 16, 2018
    This is to allow for Float64? (optional) model fields
Commits on Oct 12, 2018
  1. Add ability to set default values for virtual fields (#292)

    HarrisonB authored and paulcsmith committed Oct 12, 2018
    * Add ability to set default values for virtual fields
    
    * Replace explicit `if` branching macro with simpler `||`
    
    * Fix falsey default values for virtual fields being overridden
Commits on Oct 10, 2018
  1. Add `Queryable#distinct_on` (#291)

    HarrisonB authored and paulcsmith committed Oct 10, 2018
    * Add `Queryable#distinct_on`
    
    * Remove unnecessary call to `Queryable#distinct`
    
    `@distinct` is set via `QueryBuilder#distinct_on`, so this is not needed
    
    * Centralize checking for `distinct` option
    
    * Change test for #distinct_on to check query results
    
    * Add type restriction to `#distinct_on`
    
    Now it should raise an error at compile time if you happen to pass in
    something that's nillable.
Commits on Aug 29, 2018
  1. Run create in Travis

    paulcsmith committed Aug 29, 2018
  2. Upgrade habitat to 0.4.0

    paulcsmith committed Aug 28, 2018
Commits on Aug 24, 2018
  1. Move LuckyMigrator into LuckyRecord (#281)

    paulcsmith committed Aug 24, 2018
    Closes #233
Commits on Aug 23, 2018
  1. Improve association joins in queries. (#277)

    oneiros authored and paulcsmith committed Aug 23, 2018
    * Add support for `has_many ..., through: ...`
    * Fix generated SQL for `belongs_to`
    * Add specs for and fix `left_join_*` methods
Commits on Aug 21, 2018
  1. Check schema by calling a class method. (#280)

    hanneskaeufler authored and paulcsmith committed Aug 21, 2018
    This removes the need to instantiate a model instance, as there is no
    technical requirement to do so.
Commits on Jul 27, 2018
  1. Fix time parsing

    edwardloveall committed Jul 27, 2018
    Crystal recently updated how it parses dates, but they also added a 
    nice 
    convenience method that we can use to parse strings since we expect 
    them 
    to be UTC.
Commits on Jul 24, 2018
  1. Remove Fillable module (#271)

    paulcsmith committed Jul 24, 2018
    It is not necessary
Commits on Jul 15, 2018
  1. FillableField is child of Field. Add Fillable module (#268)

    paulcsmith committed Jul 15, 2018
    This will make it easier to restrict these types
    
    Closes #223
Commits on Jul 14, 2018
  1. has_many through with uuids (#259)

    hanneskaeufler authored and paulcsmith committed Jul 14, 2018
    * Cover has_many with through and uuids
    
    * Resolve pk type class
    
    * Hardcode type conditional to get compiling for refactoring
    
    * Extract private macro for base query
    
    * Extract private macro for association getter
    
    * Extract private macro for preloading setter
    
    * Extract private macro for preloading getters
    
    * Move more getter methods into private macro
    
    * Extract has_one base query private macro
    
    * Pseudo-namespace some macros
    
    * More pseudo namespaceing
    
    * Extract has_many base query private macro
    
    * Fix formatting
    
    * Remove duplication for public preloaded getters
    
    * Remove preloaded setter duplication
    
    * Extract private macro for has one private assoc getter
    
    * Extract has_many stuff, name pending
    
    * Move KeyHolder model into support file
    
    * Handle has_many associations in finished macro lifecyle
    
    * Rename method
    
    * Clean up migration
    
    * Avoid having to call association and has_many_association
    
    * Replace custom sql by migrator code
    
    * Avoid duplicate storage of associations
    
    * Fix formatting
  2. Ignore self when validating uniqueness. (#263)

    oneiros authored and paulcsmith committed Jul 14, 2018
    * Ignore self when validating uniqueness.
    
    validates_uniqueness_of can be useful on update, in case
    the unique field's value is being updated. But if the value
    stays the same, the validation reported an error.
    
    This is now fixed, as the current record is being ignored
    when searching for conflicting records in the database.
    
    * Simplify try block.
    
    As discussed in #263
    
    * Simplify query.
    
    As discussed in #263
Commits on Jul 2, 2018
  1. Infers the table name, closes #231 (#257)

    hanneskaeufler authored and paulcsmith committed Jul 2, 2018
    * Infers the table name, closes #231
    
    * Remove useless parens
    
    * Convert inferred table name to pluralized underscored
    
    * More sophisticated table name guessing with inflector
    
    * Revert to one version of #setup for arbitrary combination of args
    
    * s/gitbug/github
    
    * Avoid trailing 'unless' for clarity
  2. UUID support as primary key (#254)

    hanneskaeufler authored and paulcsmith committed Jul 2, 2018
    * Pass primary_key_type into the table macro
    
    * Add slightly working uuid ids for records
    
    Using of actual crystal uuids is still in the works.
    
    * Truncate tables after before each spec, not after
    
    So that the content is expectable
    
    * Try to use crystal UUIDs as column types
    
    * Working uuid sample
    
    * Improve test coverage and handle failed casts
    
    * Add comment in migration to remind for lucky_migrator change
    
    * Dont always generate a new uuid
    
    * Fix formatting
    
    * Allow manually setting a uuid id value
    
    * Clean up imports
    
    * More fitting spec title
    
    * Add spec for form#create with uuids
    
    * Make associations work with uuids
    
    * Format fixes
    
    * Simplify owner id by introducing constant
    
    * Add spec for uuid belongs_to
    
    * Preload uuid backed belongs_to associations
    
    * Working uuid based has_many assocs
    
    * Add spec for preloading has_many
    
    * Use lucky_migrator in master branch for now
    
    * Introduce type for primary key type
    
    * Remove comments, see luckyframework/lucky_migrator#113 instead
  3. Add specs for overriding created_at and updated_at

    hfjallemark authored and paulcsmith committed Jul 2, 2018
  4. Set updated_at during update

    hfjallemark authored and paulcsmith committed Jun 17, 2018
Commits on Jun 22, 2018
  1. Add Queryable#none

    paulcsmith committed Jun 22, 2018
    Closes #219
  2. Add new select aggregate methods

    paulcsmith committed Jun 22, 2018
    Closes #96
  3. Delegate fields in forms

    paulcsmith committed Jun 22, 2018
    Closes #239
    
    Much better error messages now
  4. Add Form#has_one

    paulcsmith committed Jun 22, 2018
    Related to #52
Commits on Jun 18, 2018
  1. gitignore now ignores "docs" instead of "doc"

    edwardloveall authored and paulcsmith committed Jun 18, 2018
    Crystal changed the default doc folder to "docs"
    crystal-lang/crystal#4918
Commits on Jun 15, 2018
  1. Update migrator syntax

    paulcsmith committed Jun 15, 2018
  2. Update formatting

    paulcsmith committed Jun 15, 2018
  3. Fix Circle

    paulcsmith committed Jun 15, 2018
  4. Bump version to v0.6.0

    paulcsmith committed Jun 15, 2018
Commits on Jun 8, 2018
Commits on Jun 7, 2018