New 'real' example

0 views
Skip to first unread message

Yurii Rashkovskii

unread,
Feb 15, 2008, 6:24:14 AM2/15/08
to stro...@googlegroups.com
Hello everybody,

Just decided to add more examples to StrokeDB and crafted one. Here
you are examples/todo.rb — an application to maintain simple todo
list.

Here is an example of its use.

$ ./examples/todo.rb Visit Prague
$ ./examples/todo.rb [StrokeDB] Add todo example
$ ./examples/todo.rb
StrokeDB:
[ ] Add todo example
Main:
[ ] Visit Prague
$ ./examples/todo.rb -d [StrokeDB] Add todo example
$ ./examples/todo.rb
StrokeDB:
[X] Add todo example
Main:
[ ] Visit Prague


P.S. Its implementation isn't really perfect — I just did it in a
matter of couple of minutes.

UserASD

unread,
Feb 16, 2008, 5:31:57 AM2/16/08
to StrokeDB
StrokeDB.default_store.chunk_storage.sync_chained_storages!

What does this line mean?

-- Eugene Zolotarev

On Feb 15, 2:24 pm, Yurii Rashkovskii <yra...@gmail.com> wrote:
> Hello everybody,
>
> Just decided to add more examples to StrokeDB and crafted one. Here
> you are examples/todo.rb -- an application to maintain simple todo
> list.
>
> Here is an example of its use.
>
> $ ./examples/todo.rb Visit Prague
> $ ./examples/todo.rb [StrokeDB] Add todo example
> $ ./examples/todo.rb
> StrokeDB:
> [ ] Add todo example
> Main:
> [ ] Visit Prague
> $ ./examples/todo.rb -d [StrokeDB] Add todo example
> $ ./examples/todo.rb
> StrokeDB:
> [X] Add todo example
> Main:
> [ ] Visit Prague
>
> P.S. Its implementation isn't really perfect -- I just did it in a

Yurii Rashkovskii

unread,
Feb 16, 2008, 6:54:59 AM2/16/08
to stro...@googlegroups.com

On Feb 16, 2008, at 12:31 PM, UserASD wrote:

>
> StrokeDB.default_store.chunk_storage.sync_chained_storages!
>
> What does this line mean?
>

This syncs memory storage to file storage (this example uses default
chaining: mem -> fs). So, effectively, it makes changes persistent.

That is what save! command in test/console does.

Yurii.

Reply all
Reply to author
Forward
0 new messages