Sha256: 6aca8d9876e0fe3baae75b7261fb05938a1c0e9f86523e2fa9e8cdc1eb81f7c5

Contents?: true

Size: 573 Bytes

Versions: 1

Compression:

Stored size: 573 Bytes

Contents

# Shoden

Shoden is a persistance library on top of Postgres.
It is basically an [Ohm](https://github.com/soveran/ohm) clone but using
Postgres as a main database.

## Installation

```bash
gem install shoden
```

## Models

```ruby
class Fruit < Shoden::Model
  attribute :type
end
```

```ruby
Fruit.create type: "Banana"
```

To find by an id:

```ruby
Fruit[1]
```

## Relations

```ruby
class User < Shoden::Model
  attribute :email

  collection :posts, :Post
end

class Post < Shoden::Model
  attribute :title
  attribute :content

  reference :owner, :User
end
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoden-0.1.0 README.md