Exemplo n.º 1
0
 def create(model):
     return Database.create(
         """
     INSERT INTO message(from_user, to_user, text, time)
     VALUES (?, ?, ?, ?);
     """, [
             model['from_user'], model['to_user'], model['text'],
             model['time']
         ])
Exemplo n.º 2
0
 def create(model):
     return Database.create(
         """
     INSERT INTO comment(text, time, writer, article_id)
     VALUES (?, ?, ?, ?)
     """, [
             model['text'], model['time'], model['writer'],
             model['article_id']
         ])
 def create(model):
     return Database.create("""
     INSERT INTO notification(to_user, text, time)
     VALUES (?, ?, ?);
     """, [model['to_user'], model['text'], model['time']])
 def create(model):
     return Database.create(
         """
     INSERT INTO article_reverse_index(article_id, word)
     VALUES (?, ?)
     """, [model['article_id'], model['word']])
Exemplo n.º 5
0
 def create(model):
     return Database.create(
         """
     INSERT INTO user(firstname)
     VALUES (?);
     """, [model['firstname']])
Exemplo n.º 6
0
 def create(model):
     return Database.create(
         """
     INSERT INTO article(title, text, time, writer)
     VALUES (?, ?, ?, ?)
     """, [model['title'], model['text'], model['time'], model['writer']])