Ich muss Auto_increment Funktion in Tarantool 1.6 mit Python-Client aufrufen.Tarantool in Python - wie Auto_increment Funktion
Ich habe ohne Erfolg versucht:
database = tarantool.connect("localhost", 3301)
s = database.space("customer")
s.call('auto_increment','foo')
Könnte jemand klären, wie einen neuen Datensatz mit ‚foo‘ als Feld auto_increment in Python mit einfügen?
Ich schließe die Fehlermeldung ein, ich habe mehrere Möglichkeiten versucht, auto_increment in Python ohne Erfolg zu verwenden.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nameko/containers.py", line 388, in _run_worker
result = method(*worker_ctx.args, **worker_ctx.kwargs)
File "./service.py", line 25, in create
self.server.call('box.auto_increment', (0, 'foo'))
File "/usr/local/lib/python2.7/dist-packages/tarantool/connection.py", line 373, in call
response = self._send_request(request)
File "/usr/local/lib/python2.7/dist-packages/tarantool/connection.py", line 341, in _send_request
return self._send_request_wo_reconnect(request)
File "/usr/local/lib/python2.7/dist-packages/tarantool/connection.py", line 261, in _send_request_wo_reconnect
response = Response(self, self._read_response())
File "/usr/local/lib/python2.7/dist-packages/tarantool/response.py", line 87, in __init__
raise DatabaseError(self._return_code, self._return_message)
DatabaseError: (48, 'Unknown request type 10')
s.call ('auto_increment', ('foo',)) funktioniert nicht –