from create_db import db, Message
from datetime import datetime


def update(name, body):
    message = Message(name=name, body=body, timestamp=datetime.now())
    db.session.add(message)
    db.session.commit()


def select():
    message = Message.query.order_by(Message.timestamp.desc())
    return message


def get_count():
    count = Message.query.count()
    return count

4aaba5a561b39b0db0262221c18ba3e9a4f18ccf
<mask token>

<mask token>


def update(name, body):
    message = Message(name=name, body=body, timestamp=datetime.now())
    db.session.add(message)
    db.session.commit()


<mask token>

<mask token>


def update(name, body):
    message = Message(name=name, body=body, timestamp=datetime.now())
    db.session.add(message)
    db.session.commit()


<mask token>


def get_count():
    count = Message.query.count()
    return count

<mask token>


def update(name, body):
    message = Message(name=name, body=body, timestamp=datetime.now())
    db.session.add(message)
    db.session.commit()


def select():
    message = Message.query.order_by(Message.timestamp.desc())
    return message


def get_count():
    count = Message.query.count()
    return count

from create_db import db, Message
from datetime import datetime


def update(name, body):
    message = Message(name=name, body=body, timestamp=datetime.now())
    db.session.add(message)
    db.session.commit()


def select():
    message = Message.query.order_by(Message.timestamp.desc())
    return message


def get_count():
    count = Message.query.count()
    return count
