Skip to content

Instantly share code, notes, and snippets.

@tjsousa
Last active December 30, 2015 12:48
Show Gist options
  • Save tjsousa/14150b7e798e1e08d316 to your computer and use it in GitHub Desktop.
Save tjsousa/14150b7e798e1e08d316 to your computer and use it in GitHub Desktop.
module This
class Bug
include Diametric::Entity
include Diametric::Persistence::Peer
attribute :id, String, index: true
attribute :name, String
end
end
Diametric::Persistence.establish_base_connection(uri: 'datomic:mem://sample')
This::Bug.create_schema.get
bug = This::Bug.new(id: '123')
bug.save
p This::Bug.all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment