import sys
sys.path.append('/Volumes/Sandisk/Projects/bravaorm')
import bravaorm
from model import *

def test():
    conn = bravaorm.Connection(db_user="root", db_password="root", db_host="localhost", db_port=3306, db_database="gofans")
    
    users = conn.blackwords.where("id>30").all
    for usr in users:
        usr.bla_word = "muda"
        conn.add(usr)
        print(usr.toJSON())
        
    conn.save()

if __name__ == "__main__":
    test()
