asafespace/database.py
def insert_user(chat_id, nusnetid, username):
    """
    Insert a new entry into the table
    """

    hashid = get_sha256_hash(chat_id)
    table.update_item(
        Key = {"hashid": hashid},
        UpdateExpression = "SET {} = :val1, {} =:val2, {} = :val3".format("chat_id", "nusnetid", "username"),
        ExpressionAttributeValues = {":val1": chat_id, ":val2": nusnetid, ":val3": username}
        )
    logger.info("New user successfully added into DynamoDB.")

    Insert a new entry into the table
    
Insert a new entry into the table
Insert a new entry into the table
def insert_user(chat_id, nusnetid, username):
    hashid = get_sha256_hash(chat_id)
    table.update_item(
        Key = {"hashid": hashid},
        UpdateExpression = "SET {} = :val1, {} =:val2, {} = :val3".format("chat_id", "nusnetid", "username"),
        ExpressionAttributeValues = {":val1": chat_id, ":val2": nusnetid, ":val3": username}
        )
    logger.info("New user successfully added into DynamoDB.")
def insert_user ( chat_id , nusnetid , username ) : hashid = get_sha256_hash ( chat_id ) table . update_item ( Key = { "hashid" : hashid } , UpdateExpression = "SET {} = :val1, {} =:val2, {} = :val3" . format ( "chat_id" , "nusnetid" , "username" ) , ExpressionAttributeValues = { ":val1" : chat_id , ":val2" : nusnetid , ":val3" : username } ) logger . info ( "New user successfully added into DynamoDB." )
Insert a new entry into the table
Insert a new entry into the table
"""
    Insert a new entry into the table
    """
chat_id
nusnetid
username