def insert(self, k_number, name): user = Users() user.k_number = k_number user.name = name session.add(user) session.flush() session.commit()
def insert(self, thesis_id, title): thesis = Thesis() thesis.thesis_id = thesis_id thesis.title = title session.add(thesis) session.flush() session.commit()
def insert(user_id, session_id, expiration_id): sessions = Sessions() sessions.user_id = user_id sessions.session_id = session_id sessions.expiration_id = expiration_id session.add(session) session.flush() session.commit()
def insert(self, user_id, book_id, date): lending = Lending() lending.user_id = user_id lending.book_id = book_id lending.date = date session.add(lending) session.flush() session.commit()
def insert(self, isbn, title, place): isbn = int(isbn.replace("-", "")) book = Books() book.isbn = isbn book.title = title book.place = place session.add(book) session.flush() session.commit()