Example #1
0
 def caller(self):
     datas = Functions.data_reader(FILENAME)
     for j in range(1, len(datas)):
         sql = "INSERT INTO `orm`.`" + TABLENAME + "` VALUES("
         for i in range(len(datas[j].split(";"))):
             if i != len(datas[j].split(";")) - 1:
                 sql += "'" + datas[j].split(";")[i] + "',"
             else:
                 sql += "'" + datas[j].split(";")[i] + "'"
         sql += ");"
         sql_executer(sql)
         print(sql)
Example #2
0
 def caller(self):
     datas = Functions.data_reader(FILENAME)
     for j in range(1, len(datas)):
         sql = "INSERT INTO `orm`.`" + TABLENAME + "` VALUES("
         for i in range(len(datas[j].split(";"))):
             if i != len(datas[j].split(";"))-1:
                 sql += "'" + datas[j].split(";")[i] + "',"
             else:
                 sql += "'" + datas[j].split(";")[i] + "'"
         sql += ");"
         sql_executer(sql)
         print(sql)
Example #3
0
 def caller(self):
     datas = Functions.data_reader("order_datails.csv")
     for i in range(1, len(datas)):
         order_detail = Order_Detail.parse(datas[i])
         order_detail.persist()
Example #4
0
 def caller(self):
     datas = Functions.data_reader("employees.csv")
     for i in range(1, len(datas)):
         employee = Employee.parse(datas[i])
         employee.persist()
Example #5
0
 def caller(self):
     datas = Functions.data_reader("customers.csv")
     for i in range(1, len(datas)):
         customer = Customer.parse(datas[i])
         customer.persist()
Example #6
0
 def caller(self):
     datas = Functions.data_reader("employees.csv")
     for i in range(1, len(datas)):
         employee = Employee.parse(datas[i])
         employee.persist()