<s> import py_memcachedb <EOL> py_memcachedb = py_memcachedb . DatastoreProxy ( ) <EOL> columns = [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] <EOL> data = [ "<STR_LIT:1>" , "<STR_LIT:2>" , "<STR_LIT:3>" ] <EOL> table_name = "<STR_LIT:hello>" <EOL> key = "<STR_LIT:1>" <EOL> print "<STR_LIT>" + key <EOL> print "<STR_LIT>" + str ( columns ) <EOL> print "<STR_LIT>" + str ( data ) <EOL> print "<STR_LIT>" + table_name <EOL> print py_memcachedb . put_entity ( table_name , key , columns , data ) <EOL> ret = py_memcachedb . get_entity ( table_name , key , columns ) <EOL> print "<STR_LIT>" <EOL> print ret <EOL> if ret [ <NUM_LIT:1> : ] != data : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" + str ( ret ) <EOL> print "<STR_LIT>" + str ( data ) <EOL> exit ( <NUM_LIT:1> ) <EOL> else : <EOL> print "<STR_LIT>" <EOL> ret = py_memcachedb . get_schema ( "<STR_LIT:hello>" ) <EOL> print ret <EOL> print "<STR_LIT>" <EOL> print ret <EOL> if ret [ <NUM_LIT:1> : ] != columns : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" + str ( ret ) <EOL> print "<STR_LIT>" + str ( columns ) <EOL> ret = py_memcachedb . delete_row ( table_name , key ) <EOL> print "<STR_LIT>" % key <EOL> print ret <EOL> ret = py_memcachedb . get_entity ( table_name , key , columns ) <EOL> print "<STR_LIT>" <EOL> print ret <EOL> print "<STR_LIT>" % key <EOL> print py_memcachedb . put_entity ( "<STR_LIT:hello>" , "<STR_LIT:1>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] , [ "<STR_LIT:1>" , "<STR_LIT:2>" , "<STR_LIT:3>" ] ) <EOL> print "<STR_LIT>" <EOL> print py_memcachedb . get_table ( "<STR_LIT:hello>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] ) <EOL> py_memcachedb . put_entity ( "<STR_LIT:hello>" , "<STR_LIT:2>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] , [ "<STR_LIT:4>" , "<STR_LIT:5>" , "<STR_LIT>" ] ) <EOL> print "<STR_LIT>" <EOL> print py_memcachedb . get_table ( "<STR_LIT:hello>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] ) <EOL> py_memcachedb . put_entity ( "<STR_LIT:hello>" , "<STR_LIT:3>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] , [ "<STR_LIT:1>" , "<STR_LIT:2>" , "<STR_LIT:3>" ] ) <EOL> py_memcachedb . get_table ( "<STR_LIT:hello>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] ) <EOL> print "<STR_LIT>" <EOL> py_memcachedb . put_entity ( "<STR_LIT:hello>" , "<STR_LIT:3>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] , [ "<STR_LIT:1>" , "<STR_LIT:2>" , "<STR_LIT:3>" ] ) <EOL> py_memcachedb . get_table ( "<STR_LIT:hello>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] ) <EOL> ret = py_memcachedb . delete_row ( "<STR_LIT:hello>" , "<STR_LIT:1>" ) <EOL> ret = py_memcachedb . delete_row ( "<STR_LIT:hello>" , "<STR_LIT:2>" ) <EOL> ret = py_memcachedb . delete_row ( "<STR_LIT:hello>" , "<STR_LIT:3>" ) <EOL> py_memcachedb . get_table ( "<STR_LIT:hello>" , [ "<STR_LIT:a>" , "<STR_LIT:b>" , "<STR_LIT:c>" ] ) <EOL> print "<STR_LIT>" <EOL> print py_memcachedb . delete_table ( "<STR_LIT:hello>" ) <EOL> print "<STR_LIT>" <EOL> print py_memcachedb . delete_table ( "<STR_LIT:hello>" ) <EOL> table_name = u"<STR_LIT>" <EOL> print py_memcachedb . delete_table ( table_name ) <EOL> column_names = [ u"<STR_LIT>" ] <EOL> limit = <NUM_LIT:1000> <EOL> offset = <NUM_LIT:0> <EOL> key = <NUM_LIT:0> <EOL> startrow = u"<STR_LIT>" <EOL> endrow = u"<STR_LIT:100>" <EOL> data = u"<STR_LIT>" <EOL> for ii in range ( <NUM_LIT:0> , <NUM_LIT> ) : <EOL> key = str ( ii ) <EOL> key = ( "<STR_LIT:0>" * ( <NUM_LIT:3> - len ( key ) ) ) + key <EOL> key = unicode ( key ) <EOL> print "<STR_LIT>" + key <EOL> print py_memcachedb . put_entity ( table_name , key , column_names , [ data + key ] ) <EOL> print py_memcachedb . get_table ( table_name , column_names ) </s>
