Mysql adapter for active_record.cr. Uses crystal-mysql library
- Implement with some default connection config
- Fix segfaults from upstrem lib (
crystal-mysql
) - Figure out a way to provide connection pool
Add it to Projectfile
deps do
github "waterlink/active_record.cr"
github "waterlink/crystal-mysql"
github "waterlink/mysql_adapter.cr"
end
require "active_record"
require "mysql_adapter"
class Person < ActiveRecord::Model
adapter mysql
# ...
end
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/
.
- Fork it ( https://github.com/waterlink/mysql_adapter.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- waterlink Oleksii Fedorov - creator, maintainer