Skip to content

Commit

Permalink
Documentation update, incorrect imports, version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
wehriam committed Dec 21, 2010
1 parent 21dfb17 commit efe965e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Cassorm offers three main data types. The first is a model based on [Pycassa's C
f = cassorm.IntString()
g = cassorm.String()

To create the schema, use the "sync" command.
To create the schema, use the "sync" command. This only needs to be done
once per column family.

TestModel.sync()

Expand All @@ -59,8 +60,14 @@ Basic Usage, Lists

class TestList(CassandraList): # Column Family will be 'testlist'
pass

To create the schema, use the "sync" command. This only needs to be done
once per column family.

TestList.sync()

Instantiate the list to use it:

sample = TestList("SampleKey")
sample.append("a")
sample.append("b")
Expand All @@ -73,8 +80,14 @@ Basic Usage, Dictionaries

class TestDict(CassandraDict): # Column Family will be 'testdict'
pass

To create the schema, use the "sync" command. This only needs to be done
once per column family.

TestDict.sync(destructive=True)
TestDict.sync()

Instantiate the dictionary to use it:

sample = TestDict("SampleKey")
sample['a'] = 'Alice'
sample['b'] = 'Bob'
Expand Down

0 comments on commit efe965e

Please sign in to comment.