diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-08-06 13:27:13 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-08-06 13:27:13 +0200 |
commit | 8e74fbbe98b4ef13c3d7a52352ab0e5ec99b7675 (patch) | |
tree | e7331bdbe3ae9936b7acc09eec6e3a3efeb5ee0b /application.rb | |
parent | fffc9e0b2657e29eeb7ee73f5ff51dafa0b6acfb (diff) |
prediction caching
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/application.rb b/application.rb index 1c94f24..4bf6e94 100644 --- a/application.rb +++ b/application.rb @@ -11,6 +11,15 @@ class Model property :created_at, DateTime end +class Prediction + # cache predictions + include DataMapper::Resource + property :id, Serial + property :compound_uri, String, :length => 255 + property :model_uri, String, :length => 255 + property :yaml, Text, :length => 2**32-1 +end + DataMapper.auto_upgrade! require 'lazar.rb' @@ -51,3 +60,9 @@ delete '/?' do response['Content-Type'] = 'text/plain' "All Models deleted." end + +delete '/prediction?' do + Prediction.auto_migrate! + response['Content-Type'] = 'text/plain' + "All datasets deleted." +end |