granite
Version, currently 0.23.478 versions
- 0.23.4latestDec 13, 2024
- 0.23.3not indexedAug 5, 2026
- 0.23.2not indexedAug 5, 2026
- 0.23.1not indexedAug 5, 2026
- 0.23.0not indexedAug 5, 2026
- 0.22.1not indexedAug 5, 2026
- 0.22.0not indexedAug 5, 2026
- 0.21.1not indexedAug 5, 2026
- 0.21.0not indexedAug 5, 2026
- 0.20.0not indexedAug 5, 2026
- 0.19.0not indexedAug 5, 2026
- 0.18.0not indexedAug 5, 2026
- 0.17.2not indexedAug 5, 2026
- 0.17.1not indexedAug 5, 2026
- 0.17.0not indexedAug 5, 2026
- 0.16.0not indexedAug 5, 2026
- 0.15.2not indexedAug 5, 2026
- 0.15.1not indexedAug 5, 2026
- 0.15.0not indexedAug 5, 2026
- 0.14.2not indexedAug 5, 2026
- 0.14.1not indexedAug 5, 2026
- 0.14.0not indexedAug 5, 2026
- 0.13.1not indexedAug 5, 2026
- 0.13.0not indexedAug 5, 2026
- 0.12.1not indexedAug 5, 2026
- 0.12.0not indexedAug 5, 2026
- 0.11.0not indexedAug 5, 2026
- 0.10.0not indexedAug 5, 2026
- 0.9.1not indexedAug 5, 2026
- 0.9.0not indexedAug 5, 2026
- 0.8.4not indexedAug 5, 2026
- 0.8.3not indexedAug 5, 2026
- 0.8.2not indexedAug 5, 2026
- 0.8.1not indexedAug 5, 2026
- 0.8.0not indexedAug 5, 2026
- 0.7.8not indexedAug 5, 2026
- 0.7.7not indexedAug 5, 2026
- 0.7.6not indexedAug 5, 2026
- 0.7.5not indexedAug 5, 2026
- 0.7.4not indexedAug 5, 2026
- 0.7.3not indexedAug 5, 2026
- 0.7.2not indexedAug 5, 2026
- 0.7.1not indexedAug 5, 2026
- 0.7.0not indexedAug 5, 2026
- 0.6.4not indexedAug 5, 2026
- 0.6.3not indexedAug 5, 2026
- 0.6.2not indexedAug 5, 2026
- 0.6.1not indexedAug 5, 2026
- 0.6.0not indexedAug 5, 2026
- 0.5.11not indexedAug 5, 2026
- 0.5.10not indexedAug 5, 2026
- 0.5.9not indexedAug 5, 2026
- 0.5.8not indexedAug 5, 2026
- 0.5.7not indexedAug 5, 2026
- 0.5.6not indexedAug 5, 2026
- 0.5.5not indexedAug 5, 2026
- 0.5.4not indexedAug 5, 2026
- 0.5.3not indexedAug 5, 2026
- 0.5.2not indexedAug 5, 2026
- 0.5.1not indexedAug 5, 2026
- 0.5.0not indexedAug 5, 2026
- 0.4.5not indexedAug 5, 2026
- 0.4.4not indexedAug 5, 2026
- 0.4.3not indexedAug 5, 2026
- 0.4.2not indexedAug 5, 2026
- 0.4.1not indexedAug 5, 2026
- 0.4.0not indexedAug 5, 2026
- 0.3.1not indexedAug 5, 2026
- 0.3.0not indexedAug 5, 2026
- 0.2.7not indexedAug 5, 2026
- 0.2.6not indexedAug 5, 2026
- 0.2.5not indexedAug 5, 2026
- 0.2.4not indexedAug 5, 2026
- 0.2.3not indexedAug 5, 2026
- 0.2.2not indexedAug 5, 2026
- 0.2.1not indexedAug 5, 2026
- 0.2.0not indexedAug 5, 2026
- 0.1.0not indexedAug 5, 2026
github.com/amberframework/granite
ORM Model with Adapters for mysql, pg, sqlite in the Crystal Language.
Installation
# Add this to your shard.yml
dependencies:
granite:
github: amberframework/granite
version: ~> 0.23.4Then run:
shards installshard.yml
- Crystal
>= 1.6.0, < 2.0.0- License
- MIT
- Authors
- drujensen, elorest
Dependencies
Runtime Dependencies
- db~> 0.13.1github: crystal-lang/crystal-db
Development Dependencies
README
Granite
Amber is a web framework written in the Crystal language.
This project is to provide an ORM in Crystal.
Looking for maintainers
Granite is looking for volunteers to take over maintainership of the repository, reviewing and merging pull requests, stewarding updates to follow along with Crystal language updates, etc. More information here
Documentation
Contributing
- Fork it ( https://github.com/amberframework/granite/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
Running tests
Granite uses Crystal's built in test framework. The tests can be run either within a dockerized testing environment or locally.
The test suite depends on access to a PostgreSQL, MySQL, and SQLite database to ensure the adapters work as intended.
Docker setup
There is a self-contained testing environment provided via the docker-compose.yml file in this repository.
We are testing against multiple databases so you have to specify which docker-compose file you would like to use.
- You can find postgres versions at https://hub.docker.com/_/postgres/
- You can find mysql versions at https://hub.docker.com/_/mysql/
After you have docker installed do the following to run tests:
Environment variable setup
Option 1
Export .env with $ source ./export.sh or $ source .env.
Option 2
Modify the .env file that docker-compose loads by default. The .env file can either be copied to the same directory as the docker-compose.{database_type}.yml files or passed as an option to the docker-compose commands --env-file ./foo/.env.
First run
Replace "{database_type}" with "mysql" or "pg" or "sqlite".
$ docker-compose -f docker/docker-compose.{database_type}.yml build spec
$ docker-compose -f docker/docker-compose.{database_type}.yml run spec
Subsequent runs
$ docker-compose -f docker/docker-compose.{database_type}.yml run spec
Cleanup
If you're done testing and you'd like to shut down and clean up the docker dependences run the following:
$ docker-compose -f docker/docker-compose.{database_type}.yml down
Run all
To run the specs for each database adapter use ./spec/run_all_specs.sh. This will build and run each adapter, then cleanup after itself.
Local setup
If you'd like to test without docker you can do so by following the instructions below:
- Install dependencies with
$ shards install - Update .env to use appropriate ENV variables, or create appropriate databases.
- Setup databases:
PostgreSQL
CREATE USER granite WITH PASSWORD 'password';
CREATE DATABASE granite_db;
GRANT ALL PRIVILEGES ON DATABASE granite_db TO granite;
MySQL
CREATE USER 'granite'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE granite_db;
GRANT ALL PRIVILEGES ON granite_db.* TO 'granite'@'localhost' WITH GRANT OPTION;
- Export
.envwith$ source ./export.shor$ source .env. $ crystal spec
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.23.4- Tagged
- Dec 13, 2024
- Commit
f4711b63bacf- Crystal
>= 1.6.0, < 2.0.0- Indexed
- yes
Dependents
- stringventory
- ratmachine
- crystal-amber-url-shortener
- combine
- berri
- disk_catalog_pg
- orm_test
- turquoise
- microlite
- cryngine
- microlite
- special-sauce-bot
and 57 more
Repository
github.com/amberframework/granite
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 23, 2026
- Synced
- Sep 23, 2026
- Versions
- 78