mysql_adapter.cr

Mysql adapter for [active_record.cr](https://github.com/waterlink/active_record.cr). Uses [crystal-mysql library](https://github.com/waterlink/crystal-mysql)

mysql_adapter.cr Build Status

Mysql adapter for active_record.cr. Uses crystal-mysql library

TODO

  • Implement with some default connection config
  • Fix segfaults from upstrem lib (crystal-mysql)
  • Figure out a way to provide connection pool

Installation

Add it to your shard.yml

dependencies:
  mysql_adapter:
    github: waterlink/mysql_adapter.cr
    version: 0.2.1

Usage

require "active_record"
require "mysql_adapter"

class Person < ActiveRecord::Model
  adapter mysql
  # ...
end

Development

After cloning run crystal deps or crystal deps update.

Just use normal TDD cycle. To run tests use:

./bin/test

This will run unit test in spec/ and integration spec in integration/.

Contributing

  1. Fork it ( https://github.com/waterlink/mysql_adapter.cr/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

  • waterlink Oleksii Fedorov - creator, maintainer
Repository

mysql_adapter.cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 2
  • over 6 years ago
  • August 8, 2018
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 07:33:17 GMT

Languages