Created
February 23, 2009 20:12
-
-
Save cstar/69155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%erl -boot release_local/erlsdb-initial -erlsdb access '"<AWS_ACCESS_ID>"' secret '"<AWS_SECRET_KEY>"' ssl false | |
1> erlsdb:create_domain("fubar"). | |
ok | |
2> erlsdb:list_domains(). | |
{ok,["fubar"],[]} | |
3> erlsdb:put_attributes("fubar", "test", [{"foo", "bar"}]). | |
nil | |
4> erlsdb:get_attributes("fubar", "test"). | |
{ok,[{"foo","bar"}]} | |
.. | |
5> erlsdb:select("select count(*) from domain where toto = 'truc'",nil). | |
{ok,[{"Domain",[{"Count","2"}]}],nil} | |
6> erlsdb:domain_metadata("domain"). | |
{ok,[{"Timestamp",1235403601}, | |
{"ItemCount",4}, | |
{"AttributeValueCount",8}, | |
{"AttributeNameCount",4}, | |
{"ItemNamesSizeBytes",24}, | |
{"AttributeValuesSizeBytes",20}, | |
{"AttributeNamesSizeBytes",19}]} | |
6> erlsdb:list_domains(nil,1). % paging works | |
{ok,["domain"],"ZnViYXI="} | |
7> erlsdb:list_domains("ZnViYXI=",1). | |
{ok,["fubar"],nil} | |
8> erlsdb:select("select count(*) from domain where toto = 'truc'",nil). | |
{ok,[{"Domain",[{"Count","2"}]}],nil} | |
9> erlsdb:select("select * from blobs where toto = 'truc'",nil). | |
{ok,[{"blob1",[{"toto","truc"},{"foo","bar"}]}, | |
{"blob2",[{"toto","truc"},{"foo","bar"}]}], | |
nil} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment