diff options
| author | nitromaster101@gmail.com <nitromaster101@gmail.com@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-07-22 18:45:54 +0000 |
|---|---|---|
| committer | nitromaster101@gmail.com <nitromaster101@gmail.com@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-07-22 18:45:54 +0000 |
| commit | bc7d69f0956d1a66ffc9d3f4b645f6419e847331 (patch) | |
| tree | a3b99784e9c3016b972e13bba07c90128fd6de32 /freebase/fcl/commands.py | |
| parent | 605b7096f3fbbe7cf000d7464e480d66fee3aa42 (diff) | |
cleanup, incorporate changes from code review, and move merge and split stuff into freebase.experimental
git-svn-id: http://freebase-python.googlecode.com/svn/trunk@201 5914aa95-5b3a-0410-a3b5-7b719e7fe9b2
Diffstat (limited to 'freebase/fcl/commands.py')
| -rwxr-xr-x | freebase/fcl/commands.py | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/freebase/fcl/commands.py b/freebase/fcl/commands.py index 4b517ec..4de2496 100755 --- a/freebase/fcl/commands.py +++ b/freebase/fcl/commands.py @@ -34,6 +34,7 @@ import simplejson import freebase.rison as rison from freebase.api import attrdict +from freebase.schema import connect_object, disconnect_object def cmd_help(fb, command=None): """get help on commands @@ -187,17 +188,8 @@ def cmd_ln(fb, src, dst): """ src = fb.absid(src) dst = fb.absid(dst) - dir,file = dirsplit(dst) - wq = { 'id': src, - 'key':{ - 'connect': 'insert', - 'namespace': dir, - 'value': file - } - } - - r = fb.mss.mqlwrite(wq) - + + return connect_object(fb.mss, src, dst) def cmd_rm(fb, path): """unlink a namespace key @@ -213,17 +205,8 @@ def cmd_rm(fb, path): disturb anything other than the one directory entry. """ path = fb.absid(path) - dir,file = dirsplit(path) - - wq = { 'id': path, - 'key':{ - 'connect': 'delete', - 'namespace': dir, - 'value': file - } - } - - r = fb.mss.mqlwrite(wq) + + return disconnect_object(fb.mss, path) def cmd_mv(fb, src, dst): """rename srcid to dstid. |
