[storm] Writing sqlite database to disk
Kenny Meyer
knny.myer at gmail.com
Sun Apr 4 15:13:56 BST 2010
Dear Storm users,
I want to write my sqlite database on the disk. How do I do that with Storm?
Can Storm do that, or expects it an already existing database on disk to which
to connect?
I have been taking the tutorial and I'm conscious about that everything gets
stored in memory only, but I need to store the data permanently.
Also the Storm documentation doesn't give me a lot of information.
My code:
def create_databases():
database = create_database("sqlite:")
store = Store(database)
# Create table for Note
store.execute("CREATE TABLE note"
"(id INTEGER PRIMARY KEY,\
create_date DATETIME,\
mod_date DATETIME,\
content VARCHAR)",
noresult=True)
# Create table for Tag
store.execute("CREATE TABLE tag"
"(id INTEGER PRIMARY KEY,\
name VARCHAR)",
noresult=True)
Answers and feedback are welcome.
--
Kenny Meyer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/storm/attachments/20100404/d5d86d91/attachment.pgp
More information about the storm
mailing list