henriette

henriette

Avram generates the Operation and the Query classes from macros ran in Model. This means that we don't have the ability to reference other models to handle certain association logic. It also creates magic code.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      henriette:
        github: matthewmcgarvey/henriette
    
  2. Run shards install

Usage (WIP)

require "henriette"

Models

class User < Henriette::Model
  primary_key id : Int64
  column created_at : Time
  column updated_at : Time
  column name : String
  has_many credentials : Array(Credential)
end

Queries

class UserQuery < Henriette::Query(User)
  connect_to User
end

Operations

class SaveUser < Henriette::Operation
  connect_to User
end

Development

TODO: Write development instructions here

Contributing

  1. Fork it (https://github.com/matthewmcgarvey/henriette/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

henriette

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 2
  • about 4 years ago
  • October 24, 2020
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 10:22:27 GMT

Languages