username and (collection)name are the ids/
# Users APIs -- the user identifier is the 'username' field
"""Returns true if the user exists."""
query = text('select id from users where username = :username')
res = self._conn.execute(query, username=user_name).fetchone()
return res is not None
If the user doesn't exists, it will be created."""
values['username'] = user_name
for field in fields])
query = text('update users set %s where username = :username' \
fields = ', '.join(fields)
query = text('select %s from users where username = :username' \