Skip to content

Commit

Permalink
Create storage table if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
titanous authored and tessro committed Jun 20, 2012
1 parent 7298d25 commit 3007eea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/oculus/storage/sequel_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ class SequelStore
def initialize(uri, options = {})
@uri = uri
@table_name = options[:table] || :oculus
create_table
end

def db
Sequel.connect(@uri, :encoding => 'utf8')
end

def table
Sequel.connect(@uri).from(@table_name)
db.from(@table_name)
end

def all_queries
Expand Down

0 comments on commit 3007eea

Please sign in to comment.