DB = ServerSide::Database.new('sqlite:///~/tmp/myblog.db') DB.create_table :posts do column :title, :text, :null => false column :category, :text column :body, :text index :title index :category end posts = DB[:posts] posts.count #=> 0 posts.all #=> [] posts.first #=> nil posts.insert(:title => 'My first post', :category => 'ruby', :body => 'Hello world!') posts.insert(:title => 'Second post', :stamp => 'personal', :body => 'Hi there.') posts.insert(:title => 'My third post', :category => 'ruby', :body => 'rubyrox') posts.count #=> 3 posts.filter(:category => 'ruby').count #=> 2 posts.order(:title.DESC).all