0
吹代碼是稍作修改:https://www.arangodb.com/tutorials/tutorial-python/錯誤動態
doc = {"_key": 'some_nice_key', "name": 'Robert', "age": '56'}
bindVars = {"doc": doc,"collection":"test"}
aql = "INSERT @doc INTO @collection LET newDoc = NEW RETURN newDoc"
queryResult = db.AQLQuery(aql, bindVars = bindVars)
,我只是做了一些修改:
{"doc": doc} -> {"doc": doc,"collection":"test"}
INSERT @doc INTO users... -> INSERT @doc INTO @collection...
它給我的錯誤:
bind parameter 'bind parameter 'collection' has an invalid value or type near '@collection LET newDoc = NEW RET...' at position 1:18' has an invalid value or type (while parsing). Errors: {u'code': 400, u'errorNum': 1553, u'errorMessage': u"bind parameter 'bind parameter 'collection' has an invalid value or type near '@collection LET newDoc = NEW RET...' at position 1:18' has an invalid value or type (while parsing)", u'error': True}
隱而不宣'aql支持動態設置集合還是我做了什麼錯誤?