Example #1
0
 def commit(self):
     """ commit this table, saving change into xml files """
     # f = open(self.name, "w")
     # f.close()
     ## Creation of table pattern
     ## The object is saved
     # on crée le motif de la table
     # on appelle l'objet se sauvegarde
     save = xmlWriter(self.name)
     info = {}
     info["id"] = self.id
     save.commit(self.table, info)
Example #2
0
 def create(self, table, schema):
     """ create the table called table with the given schema : opens a xml file
   and loads scheme into it """
     ## Creating file for saving the table
     # on crée le fichier de sauvegarde de la table
     f = open(table, "w")
     f.close()
     ## Creating the pattern of the table
     # on crée le motif de la table
     tableStruct = [schema]
     ## The object is saved
     # on appelle l'objet se sauvegarde
     save = xmlWriter(table)
     info = {}
     info["id"] = 0
     save.commit(tableStruct, info)