update table.update to perform the same as upsert

This commit is contained in:
Brian Abelson 2013-08-11 10:40:27 -04:00
parent 904e464dfa
commit 1f77509017

View File

@ -117,6 +117,10 @@ class Table(object):
they will be created based on the settings of ``ensure`` and
``types``, matching the behavior of :py:meth:`insert() <dataset.Table.insert>`.
"""
# check whether keys arg is a string and format as a list
if isinstance(keys, basestring):
keys = [keys]
self._check_dropped()
if not len(keys) or len(keys)==len(row):
return False