Example #1
0
 def create_customer(self, customer: Customer) -> Customer:
     cur = self.connection.cursor()
     cur.execute('INSERT INTO customers(name) VALUES(?)', customer[:-1])
     return customer._replace(id=cur.lastrowid)