1
我想從python腳本中調用box.space.auth_user:auto_increment {「8」,7,7,7}。 這是我做的蟒蛇python-tarantool調用參數
import tarantool
connection = tarantool.connect('127.0.0.1', 3303)
connection.call('box.space.auth_user:auto_increment', ("8", 7, 7, 7))
然後我得到的錯誤:
[string "-- schema.lua (internal file)..."]:921: bad argument #1 to 'insert' (table expected, got string)
這是我如何定義我的AUTH_USER模式
box.schema.space.create('auth_user',{if_not_exists=true})
box.space.auth_user:create_index('primary', {type='TREE', if_not_exists=true, unique=true, parts={1,'NUM'}})
box.space.auth_user:create_index('login', {type='HASH', if_not_exists=true, unique=true, parts={2,'STR'}})
我在做什麼錯誤?
奏效,謝謝。沒有從文檔中獲得它 –