Permalink
Browse files

kill much unnecessary whitespace

  • Loading branch information...
1 parent 58cffb0 commit 4cb40002b080f23ccc75617b1724885b714bdda1 @jmhodges jmhodges committed Aug 18, 2010
Showing with 17 additions and 17 deletions.
  1. +17 −17 lib/cassandra/0.7/cassandra.rb
@@ -7,39 +7,39 @@ def keyspace=(ks)
client.set_keyspace(ks) if check_keyspace(ks)
@schema = nil; @keyspace = ks
end
-
+
def keyspaces
client.describe_keyspaces.to_a
end
-
+
def schema(load=true)
if !load && !@schema
[]
else
@schema ||= client.describe_keyspace(@keyspace)
end
end
-
+
def schema_agreement?
client.check_schema_agreement().length == 1
end
-
+
def version
client.describe_version()
end
-
+
def cluster_name
@cluster_name ||= client.describe_cluster_name()
end
-
+
def ring
client.describe_ring(@keyspace)
end
def partitioner
client.describe_partitioner()
end
-
+
## Delete
# Remove all rows in the column family you request.
@@ -66,17 +66,17 @@ def add_column_family(cf_def)
@schema = nil
res
end
-
+
def drop_column_family(cf_name)
begin
res = client.system_drop_column_family(cf_name)
rescue CassandraThrift::TimedOutException => te
puts "Timed out: #{te.inspect}"
end
@schema = nil
- res
+ res
end
-
+
def rename_column_family(old_name, new_name)
begin
res = client.system_rename_column_family(old_name, new_name)
@@ -86,7 +86,7 @@ def rename_column_family(old_name, new_name)
@schema = nil
res
end
-
+
def add_keyspace(ks_def)
begin
res = client.system_add_keyspace(ks_def)
@@ -95,10 +95,10 @@ def add_keyspace(ks_def)
rescue Thrift::TransportException => te
puts "Timed out: #{te.inspect}"
end
- @keyspaces = nil
+ @keyspaces = nil
res
end
-
+
def drop_keyspace(ks_name)
begin
res = client.system_drop_keyspace(ks_name)
@@ -108,10 +108,10 @@ def drop_keyspace(ks_name)
puts "Timed out: #{te.inspect}"
end
keyspace = "system" if ks_name.eql?(@keyspace)
- @keyspaces = nil
+ @keyspaces = nil
res
end
-
+
def rename_keyspace(old_name, new_name)
begin
res = client.system_rename_keyspace(old_name, new_name)
@@ -121,10 +121,10 @@ def rename_keyspace(old_name, new_name)
puts "Timed out: #{te.inspect}"
end
keyspace = new_name if old_name.eql?(@keyspace)
- @keyspaces = nil
+ @keyspaces = nil
res
end
-
+
protected
def client

0 comments on commit 4cb4000

Please sign in to comment.